Computation of lucky number of planar graphs is NP-hard

Information Processing Letters 112 (2012) 109–112
Contents lists available at SciVerse ScienceDirect
Information Processing Letters
www.elsevier.com/locate/ipl
Computation of lucky number of planar graphs is NP-hard
A. Ahadi ∗ , A. Dehghan, M. Kazemi, E. Mollaahmadi
Department of Mathematical Sciences, Sharif University of Technology, Tehran, Iran
a r t i c l e
i n f o
a b s t r a c t
Article history:
Received 4 June 2011
Received in revised form 26 October 2011
Accepted 3 November 2011
Available online 6 November 2011
Communicated by Ł. Kowalik
Keywords:
Lucky labeling
Computational complexity
Graph coloring
A lucky labeling of a graph G is a function : V (G ) → N, such that for every two adjacent
vertices v and u of G,
w ∼ v ( w ) =
w ∼u ( w ) (x ∼ y means that x is joined to y).
A lucky number of G, denoted by η(G ), is the minimum number k such that G has a
lucky labeling : V (G ) → {1, . . . , k}. We prove that for a given planar 3-colorable graph G
determining whether η(G ) = 2 is NP-complete. Also for every k 2, it is NP-complete to
decide whether η(G ) = k for a given graph G.
© 2011 Elsevier B.V. All rights reserved.
1. Introduction
Graph coloring is one of the most studied subjects
in graph theory. Recently, S. Czerwiński, J. Grytczuk and
W. Zelazny [3] have studied the concept of lucky labeling as a vertex coloring. A labeling : V (G ) → N is called
lucky, if for every
two adjacent vertices v and u of G,
w ∼ v ( w ) =
w ∼u ( w ) (x ∼ y means that x is joined
to y). Lucky number of G is the minimum number k
such that G has a lucky labeling : V (G ) → Nk , where
Nk = {1, . . . , k}. Those labelings arise as a vertex version
of a well-known problem introduced by Karoński, Łuczak
and Thomason [6]. They conjecture that every graph G except K 2 has an edge labeling in N3 , such that assigning
to each vertex of G the summation of the labels of its
incident edges gives a proper vertex coloring of G. Also
some other labelings have been studied extensively by several authors, for instance see [1,2,6,7]. In each of them,
a labeling is an assignment of numbers to either the vertices or the edges or both of them. We consider only finite
undirected simple graphs. Every graph has some lucky la-
*
Corresponding author.
E-mail addresses: [email protected] (A. Ahadi),
[email protected] (A. Dehghan), [email protected]
(M. Kazemi), [email protected] (E. Mollaahmadi).
0020-0190/$ – see front matter
doi:10.1016/j.ipl.2011.11.002
© 2011
Elsevier B.V. All rights reserved.
beling, for example one may put the different powers of
two (1, 2, 4, . . . , 2| V (G )|−1 ) on the vertices of G.
A proper coloring of G is a function c : V (G ) → N
such that for every two adjacent vertices v and u, we
have c ( v ) = c (u ). A t-proper coloring is a proper coloring
c : V (G ) → Nt . G is called t-colorable if it has a proper
coloring from the set Nt . The smallest t such that G is tcolorable is called the chromatic number of G and it is de(G ). For a lucky labeling , define f : V (G ) → N
noted by χ
as f ( v ) = w ∼ v ( w ); so f is a proper coloring of G.
In this note we study the computational complexity of
lucky number problem.
Theorem 1. It is NP-complete to decide for a given planar
3-colorable graph G, whether η(G ) = 2.
In [3] S. Czerwiński et al. have proved that the lucky
number of planar graphs is bounded by a fix number, it
has also been conjectured that for every graph G, η(G ) χ (G ). Note that if this conjecture is true, then for graphs
from Theorem 1, we have 2 η(G ) 3.
Our second theorem proves that the following problem
for k > 1 is NP-complete.
Problem Lk . Given a graph G, is
η(G ) = k?
110
A. Ahadi et al. / Information Processing Letters 112 (2012) 109–112
Fig. 1. The graph G (Φ) derived from the planar 3-SAT (type 2) formula
Φ = c 1 ∧ c 2 , where c 1 = ¬x1 ∨ ¬x2 ∨ ¬x3 and c 2 = x1 ∨ ¬x2 ∨ x3 . Φ is
satisfied by the black vertices.
It is easy to see that L1 can be efficiently computed,
in fact it is sufficient to check the degrees of every two
adjacent vertices; η(G ) = 1 if and only if no two adjacent
vertices have the same degree.
Fig. 2. The auxiliary graph B (x j ).
Theorem 2. For every k 2, problem Lk is NP-complete.
For a graph G, we denote the degree of vertex v by
either d G ( v ) or d( v ) and the maximum degree of G by
(G ). We follow [8] for terminology and notation not defined here.
2. Proofs
Let Φ be a 3-SAT formula with clauses C = {c 1 , . . . , ck }
and variables X = {x1 , . . . , xn }. Let G (Φ) be a graph with
the vertices C ∪ X ∪ (¬ X ), where ¬ X = {¬x1 , . . . , ¬xn } such
that for each clause c j = y ∨ z ∨ w, c j is adjacent to y , z
and w; also every xi ∈ X is adjacent to ¬xi . Φ is called
a planar 3-SAT (type 2) formula if G (Φ) is a planar graph
(see Fig. 1). It was shown that the problem of satisfiability of planar 3-SAT (type 2) is NP-complete [4] (is there a
truth assignment for Φ that satisfies all the clauses?).
We reduce planar 3-SAT (type 2) problem to our problem. Consider an instance of planar 3-SAT (type 2) formula Φ with variables V = {x1 , . . . , xn } and clauses C =
{c 1 , . . . , ck }. We transform this into a graph G (Φ) such that
η(G (Φ)) = 2 if and only if Φ is satisfiable.
We use two auxiliary graphs B (x j ) and A (c j ) which are
shown in Figs. 2 and 3. The graph G (Φ) has a copy of
B (xi ) for each variable xi ∈ V and a copy of A (c j ) for each
clause c j ∈ C . An edge c j xi is added if c j contains the literal xi . See Fig. 4 for more details. Clearly G (Φ) is planar
and χ (G (Φ)) = 3.
Assume that η(G (Φ)) 2 and : V (G (Φ)) → {1, 2} is
a lucky labeling. We have the following two auxiliary lemmas.
Lemma 1. For every variable x j , we have (x j ) + (¬x j ) 3.
Proof. Let x j be an arbitrary variable, consider the subgraph B (x j ). Since f ( y 2j ) = f ( y 3j ) so ( y 3j ) = ( y 2j ). Without loss of generality let ( y 3j ) = 1, thus 3 = f ( y 1j ) =
f ( y 2j ) = 1 + ( y 1j ) + ( y 4j ) and ( y 1j ) + ( y 4j ) ∈ {3, 4}. If
( y 1j ) + ( y 4j ) = 3 then f ( y 3j ) = 5 and if ( y 1j ) + ( y 4j ) = 4,
then f ( y 2j ) = 5. Therefore in both cases 5 = f ( y 4j ) = 1 +
2 + (x j ) + (¬x j ). 2
Fig. 3. The auxiliary graph A (c j ).
Fig. 4. The graph G (Φ) derived from Φ , explained in Fig. 1.
Lemma 2. For every clause c j = a ∨ b ∨ c, we have (a)+(b)+
(c ) < 6.
Proof. Suppose, by way of contradiction, that c j = a ∨ b ∨
c is a clause such that (a) + (b) + (c ) = 6. Clearly for
−1
) + (c 2ij ) = 3. Therefore f (c j ) = (c j ) +
1 i 4, (c 2i
j
(c j ) + 6 and we have two similar equalities for f (c j ) and
f (c j ). Consequently is a lucky labeling for the odd cycle
A. Ahadi et al. / Information Processing Letters 112 (2012) 109–112
111
c j c j c j , but the lucky number of an odd cycle is 3. It is a
contradiction. 2
Proof of Theorem 1. First assume that η(G (Φ)) 2 and let
: V (G (Φ)) → {1, 2} be a lucky labeling. Now we present
a satisfying assignment Γ : {x1 , . . . , xn } → {true, false}. By
Lemma 1, for every xi we have (xi ) + (¬xi ) 3 so it
is impossible that both (xi ) and (¬xi ) are 1. Now if
(xi ) = 1 let Γ (xi ) = true, if (¬xi ) = 1 let Γ (xi ) = false
and if (xi ) = (¬xi ) = 2 consider an arbitrary assignment for Γ (xi ). For every c j = a ∨ b ∨ c by Lemma 2,
(a) + (b) + (c ) < 6; so at least one of the literals a, b, c
is true. Consequently Γ satisfies c j .
Next suppose that Φ is satisfiable with the satisfying
assignment Γ : {x1 , . . . , xn } → {true, false}. We present the
lucky labeling for G (Φ) from the set {1, 2}. For each
clause c j let
c j = c 1j = c 3j = c 5j = c 7j = 1,
(c j ) = c j = c 2j = c 4j = c 6j = c 8j = 2.
Also for every variable xi , let ( z1j ) = ( z2j ) = · · · = ( z20
)=
j
( y 1j ) = ( y 3j ) = 1 and ( y 2j ) = ( y 4j ) = 2. Moreover, if
Γ (xi ) = true set (xi ) = 1 and (¬xi ) = 2, otherwise set
(xi ) = 2 and (¬xi ) = 1. Since Φ is satisfiable, by an easy
counting one can see that is a lucky labeling. 2
Corollary 1. For every k > 2, it is NP-complete to decide
whether η(G ) = 2 for a graph G with χ (G ) = k.
Proof. It is easy to see that there is a graph H such that
χ ( H ) = k and η( H ) = 1. For example V ( H ) = { v i | 1 i k} ∪ {u i j | 1 j i k}, E ( H ) = { v i v i | i = i } ∪ { v i u i j | 1 j i k}. Now consider a new graph G ∪ H containing a
copy of H and a copy of a given planar 3-colorable graph
G such that two copies are disjoint. Then χ (G ∪ H ) = k and
η ( G ∪ H ) = η ( G ). 2
In order to prove Theorem 2, we reduce 3-Colorability
to problem Lk for k 2.
3-Colorability: Given a graph G; is
χ (G ) 3?
In [5], it has been shown that this problem is NPcomplete.
Proof of Theorem 2. For a given graph G we construct a
regular graph G ∗ such that χ (G ∗ ) = χ (G ) + 6k − 8 (step 1),
next we make a graph G ∗∗ such that η(G ∗∗ ) = k if and only
if χ (G ∗ ) 6k − 5 (step 2). So η(G ∗∗ ) = k if and only if G
is 3-colorable.
Step 1. For a given graph G consider a graph H containing a copy of G and a copy of the complete graph K 6k−8 in
such a way that every vertex of G is joined to every vertex
of K 6k−8 . We have ( H ) = | V (G )| + 6k − 9. For every vertex v of H join ( H ) − d H ( v ) new isolated vertices to v
(therefore we have added | V (G )|( H ) − 2| E (G )| new vertices with degree one where V (G ) and E (G ) are the sets
( H )−1
of vertices and edges). Next add 2 copies of K 2 ’s
to this graph, call the resulting graph I , its vertices with
Fig. 5. The graph G ∗ .
degree ( H ) old vertices and the vertices with degree 1
new vertices. Now consider two copies of I and ( H ) − 1
distinct prefect matchings between the new vertices of the
one copy and the new vertices of the other copy. Note that
indeed one can find ( H ) − 1 distinct perfect matchings in
polynomial time. Now join two copies of I by those perfect
matchings, name the constructed graph G ∗ . (Fig. 5.)
We study some properties of G ∗ . Clearly G ∗ is ( H )regular, also obviously χ (G ∗ ) χ (G ) + 6k − 8. We show
that the equality holds. Consider a proper χ (G )-coloring
for each of the two copies of G used in G ∗ by colors
{1, . . . , χ (G )} and color the vertices of the two copies
of K 6k−8 ’s by colors {χ (G ) + 1, . . . , χ (G ) + 6k − 8}. Also
color the new vertices of one copy by χ (G ) + 1 and color
the vertices of its K 2 ’s by χ (G ) + 1 and χ (G ) + 2. For
the second copy similarly use the colors χ (G ) + 3 and
χ (G ) + 4. Note that since k 2, then 6k − 8 4 and
therefore the colors χ (G ) + 1, . . . , χ (G ) + 4 were used
in coloring of K 6k−8 ’s previously. Consequently χ (G ∗ ) =
χ (G ) + 6k − 8.
Step 2. Let n be the number of vertices of G ∗ . We can
compute the value of n in polynomial time. Now, we construct G ∗∗ . First, consider a complete graph with vertices
X = {xi j : 0 i n, 1 j k}, then add the independent
vertices { y s : 1 s n − 1} to this graph and join xi j to
y s if and only if s i = n. Consider a copy of G ∗ with
the vertices Z = { zt : 1 t n} and join every vertex of
{xnj : 1 j k} to every zt . Finally, join every zt to six new
vertices zt1 , . . . , zt6 . Call the resulting graph G ∗∗ . (Fig. 6.)
We claim η(G ∗∗ ) = k if and only if χ (G ∗ ) 6k −
5. First, note that in every lucky labeling of G ∗∗ , for
every 1 j 1 < j 2 k we have f (xnj 1 ) = f (xnj 2 ), thus
(xnj 2 ) = (xnj 1 ) (because all the neighbors of xnj 1 and xnj 2
are common except xnj 2 as a neighbor of xnj 1 , and vice
versa). Therefore (xn1 ), . . . , (xnk ) are k distinct numbers
(Fact 1), that means η(G ∗∗ ) k. Now suppose η(G ∗∗ ) = k
and : V (G ∗∗ ) → Nk is a lucky labeling of G ∗∗ . Let F =
{ f (x): x ∈ X }. Since the vertices of X form a complete
graph, for every two vertices x and x
of X , f (x) = f (x
).
Thus maxx∈ X F − minx∈ X F | X | − 1 = k(n + 1) − 1. On
the other hand, let M , m ∈ X be two vertices such that
f ( M ) = maxx∈ X F and f (m) = minx∈ X F , we have:
112
A. Ahadi et al. / Information Processing Letters 112 (2012) 109–112
Fig. 6. The graph G ∗∗ .
k(n + 1) − 1
f ( M ) − f (m) =
( w ) −
have
( w )
w ∼m
w ∼M
( w ) − ( M ) +
( w ) .
= (m) +
w ∈Y ∪ Z
w ∼M
w ∈Y ∪ Z
w ∼m
The above inequality forces that the difference between
f (m) and f ( M ) must be the maximum possible value, that
is (m) = k, ( M ) = 1, also m has no neighbor in Y ∪ Z ,
M has n neighbors in Y ∪ Z , and ( z s ) = k for every s
(Fact 2).
Now we study the luckiness of vertices of Z . For every s,
f (zs ) =
k
(xnj ) +
( zt ) +
zt ∼ z s
j =1
6
zis .
i =1
6
6
zis .
i =1
So the function c ( z s ) :=
is a proper coloring of G ∗ with colors {6, 7, . . . , 6k}, consequently χ (G ∗ ) 6k − 5.
On the other hand, let χ (G ∗ ) 6k − 5 and c : Z →
{6, 7, . . . , 6k} be a proper coloring of G ∗ . We present a
lucky labeling for G ∗∗ with labels from Nk , define
and choose
k(k + 1)
k(k + 1)
2
2
− j + ki ,
,
+ k G ∗ + c ( zs ),
f zis = k.
It is not hard to check that if n 5 then is a lucky
labeling of G ∗∗ with the labels from Nk , so η(G ∗∗ ) k.
The proof is complete. 2
Finally, we present the following conjecture:
[1] L. Addario-Berry, R.E.L. Aldred, K. Dalal, B.A. Reed, Vertex colouring
edge partitions, J. Combin. Theory Ser. B 94 (2) (2005) 237–244.
i
i =1 ( z s )
from the set
f (zs ) =
2
References
f ( zs ) := (1 + 2 + · · · + k) + k( H ) +
( y s ) = k,
f ( y s ) = (n − s)
k(k + 1)
Conjecture 1. It is NP-complete to decide whether η(G ) = 2 for
a given 3-regular graph G.
By Facts 1 and 2:
(xi j ) = j ,
f (xi j ) = (n + 1)
( zs ) = k
(z1s ), . . . , (z6s ) to be six arbitrary
Nk such that 6i =1 (zis ) is equal to
numbers
c ( z s ). We
[2] L. Addario-Berry, K. Dalal, B.A. Reed, Degree constrained subgraphs,
Discrete Appl. Math. 156 (7) (2008) 1168–1174.
[3] Sebastian Czerwinski, Jaroslaw Grytczuk, Wiktor Zelazny, Lucky labelings of graphs, Inform. Process. Lett. 109 (18) (2009) 1078–1081.
[4] Ding-Zhu Du, Ker-K Ko, J. Wang, Introduction to Computational Complexity, Higher Education Press, 2002.
[5] M.R. Garey, D.S. Johnson, L. Stockmeyer, Some simplified NP-complete
graph problems, Theoret. Comput. Sci. 1 (3) (1976) 237–267.
[6] Michał Karoński, Tomasz Łuczak, Andrew Thomason, Edge weights and
vertex colours, J. Combin. Theory Ser. B 91 (1) (2004) 151–157.
[7] Joanna Skowronek-Kaziów, 1, 2 conjecture—the multiplicative version,
Inform. Process. Lett. 107 (3–4) (2008) 93–95.
[8] Douglas B. West, Introduction to Graph Theory, 2nd edition, PrenticeHall, August 2000.