\addbibresource

myRefs12.bib \AtEveryBibitem\clearlistlanguage

Graceful coloring is computationally hard

Cyriac Antony IIT Madras, Chennai, India Laavanya D Devi Yamini S
Abstract

Given a (proper) vertex coloring f𝑓fitalic_f of a graph G𝐺Gitalic_G, say f:V⁒(G)β†’β„•:𝑓→𝑉𝐺ℕf\colon V(G)\to\mathbb{N}italic_f : italic_V ( italic_G ) β†’ blackboard_N, the difference edge labelling induced by f𝑓fitalic_f is a function h:E⁒(G)β†’β„•:β„Žβ†’πΈπΊβ„•h\colon E(G)\to\mathbb{N}italic_h : italic_E ( italic_G ) β†’ blackboard_N defined as h⁒(u⁒v)=|f⁒(u)βˆ’f⁒(v)|β„Žπ‘’π‘£π‘“π‘’π‘“π‘£h(uv)=|f(u)-f(v)|italic_h ( italic_u italic_v ) = | italic_f ( italic_u ) - italic_f ( italic_v ) | for every edge u⁒v𝑒𝑣uvitalic_u italic_v of G𝐺Gitalic_G. A graceful coloring of G𝐺Gitalic_G is a vertex coloring f𝑓fitalic_f of G𝐺Gitalic_G such that the difference edge labelling hβ„Žhitalic_h induced by f𝑓fitalic_f is a (proper) edge coloring of G𝐺Gitalic_G. A graceful coloring with range {1,2,…,k}12β€¦π‘˜\{1,2,\dots,k\}{ 1 , 2 , … , italic_k } is called a graceful kπ‘˜kitalic_k-coloring. The least integer kπ‘˜kitalic_k such that G𝐺Gitalic_G admits a graceful kπ‘˜kitalic_k-coloring is called the graceful chromatic number of G𝐺Gitalic_G, denoted by Ο‡g⁒(G)subscriptπœ’π‘”πΊ\chi_{g}(G)italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_G ).

We prove that χ⁒(G2)≀χg⁒(G)≀a⁒(χ⁒(G2))πœ’superscript𝐺2subscriptπœ’π‘”πΊπ‘Žπœ’superscript𝐺2\chi(G^{2})\leq\chi_{g}(G)\leq a(\chi(G^{2}))italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ≀ italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_G ) ≀ italic_a ( italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ) for every graph G𝐺Gitalic_G, where a⁒(n)π‘Žπ‘›a(n)italic_a ( italic_n ) denotes the n𝑛nitalic_nth term of the integer sequence A065825 in OEIS. We also prove that graceful coloring problem is NP-hard for planar bipartite graphs, regular graphs and 2-degenerate graphs. In particular, we show that for each kβ‰₯5π‘˜5k\geq 5italic_k β‰₯ 5, it is NP-complete to check whether a planar bipartite graph of maximum degree kβˆ’2π‘˜2k-2italic_k - 2 is graceful kπ‘˜kitalic_k-colorable. The complexity of checking whether a planar graph is graceful 4-colorable remains open.

1 Introduction

Many branches of mathematics started out as problems in recreational mathematics which are easy to understand, yet challenging to solve. The story of graph theory is no different. The innocuous problem of coloring maps using only 4 colors gave birth to a thriving area of graph theory named graph coloring. The notion of graph labelling is a generalisation of graph coloring. Graph labelling is an area of immense theoretical interest and diverse practical applications, evident from Gallian’s dynamic survey [gallian]. Similar to how attempts to prove the four color conjecture lead to the historical origin or popularity of the area of graph colorings, study of graceful labelling and harmonious labelling lead to the boom of the area of graph labellings [gallian].

The definition of graceful labelling requires the notion of difference edge labelling induced by a vertex labelling. Given a vertex labelling f𝑓fitalic_f of a graph G𝐺Gitalic_G, say f:V⁒(G)β†’β„•:𝑓→𝑉𝐺ℕf\colon V(G)\to\mathbb{N}italic_f : italic_V ( italic_G ) β†’ blackboard_N, the difference edge labelling induced by f𝑓fitalic_f is a function h:E⁒(G)β†’β„•βˆͺ{0}:β„Žβ†’πΈπΊβ„•0h\colon E(G)\to\mathbb{N}\cup\{0\}italic_h : italic_E ( italic_G ) β†’ blackboard_N βˆͺ { 0 } defined as h⁒(u⁒v)=|f⁒(u)βˆ’f⁒(v)|β„Žπ‘’π‘£π‘“π‘’π‘“π‘£h(uv)=|f(u)-f(v)|italic_h ( italic_u italic_v ) = | italic_f ( italic_u ) - italic_f ( italic_v ) | for every edge u⁒v𝑒𝑣uvitalic_u italic_v of G𝐺Gitalic_G. A graceful labelling of a graph G𝐺Gitalic_G on mπ‘šmitalic_m edges is an injection f:V⁒(G)β†’{0,1,…,m}:𝑓→𝑉𝐺01β€¦π‘šf\colon V(G)\to\{0,1,\dots,m\}italic_f : italic_V ( italic_G ) β†’ { 0 , 1 , … , italic_m } such that the difference edge labelling hβ„Žhitalic_h induced by f𝑓fitalic_f is an injection from E⁒(G)𝐸𝐺E(G)italic_E ( italic_G ) to {1,2,…,m}12β€¦π‘š\{1,2,\dots,m\}{ 1 , 2 , … , italic_m } [gallian].

The most popular problem on graceful labelling is settling the infamous KΓΆtzig-Ringel-Rosa conjecture, better known as the graceful tree conjecture, which states that all trees are graceful. The graceful tree conjecture is far from resolved till date. Hence, the practical approaches to the problem includes resolving the conjecture for subclasses of trees on one hand, and resolving weaker versions of the conjecture on the other hand. One way to produce notions weaker than graceful labelling is to impose restrictions locally on vertex neighbourhoods rather than globally. This produces the notion of graceful coloring. A vertex labelling f𝑓fitalic_f of a graph G𝐺Gitalic_G, say f:V⁒(G)β†’β„•:𝑓→𝑉𝐺ℕf\colon V(G)\to\mathbb{N}italic_f : italic_V ( italic_G ) β†’ blackboard_N, is a graceful coloring of G𝐺Gitalic_G if (i) f𝑓fitalic_f is an injection when limited to each vertex neighbourhood, and (ii) the induced difference edge labelling hβ„Žhitalic_h is an injection when limited to each vertex neighbourhood; formally, the restriction fβ†ΎN⁒[v]subscript𝑓↾absent𝑁delimited-[]𝑣f_{\restriction N[v]}italic_f start_POSTSUBSCRIPT β†Ύ italic_N [ italic_v ] end_POSTSUBSCRIPT is an injection and hβ†ΎG⁒[N⁒[v]]subscriptβ„Žβ†Ύabsent𝐺delimited-[]𝑁delimited-[]𝑣h_{\restriction G[N[v]]}italic_h start_POSTSUBSCRIPT β†Ύ italic_G [ italic_N [ italic_v ] ] end_POSTSUBSCRIPT is an injection for the closed neighbourhood N⁒[v]𝑁delimited-[]𝑣N[v]italic_N [ italic_v ] of each vertex v𝑣vitalic_v in G𝐺Gitalic_G. In other words, a graceful coloring of G𝐺Gitalic_G is a (proper vertex) coloring f𝑓fitalic_f of G𝐺Gitalic_G such that the difference edge labelling hβ„Žhitalic_h induced by f𝑓fitalic_f is a (proper) edge coloring of G𝐺Gitalic_G [bi_byers] (see Figure 1 for an example). The graceful coloring first appeared in Bi et al. [bi_byers], and was studied in more detail in Byers’ thesis [byers].

132434211532
Figure 1: A graceful coloring of a graph. This is a graceful 5-coloring.

For kβˆˆβ„•π‘˜β„•k\in\mathbb{N}italic_k ∈ blackboard_N, a graceful kπ‘˜kitalic_k-coloring of G𝐺Gitalic_G is a graceful coloring of G𝐺Gitalic_G with range {1,2,…,k}12β€¦π‘˜\{1,2,\dots,k\}{ 1 , 2 , … , italic_k } (i.e., f:V⁒(G)β†’{1,2,…,k}:𝑓→𝑉𝐺12β€¦π‘˜f\colon V(G)\to\{1,2,\dots,k\}italic_f : italic_V ( italic_G ) β†’ { 1 , 2 , … , italic_k }). The least integer kπ‘˜kitalic_k such that G𝐺Gitalic_G admits a graceful kπ‘˜kitalic_k-coloring is called the graceful chromatic number of G𝐺Gitalic_G, denoted by Ο‡g⁒(G)subscriptπœ’π‘”πΊ\chi_{g}(G)italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_G ).

It is easy to observe that under a graceful coloring, no two neighbours of a vertex can get the same color. A (proper) coloring of a graph G𝐺Gitalic_G with this property is called a distance-two coloring. Hence, every graceful coloring is a distance-two coloring, but the converse is not true. The least number of colors required to produce a distance-two coloring of a graph G𝐺Gitalic_G is called the distance-two chromatic number of G𝐺Gitalic_G, and is equivalent to the chromatic number of the square graph G2superscript𝐺2G^{2}italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. We denote the distance-two chromatic number of G𝐺Gitalic_G by χ⁒(G2)πœ’superscript𝐺2\chi(G^{2})italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ). Obviously, χ⁒(G2)≀χg⁒(G)πœ’superscript𝐺2subscriptπœ’π‘”πΊ\chi(G^{2})\leq\chi_{g}(G)italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ≀ italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_G ).

We relate the graceful chromatic number of complete graphs to integer sequences. Throughout this paper, a⁒(n)π‘Žπ‘›a(n)italic_a ( italic_n ) denotes the n𝑛nitalic_nth term of the integer sequence A065825 in OEIS [a065825-oeis]. It is known that Ο‡g⁒(Kn)=a⁒(n)subscriptπœ’π‘”subscriptπΎπ‘›π‘Žπ‘›\chi_{g}(K_{n})=a(n)italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_K start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) = italic_a ( italic_n ) [laavanya_deviYamini].

In this paper, we prove that χ⁒(G2)≀χg⁒(G)≀a⁒(χ⁒(G2))πœ’superscript𝐺2subscriptπœ’π‘”πΊπ‘Žπœ’superscript𝐺2\chi(G^{2})\leq\chi_{g}(G)\leq a(\chi(G^{2}))italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ≀ italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_G ) ≀ italic_a ( italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ) for every graph G𝐺Gitalic_G. In addition, we prove that graceful coloring problem is NP-hard for planar bipartite graphs, regular graphs and 2-degenerate graphs. We show that (i) for each kβ‰₯6π‘˜6k\geq 6italic_k β‰₯ 6, it is NP-complete to check whether a planar bipartite 3-degenerate graph of maximum degree kβˆ’2π‘˜2k-2italic_k - 2 is graceful kπ‘˜kitalic_k-colorable, (ii) it is NP-complete to check whether a 3-regular 3-connected planar bipartite graph is graceful 5-colorable, and (iii) it is NP-complete to check whether a 2-degenerate graph of maximum degree 3 is graceful 4-colorable. The complexity of checking whether a planar graph is graceful 4-colorable remains open.

For brevity, we present overviews in the paper, and relegate details to the extended version of the paper.

2 Results

2.1 Graceful Coloring and Integer Sequences

By definition, a⁒(n)π‘Žπ‘›a(n)italic_a ( italic_n ) is the least integer kπ‘˜kitalic_k for which {1,2,…,k}12β€¦π‘˜\{1,2,\dots,k\}{ 1 , 2 , … , italic_k } contains a subset S𝑆Sitalic_S of cardinality n𝑛nitalic_n such that no three distinct elements i,j,kπ‘–π‘—π‘˜i,j,kitalic_i , italic_j , italic_k of S𝑆Sitalic_S satisfy |iβˆ’j|=|jβˆ’k|π‘–π‘—π‘—π‘˜|i-j|=|j-k|| italic_i - italic_j | = | italic_j - italic_k |. This imply the following.

Theorem 1 ([laavanya_deviYamini]).

Ο‡g⁒(Kn)=a⁒(n)subscriptπœ’π‘”subscriptπΎπ‘›π‘Žπ‘›\chi_{g}(K_{n})=a(n)italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_K start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) = italic_a ( italic_n ) for every positive integer n𝑛nitalic_n. ∎

If f𝑓fitalic_f is a distance-two qπ‘žqitalic_q-coloring of a graph G𝐺Gitalic_G and hβ„Žhitalic_h is a graceful coloring of the complete graph KqsubscriptπΎπ‘žK_{q}italic_K start_POSTSUBSCRIPT italic_q end_POSTSUBSCRIPT with vertex set {1,2,…,q}12β€¦π‘ž\{1,2,\dots,q\}{ 1 , 2 , … , italic_q }, then h∘fβ„Žπ‘“h\circ fitalic_h ∘ italic_f is a graceful coloring of G𝐺Gitalic_G. Thus, we have the following theorem.

Theorem 2.

χ⁒(G2)≀χg⁒(G)≀a⁒(χ⁒(G2))πœ’superscript𝐺2subscriptπœ’π‘”πΊπ‘Žπœ’superscript𝐺2\chi(G^{2})\leq\chi_{g}(G)\leq a(\chi(G^{2}))italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ≀ italic_Ο‡ start_POSTSUBSCRIPT italic_g end_POSTSUBSCRIPT ( italic_G ) ≀ italic_a ( italic_Ο‡ ( italic_G start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) ) for every graph G𝐺Gitalic_G. ∎

2.2 Complexity of Graceful Coloring

The problem Graceful kπ‘˜kitalic_k-Colorability is defined as follows.

Graceful kπ‘˜kitalic_k-Colorability
Instance: A graph G𝐺Gitalic_G.
Question: Does G𝐺Gitalic_G admit a graceful kπ‘˜kitalic_k-coloring?

First, we show that Graceful kπ‘˜kitalic_k-colorablity of planar graphs is NP-complete for all kβ‰₯5π‘˜5k\geq 5italic_k β‰₯ 5. As a prelude to the reduction, we point out the following.

Theorem 3.

Let kβ‰₯5π‘˜5k\geq 5italic_k β‰₯ 5, and let G𝐺Gitalic_G be a graph with minimum degree δ⁒(G)β‰₯kβˆ’2π›ΏπΊπ‘˜2\delta(G)\geq k-2italic_Ξ΄ ( italic_G ) β‰₯ italic_k - 2. Then, G𝐺Gitalic_G is graceful kπ‘˜kitalic_k-colorable if and only if G𝐺Gitalic_G is distance-two 4-colorable. ∎

Construction 1.

Parameter: An integer kβ‰₯5π‘˜5k\geq 5italic_k β‰₯ 5 (not part of input).
Input: A 3-regular graph G𝐺Gitalic_G.
Output: A graph Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT of maximum degree kβˆ’2π‘˜2k-2italic_k - 2.
Guarantee: Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT is graceful kπ‘˜kitalic_k-colorable if and only if G𝐺Gitalic_G is distance-two 4-colorable.
Steps: Introduce a copy of G𝐺Gitalic_G. Attach kβˆ’5π‘˜5k-5italic_k - 5 leaf vertices at each vertex of the copy of G𝐺Gitalic_G.

Proof of Guarantee (overview).

Suppose that Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT is graceful kπ‘˜kitalic_k-colorable. That is, Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT admits a graceful kπ‘˜kitalic_k-coloring fβ€²:V⁒(Gβ€²)β†’{1,2,…,k}:superscript𝑓′→𝑉superscript𝐺′12β€¦π‘˜f^{\prime}\colon V(G^{\prime})\to\{1,2,\dots,k\}italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT : italic_V ( italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT ) β†’ { 1 , 2 , … , italic_k }. If v𝑣vitalic_v is a vertex of Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT colored 3 by fβ€²superscript𝑓′f^{\prime}italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT, then v𝑣vitalic_v has at most kβˆ’3π‘˜3k-3italic_k - 3 neighbours in Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT. As a result, no non-leaf vertex v𝑣vitalic_v of Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT can get color 3 (because dG′⁒(v)=kβˆ’2subscript𝑑superscriptπΊβ€²π‘£π‘˜2d_{G^{\prime}}(v)=k-2italic_d start_POSTSUBSCRIPT italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT end_POSTSUBSCRIPT ( italic_v ) = italic_k - 2). Similarly, each non-leaf vertex v𝑣vitalic_v of Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT cannot get any of the colors 4,5,…,kβˆ’245β€¦π‘˜24,5,\dots,k-24 , 5 , … , italic_k - 2, and thus v𝑣vitalic_v can get only the colors 1,2,kβˆ’112π‘˜11,2,k-11 , 2 , italic_k - 1 or kπ‘˜kitalic_k under f𝑓fitalic_f. Hence, the restriction of f𝑓fitalic_f to V⁒(G)𝑉𝐺V(G)italic_V ( italic_G ) is a graceful coloring and in particular a distance-two coloring of G𝐺Gitalic_G that uses only 4 colors (namely, 1,2,kβˆ’112π‘˜11,2,k-11 , 2 , italic_k - 1 and kπ‘˜kitalic_k). Therefore, G𝐺Gitalic_G is distance-two 4-colorable.

Conversely, suppose that G𝐺Gitalic_G is distance-two 4-colorable. Then, there exists a distance-two 4-coloring f𝑓fitalic_f of G𝐺Gitalic_G with color paletter {1,2,kβˆ’1,k}12π‘˜1π‘˜\{1,2,k-1,k\}{ 1 , 2 , italic_k - 1 , italic_k } (i.e., f:V⁒(G)β†’{1,2,kβˆ’1,k}:𝑓→𝑉𝐺12π‘˜1π‘˜f\colon V(G)\to\{1,2,k-1,k\}italic_f : italic_V ( italic_G ) β†’ { 1 , 2 , italic_k - 1 , italic_k }). We show that f𝑓fitalic_f can be extended into a graceful kπ‘˜kitalic_k-coloring fβ€²superscript𝑓′f^{\prime}italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT of Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT. For each non-leaf vertex v𝑣vitalic_v of Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT, define f′⁒(v)=f⁒(v)superscript𝑓′𝑣𝑓𝑣f^{\prime}(v)=f(v)italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT ( italic_v ) = italic_f ( italic_v ), and color the leaf neighbours of v𝑣vitalic_v in Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT as follows: if f′⁒(v)=2superscript𝑓′𝑣2f^{\prime}(v)=2italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT ( italic_v ) = 2, then color the leaf neighbours of v𝑣vitalic_v with colors {4,5,…,kβˆ’2}45β€¦π‘˜2\{4,5,\dots,k-2\}{ 4 , 5 , … , italic_k - 2 } in a bijective fashion; if f′⁒(v)=kβˆ’1superscriptπ‘“β€²π‘£π‘˜1f^{\prime}(v)=k-1italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT ( italic_v ) = italic_k - 1, then color the leaf neighbours of v𝑣vitalic_v with colors {3,4,…,kβˆ’3}34β€¦π‘˜3\{3,4,\dots,k-3\}{ 3 , 4 , … , italic_k - 3 } in a bijective fashion; if f′⁒(v)∈{1,k}superscript𝑓′𝑣1π‘˜f^{\prime}(v)\in\{1,k\}italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT ( italic_v ) ∈ { 1 , italic_k }, then color the leaf neighbours of v𝑣vitalic_v with distinct colors from {3,4,…,kβˆ’2}34β€¦π‘˜2\{3,4,\dots,k-2\}{ 3 , 4 , … , italic_k - 2 }. We complete the proof by showing that fβ€²superscript𝑓′f^{\prime}italic_f start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT is a graceful kπ‘˜kitalic_k-coloring of Gβ€²superscript𝐺′G^{\prime}italic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT. ∎

Observe that for k=5π‘˜5k=5italic_k = 5, the output graph in Construction 1 is the same as the input graph (i.e., Gβ€²=Gsuperscript𝐺′𝐺G^{\prime}=Gitalic_G start_POSTSUPERSCRIPT β€² end_POSTSUPERSCRIPT = italic_G). Moreover, the construction obviously takes only time polynomial in the input size. Also, observe that Construction 1 preserves planarity and bipartiteness. Further, Feder, Hell and Subi [feder] proved that it is NP-complete to check whether a 3-regular 3-connected planar bipartite graph is distance-two 4-colorable. Thanks to Construction 1, this imply the following.

Theorem 4.

Graceful 5-colorablity is NP-complete for 3-regular 3-connected planar bipartite graphs. ∎

Theorem 5.

For kβ‰₯6π‘˜6k\geq 6italic_k β‰₯ 6, Graceful kπ‘˜kitalic_k-colorablity is NP-complete for planar bipartite graphs of maximum degree kβˆ’2π‘˜2k-2italic_k - 2. ∎

Next, we show that Graceful 4-colorablity is NP-complete by reducing from the following problem.

Positive Not-All-Equal 3333-Sat E4
Instance:
A set X𝑋Xitalic_X of variables and a set C𝐢Citalic_C of clauses over X𝑋Xitalic_X are specified, where each clause c∈C𝑐𝐢c\in Citalic_c ∈ italic_C consists of three distinct variables, and each variable appears in exactly four clauses (the formula contains no negations).
Question: Does there exist a truth assignment for X𝑋Xitalic_X such that each clause contains at least one true and at least one false literal?

Darmann and DΓΆcker [darmann_docker] demonstrated the NP-Completeness of this problem.

Theorem 6.

Graceful 4-colorablity is NP-complete for the class of 2-degenerate graphs of maximum degree 3.

Proof overview.

Given a boolean formula β„±=(X,C)ℱ𝑋𝐢\mathcal{F}=(X,C)caligraphic_F = ( italic_X , italic_C ) which is an instance of Positive Not-All-Equal 3333-Sat E4, we construct a graph G𝐺Gitalic_G by taking the variable-clause incidence graph Gβ„±subscript𝐺ℱG_{\mathcal{F}}italic_G start_POSTSUBSCRIPT caligraphic_F end_POSTSUBSCRIPT of the formula β„±β„±\mathcal{F}caligraphic_F, and then replacing each variable vertex xjsubscriptπ‘₯𝑗x_{j}italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT and incident edges by the variable gadget GXsuperscript𝐺𝑋G^{X}italic_G start_POSTSUPERSCRIPT italic_X end_POSTSUPERSCRIPT (see Figure 2) and replacing each clause vertex cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and incident edges by the clause gadget GCsuperscript𝐺𝐢G^{C}italic_G start_POSTSUPERSCRIPT italic_C end_POSTSUPERSCRIPT (see Figure 3).

Refer to caption
Figure 2: Variable gadget GXsuperscript𝐺𝑋G^{X}italic_G start_POSTSUPERSCRIPT italic_X end_POSTSUPERSCRIPT. Vertex xjsubscriptπ‘₯𝑗x_{j}italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT together with incident edges are replaced by this gadget, and the edges e1,e2,e3subscript𝑒1subscript𝑒2subscript𝑒3e_{1},e_{2},e_{3}italic_e start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_e start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_e start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT and e4subscript𝑒4e_{4}italic_e start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPT incident on xjsubscriptπ‘₯𝑗x_{j}italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT in Gβ„±subscript𝐺ℱG_{\mathcal{F}}italic_G start_POSTSUBSCRIPT caligraphic_F end_POSTSUBSCRIPT become the dashed edges of the gadget in G𝐺Gitalic_G.
c1ic_{1}{}_{i}italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT italic_i end_FLOATSUBSCRIPTc2ic_{2}{}_{i}italic_c start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT italic_i end_FLOATSUBSCRIPTcyic_{y}{}_{i}italic_c start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_FLOATSUBSCRIPT italic_i end_FLOATSUBSCRIPTc3ic_{3}{}_{i}italic_c start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT italic_i end_FLOATSUBSCRIPTczic_{z}{}_{i}italic_c start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT start_FLOATSUBSCRIPT italic_i end_FLOATSUBSCRIPTcxic_{x}{}_{i}italic_c start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT start_FLOATSUBSCRIPT italic_i end_FLOATSUBSCRIPTa1subscriptπ‘Ž1a_{1}italic_a start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPTa2subscriptπ‘Ž2a_{2}italic_a start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTa3subscriptπ‘Ž3a_{3}italic_a start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPTa4subscriptπ‘Ž4a_{4}italic_a start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPTa5subscriptπ‘Ž5a_{5}italic_a start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPTa6subscriptπ‘Ž6a_{6}italic_a start_POSTSUBSCRIPT 6 end_POSTSUBSCRIPTa7subscriptπ‘Ž7a_{7}italic_a start_POSTSUBSCRIPT 7 end_POSTSUBSCRIPTa8subscriptπ‘Ž8a_{8}italic_a start_POSTSUBSCRIPT 8 end_POSTSUBSCRIPTa9subscriptπ‘Ž9a_{9}italic_a start_POSTSUBSCRIPT 9 end_POSTSUBSCRIPTa10a_{1}{}_{0}italic_a start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT 0 end_FLOATSUBSCRIPTa11a_{1}{}_{1}italic_a start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT 1 end_FLOATSUBSCRIPTa12a_{1}{}_{2}italic_a start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT 2 end_FLOATSUBSCRIPTa19a_{1}{}_{9}italic_a start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT 9 end_FLOATSUBSCRIPTa20a_{2}{}_{0}italic_a start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT 0 end_FLOATSUBSCRIPTa21a_{2}{}_{1}italic_a start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_FLOATSUBSCRIPT 1 end_FLOATSUBSCRIPT
Figure 3: Clause gadget GCsuperscript𝐺𝐢G^{C}italic_G start_POSTSUPERSCRIPT italic_C end_POSTSUPERSCRIPT. Vertex cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT together with incident edges are replaced by this gadget, and the edges e1,e2subscript𝑒1subscript𝑒2e_{1},e_{2}italic_e start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_e start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT and e3subscript𝑒3e_{3}italic_e start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPT incident on cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT in Gβ„±subscript𝐺ℱG_{\mathcal{F}}italic_G start_POSTSUBSCRIPT caligraphic_F end_POSTSUBSCRIPT become the dashed edges of the gadget in G𝐺Gitalic_G.

We observe that for every graceful 4-coloring f𝑓fitalic_f of G𝐺Gitalic_G,
(i) f⁒(c1⁒i),f⁒(c2⁒i),f⁒(c3⁒i)∈{1,4}𝑓subscript𝑐1𝑖𝑓subscript𝑐2𝑖𝑓subscript𝑐3𝑖14f(c_{1i}),f(c_{2i}),f(c_{3i})\in\{1,4\}italic_f ( italic_c start_POSTSUBSCRIPT 1 italic_i end_POSTSUBSCRIPT ) , italic_f ( italic_c start_POSTSUBSCRIPT 2 italic_i end_POSTSUBSCRIPT ) , italic_f ( italic_c start_POSTSUBSCRIPT 3 italic_i end_POSTSUBSCRIPT ) ∈ { 1 , 4 } and not all equal for each i𝑖iitalic_i, and
(ii) f⁒(xl⁒j)=f⁒(xk⁒j)=f⁒(xm⁒j)=f⁒(xn⁒j)∈{1,4}𝑓subscriptπ‘₯𝑙𝑗𝑓subscriptπ‘₯π‘˜π‘—π‘“subscriptπ‘₯π‘šπ‘—π‘“subscriptπ‘₯𝑛𝑗14f(x_{lj})=f(x_{kj})=f(x_{mj})=f(x_{nj})\in\{1,4\}italic_f ( italic_x start_POSTSUBSCRIPT italic_l italic_j end_POSTSUBSCRIPT ) = italic_f ( italic_x start_POSTSUBSCRIPT italic_k italic_j end_POSTSUBSCRIPT ) = italic_f ( italic_x start_POSTSUBSCRIPT italic_m italic_j end_POSTSUBSCRIPT ) = italic_f ( italic_x start_POSTSUBSCRIPT italic_n italic_j end_POSTSUBSCRIPT ) ∈ { 1 , 4 } for all j𝑗jitalic_j.
Using these properties, we show that β„±β„±\mathcal{F}caligraphic_F is a yes instance of Positive Not-All-Equal 3333-Sat E4 whenever G𝐺Gitalic_G admits a graceful 4-coloring f𝑓fitalic_f. In the other direction, we show that if β„±β„±\mathcal{F}caligraphic_F is a yes instance of Positive Not-All-Equal 3333-Sat E4, then a graceful 4-coloring of G𝐺Gitalic_G can be obtained using the colorings schemes shown in Figure 4 and Figure 5. Consider a truth assignment π’œπ’œ\mathcal{A}caligraphic_A for the formula β„±β„±\mathcal{F}caligraphic_F such that each clause contains a true variable and a false variable. If a variable xjsubscriptπ‘₯𝑗x_{j}italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT is true under π’œπ’œ\mathcal{A}caligraphic_A, then color the corresponding variable gadget GXsuperscript𝐺𝑋G^{X}italic_G start_POSTSUPERSCRIPT italic_X end_POSTSUPERSCRIPT by the coloring hβ„Žhitalic_h shown in Figure 4. If a variable xjsubscriptπ‘₯𝑗x_{j}italic_x start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT is false under π’œπ’œ\mathcal{A}caligraphic_A, then color the corresponding variable gadget GXsuperscript𝐺𝑋G^{X}italic_G start_POSTSUPERSCRIPT italic_X end_POSTSUPERSCRIPT using the β€˜opposite’ colors of that shown in Figure 4 (i.e., color each vertex v𝑣vitalic_v in the gadget using the color 5βˆ’h⁒(v)5β„Žπ‘£5-h(v)5 - italic_h ( italic_v )). This can be extended to a graceful 4-coloring of G𝐺Gitalic_G by coloring each clause gadget by one of the colorings in Figure 5 or a suitable angular rotation of them. ∎

Refer to caption
Figure 4: A graceful 4-coloring hβ„Žhitalic_h of GXsuperscript𝐺𝑋G^{X}italic_G start_POSTSUPERSCRIPT italic_X end_POSTSUPERSCRIPT.
Refer to caption
Figure 5: Two graceful 4-colorings of GCsuperscript𝐺𝐢G^{C}italic_G start_POSTSUPERSCRIPT italic_C end_POSTSUPERSCRIPT
\printbibliography