Notes on complexity of packing coloring
NNotes on complexity of packing coloring
Minki Kim ∗ Bernard Lidick´y † Tom´aˇs Masaˇr´ık ‡ Florian Pfender § Abstract
A packing k -coloring for some integer k of a graph G = ( V, E ) is a mapping ϕ : V → { , . . . , k } such that any two vertices u, v of color ϕ ( u ) = ϕ ( v ) are in distanceat least ϕ ( u ) + 1. This concept is motivated by frequency assignment problems. The packing chromatic number of G is the smallest k such that there exists a packing k -coloring of G .Fiala and Golovach showed that determining the packing chromatic number forchordal graphs is NP-complete for diameter exactly 5. While the problem is easyto solve for diameter 2, we show NP-completeness for any diameter at least 3. Ourreduction also shows that the packing chromatic number is hard to approximate within n / − ε for any ε > Given a graph G = ( V, E ) and an integer k , a packing k -coloring is a mapping ϕ : V →{ , . . . , k } such that any two vertices u, v of color ϕ ( u ) = ϕ ( v ) are in distance at least ϕ ( u ) + 1.An equivalent way of defining the packing k -coloring of G is that it is a partition of V intosets V , . . . , V k such that for all k and any u, v ∈ V k , the distance between u and v is at least k + 1. The packing chromatic number of G , denoted χ P ( G ), is the smallest k such thereexists a packing k -coloring of G .The definition of packing k -coloring is motivated by frequency assignment problems. Itemphasizes the fact that the signal on different frequencies can travel different distances. Inparticular, lower frequencies, modeled by higher colors, travel further so they may be used ∗ Department of Mathematical Sciences, KAIST, Daejeon, South Korea, E-mail: [email protected] . † Department of Mathematics, Iowa State University, Ames, IA, E-mail: [email protected] . Researchof this author is supported in part by NSF grant DMS-1600390. ‡ Department of Applied Mathematics of the Faculty of Mathematics and Physics at the Charles University,Prague, Czech Republic. E-mail: [email protected]
Research of this author is supported by thegrant SVV–2017–260452 and by the project GA17-091425 of GA ˇCR. § Department of Mathematical and Statistical Sciences, University of Colorado Denver, E-mail:
[email protected] . Research of this author is supported in part by NSF grant DMS-1600483. a r X i v : . [ c s . CC ] D ec ess often than higher frequencies. The packing coloring problem was introduced by Goddardet al. [10] under the name broadcasting chromatic number . The term packing coloring wasintroduced by Breˇsar, Klavˇzar, and Rall [2].Determining the packing chromatic number is often difficult. For example, Sloper [13]showed that the packing chromatic number of the infinite 3-regular tree is 7 but the infinite4-regular tree does not admit any packing coloring by a finite number of colors. Resultsof Breˇsar, Klavˇzar, and Rall [2] and Fiala, Klavˇzar and Lidick´y [7] imply that the packingchromatic number of the infinite hexagonal lattice is 7.Looking at these examples, researchers asked the question if there exists a constant p such that every subcubic graph has packing chromatic number bounded by p . A very recentresult of Balogh, Kostochka and Liu [1] shows that there is no such p in quite a strong sense.They show that for every fixed k and g ≥ k + 2, almost every n -vertex cubic graph of girthat least g has packing chromatic number greater than k . It is still open if a constant boundholds for planar subcubic graphs, and no deterministic construction of subcubic graphs witharbitrarily high packing chromatic number is known.Despite a lot of effort [7, 10, 12, 14], the packing chromatic number of the square grid isstill not determined. It is known to be between 13 and 15 due to Barnaby, Franco, Taolue,and Jos [12], who use state of the art SAT-solvers to tackle the problem.In this paper, we consider the packing coloring problem from the computational complexitypoint of view. In particular, we study the following problem. Packing k -coloring of a graph Input:
A graph G and a positive integer k . Question:
Does G allow a packing k -coloring? We characterize our algorithmic parameterized results in terms of FPT (running time f ( k )poly( n )) and XP (running time n f ( k ) ) where n is the size of the input, k is the pa-rameter and f is any computable function.The investigation of computational complexity of packing coloring was started by Goddardet al. [10] in 2008. They showed that packing k -coloring is NP-complete for generalgraphs and k = 4 and it is polynomial time solvable for k ≤
3. Fiala and Golovach [6] showedthat packing k -coloring is NP-complete for trees for large k (dependent on the numberof vertices).For a fixed k , packing k -coloring is expressible in MSO logic. Thus, due to Courcelle’stheorem [3], it admits a fixed parameter tractable (FPT) algorithm parameterized by thetreewidth or clique width [4] of the graph. Moreover, it is solvable in polynomial time if boththe treewidth and the diameter are bounded [6]. The problem remains in FPT even if wefix the number of colors that can be used more than once by the extended framework ofCourcelle, Makowsky and Rotics [4], see Theorem 11. On the other hand, the problem isNP-complete for chordal graphs of diameter exactly 5 [6], and it is polynomial time solvable2or split graphs [10]. Note that split graphs are chordal and have diameter at most 3. However, packing k -coloring admits an FPT algorithm on chordal graphs parameterized by k [6]. We split our results into two parts.In Section 2, we describe new complexity results on chordal, interval and proper intervalgraphs. We improve a result by Fiala and Golovach [6] to chordal graphs of any diametergreater or equal than three. Moreover, we imply an inapproximability result (Theorem 5).Chordal graphs of diameter less than three are polynomial time solvable (Proposition 3). Wecomplement these results by several FPT and XP algorithms on interval and proper intervalgraphs. We use dynamic programming as an XP algorithm for interval graphs of boundeddiameter (Theorems 6). For unit interval graphs, there is an FPT algorithm parameterizedby the size of the largest clique (Theorem 9). Note that the existence of an FPT algorithmparameterized by path-width would imply an FPT algorithm for general interval graphsparameterized by the size of the largest clique, but this remains unknown. We provide anXP algorithm for interval graphs parameterized by the number of colors that can be usedmore than once (Theorem 10).In Section 3, we describe complexity results and algorithms parameterized by structuralparameters. We design FPT algorithms for them. For standard notation and terminology werefer to the recent book about parameterized complexity [5].The packing coloring problem is interesting only when the number of colors is not bounded.Otherwise, we can easily model the problem by a fixed MSO formula and use the FPTalgorithm by Courcelle [3] parameterized by the clique width of the graph. We show that wecan do a similar modeling even when we fix only the number of colors that can be used morethan once and then use a stronger result by Courcelle, Makowski and Rotics [4] that gives anFPT algorithm parameterized by clique width of the graph (Theorem 11).If the number of such colors is part of the input, then we can solve the problem on severalstructural graph classes. If a structural graph class has bounded diameter, then we can useTheorem 11 due to the following easy observation. Observation 1.
Let G be a graph of bounded diameter. Then G has a bounded number ofcolors that can be used more than once.This observation together with Theorem 11 implies that the problem is FPT for any classof graphs of bounded shrub depth. Any class of graphs that has bounded shrub depth has abounded length of induced paths ([9], Theorem 3.7) and thus bounded diameter. The sameholds for graphs of bounded modular width as they have bounded diameter according toObservation 2. On the other hand, the problem was shown to be hard on graphs of boundedtreewidth [6], in fact the problem is NP-hard even on trees. There seems to be a big gapand thus interesting question about parameterized complexity with respect to pathwidth ofthe graph. It still remains open (Question 14). Note that the original hardness reduction byFiala and Golovach [6] has unbounded pathwidth since it contains large stars.We refer [8] for the definition of modular width and its construction operations.3 bservation 2. Let G be a graph of modular width k . Then G has diameter at mostmax( k, Proof.
We look at the last step of the decomposition. It has to create a connected graph andthus it is either a join operation or a template operation. If it is the join operation then thediameter is at most 2 and if it is the template operation the longest path between any twovertices in different operands is at most k and if they are in the same operand their distanceis at most 2.See Figure 3 for an overview of the results with respect to the structural parameters. Proposition 3.
Packing chromatic number is in P for chordal graphs of diameter 2.Proof. Let G be a chordal graph of diameter 2. Notice that in graphs of diameter 2, the onlycolor that can be used more than once is color 1. Hence, determining the packing chromaticnumber of G is equivalent to finding a largest independent set in G . In chordal graphs,the larges independent set can be found in polynomial time. Hence χ P ( G ) can be found inpolynomial time.For larger diameters, we use a similar reduction as Fiala and Golovach [6] to finding alargest independent set in a general graph. ZPP is a complexity class of problems whichcan be solved in expected polynomial time by a probabilistic algorithm that never makes anerror. It lies between P and NP (P ⊆ ZPP ⊆ NP). It is strongly believed that ZPP (cid:54) = NP.H˚astad [11] showed that finding a largest independent set is hard to approximate.
Theorem 4 (H˚astad [11]) . Unless
NP = ZPP , Max-Clique cannot be approximated within n − ε for any ε > . Together with our reduction, this implies that the packing chromatic number is hard toapproximate.
Theorem 5.
Packing chromatic number is NP -complete on chordal graphs of any diameterat least 3. Moreover, it is hard to approximate within n / − ε for any ε > , unless NP = ZPP .Proof.
We use a reduction to the independent set problem. Let G be any connected graphon n vertices. We construct a chordal graph H of diameter d ≥ G by the followingsequence of operations:(a) start with G , denote the set of its vertices by V ,(b) subdivide every edge once, denote the set of new vertices by S ,(c) add all possible edges between vertices in S ,4a) (b) (c) (d) . . . (e)Figure 1: The reduction from Theorem 5 on a 4-cycle.(d) for every v ∈ V add a duplicate vertex v (cid:48) and the edge vv (cid:48) ; denote the set of new duplicatevertices by D ,(e) to increase the diameter to d >
3, add a path P of length d − S .See Figure 1 for an example of the construction.We will choose a packing coloring ϕ of H with χ P ( H ) colors. Notice that the graphinduced by V ∪ S ∪ D has diameter at most three. Hence, only colors 1 and 2 can be usedmore than once on V ∪ S ∪ D . We call colors other than 1 and 2 unique . Notice that we canfreely permute the unique colors. Pick ϕ in a way to maximize the number of unique colorsamong vertices in S , and subject to that, to maximize the number of vertices in D colored 1.We will show that S has only vertices of unique colors and all vertices in D are colored 1.Suppose for the sake of contradiction that there is a vertex s ∈ S colored 1 or 2. Since S is a clique, s is the only vertex in S with this color. Let u ∈ D ∪ V be a neighbor of s with aunique color. Such a vertex must exist since s has four neighbors in D ∪ V , and at most twocan be colored by 1 and 2. Observe that by the construction of H , the closed neighborhood N [ u ] ⊆ N [ s ]. Thus, for every vertex w (cid:54) = u , the distance d ( w, u ) ≤ d ( w, s ). Hence, we canswap the colors on s and u , contradicting the choice of ϕ . Therefore, all vertices in S haveunique colors.Now let x ∈ D and let v be its unique neighbor in V . If v has color 1, we can swap thecolors on x and v , contradicting our choice of ϕ . Therefore, no vertices in N ( x ) have color 1,and thus x has color 1 by our choice of ϕ .Since all vertices in D are colored 1, no vertex in V can be colored 1. Minimizing thenumber of unique colors on V is the same as maximizing the number of vertices colored 2.By the distance constraints in H , a subset of V can be colored 2 in H if and only if it is anindependent set in G . Therefore, the vertices colored 2 in V form a largest independent setin G .Recall that in order to increase the diameter of H , we added the path P with one endpoint s ∈ S in step (e). Notice that P can be colored by a pattern of four colors starting in s : ϕ ( s ) , , , , , , , , , . . . . The existence of the path neither increases χ P ( H ) nor influencesthe coloring ϕ in V ∪ D ∪ S . 5inally, notice that H has at most (cid:0) n (cid:1) + 2 n + d − χ P ( H ) with precision ( n ) / − ε for some ε >
0, we could approximate largest independentset in G with precision n − ε , which contradicts Theorem 4. Theorem 6.
Packing chromatic number for interval graphs of diameter at most d can besolved in time O ( n d ln(5 d ) ) .Proof. Let ϕ be a packing coloring of an interval graph G with diameter d , and let P be adiameter path in G . Note that every interval corresponding to a vertex of G intersects aninterval corresponding to an internal vertex of P . Suppose X is a set colored by color c ≥ ϕ . Let x , x ∈ X , and let p , p ∈ V ( P ) such that x p , x p ∈ E ( G ). Then the distancebetween p and p is at least c −
1. Therefore, | X | ≤ d − c − + 1.Therefore, only colors 1 , . . . , d − ϕ . Notice that thenumber of vertices colored by 2 , . . . , d − f ( d ) = (cid:88) ≤ c ≤ d − (cid:18) d − c − (cid:19) = ( d − H ( d − < d ln(5 d ) − , where H ( n ) is the harmonic number. There are at most n f ( d ) such partial colorings of G bycolors 2 , . . . , d −
1. Finally, vertices colored by 1 form an independent set. Therefore, thefollowing is an algorithm to find the packing chromatic number of G .Enumerate all n f ( d ) partial colorings by colors 2 , . . . , d −
1. For each partial coloring,find a maximum independent set in the remaining graph, which takes time O ( n ) and colorthe remaining vertices with unique colors. The whole algorithm runs in time O ( n f ( d )+1 ) = O ( n d ln(5 d ) ).When restricting the class of graphs to unit interval graphs, we can find an FPT algorithmparametrized by the size of the largest clique, independent of diameter. We need the followingtwo results. Lemma 7 (Goddard et al. [10]) . For every s ∈ N , the infinite path can be colored by colors s, s + 1 , . . . , s + 2 . Proposition 8 (Fiala and Golovach [6]) . Chordal graphs admit an
FPT algorithm parame-terized by the number of colors used in the solution.
Theorem 9.
Packing chromatic number for unit interval graphs with a largest clique of sizeat most k is FPT in k .Proof. Let G be a unit interval graph. As G is perfect, we can find a partition of its vertex setinto k independence sets X , . . . , X k in polynomial time. Let X (cid:96) = { v , v , . . . , v | X (cid:96) | } , wherethe v i are ordered corresponding to their interval representation. Note that for all i < j , thedistance of v i and v j in G is at least j − i . This implies that any packing coloring of a pathon | X (cid:96) | vertices can be used to packing color the set X (cid:96) without conflicts.Use Lemma 7 to color each X (cid:96) with colors { (3 (cid:96) − −
1) + 1 , . . . , (3 (cid:96) − } , and noticethat these color sets are disjoint. This yields a packing coloring of G with at most (3 k − k , and we can applyTheorem 8 to conclude the proof. 6n the previous argument, we saw that restricting the number of colors makes the problemsimpler. While we obviously do not have such a restriction for all interval graphs, we canstill achieve a result about partial packing colorings with a bounded number of colors alongsimilar ideas. Theorem 10.
Let k be fixed and G be an interval graph. Finding a partial coloring by colors , . . . , k that is maximizing the number of colored vertices can be solved in time O ( n k +2 ) .Proof. We compute a function H ( u , . . . , u k ) → N , which counts the maximum number ofcolored vertices such that u i has its interval with the right end-point most to the rightamong all vertices colored by color i . The domain of H is ( V ∪ { N } ) k , where N is a symbolrepresenting that a particular color was not used at all. It is possible to compute H usingdynamic programming in time O ( n k +2 ).Notice that Theorem 10 implies Theorem 6 with a smaller exponent in the running time. vc ndmwtdpwtw cwtcsd Figure 2: Hierarchy of graph parameters. An arrow in-dicates that a graph parameter upper-bounds the other.Thus, hardness results are implied in direction of arrowsand algorithms are implied in the reverse direction. Greencircles and red rectangle colors distinguish between hard-ness results and FPT algorithms provided. Blue colorwithout boundary denotes that the hardness is unknown.( cw is clique width, nd is neighborhood diversity, mw ismodular width, pw is path width, sd is shrub depth, tc istwin cover, td is tree depth, tw is tree width, vc is vertexcover. See [5] for definitions.) Theorem 11.
Let k be fixed and G = ( V, E ) be a graph of clique width q . Finding a partialpacking coloring by colors , . . . , k that is maximizing the number of colored vertices can besolved in FPT time parameterized by q .Proof. We model the problem as an extended formulation in MSO logic with one free variable X that represents the large colors. We use a result by Courcelle, Makowski and Rotics [4] tosolve this formula ϕ ( X ) on graphs of clique width q in FPT time such that it minimize thesize of the set X . ϕ ( X ) | = ∃ X , . . . X k ⊆ V s.t. ∀ i i -independent( X i ) ∧ V = X ˙ ∪ X ˙ ∪ · · · ˙ ∪ X k .i -independent( X ) | = ∀ x, y ∈ X d ( x, y ) ≥ i. ( x, y ) ≥ i | = (cid:64) z , . . . , z i − ∈ V s.t. x = z ∧ y = z i − ∧ ∪ i − j =1 (edge( z j , z j +1 ) ∨ ( z j = z j +1 )) . Although the diameter is a widely investigated structural parameter we found that in somecases a related parameter better captures the problem, namely the number of colors that canbe used more than once, as we show in Theorem 10.We close with a few open questions.
Question 12.
Is determining the packing chromatic number for (unit) interval graphs in Por is it NP-hard?
Question 13.
Is determining the packing chromatic number for interval graphs FPT whenparametrized by the largest clique size?One can think of graphs of bounded path-width as a generalization of interval graphswith bounded clique size. This leads to the following question.
Question 14.
Is determining the packing chromatic number FPT or XP when parametrizedby the path width?Notice that Theorem 9 could be modified to work on graphs of bounded path width thathave a decomposition such that every vertex is in a bounded number of bags.
Acknowledgements
All authors were supported in part by NSF-DMS Grants
References [1] J. Balogh, A. Kostochka, and X. Liu. Packing chromatic number of subcubic graphs,2017.[2] B. Breˇsar, S. Klavˇzar, and D. F. Rall. On the packing chromatic number of Cartesianproducts, hexagonal lattice, and trees.
Discrete Appl. Math. , 155(17):2303–2311, 2007.[3] B. Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finitegraphs.
Inf. Comput. , 85(1):12–75, 1990.[4] B. Courcelle, J. A. Makowsky, and U. Rotics. Linear time solvable optimization problemson graphs of bounded clique-width.
Theory of Computing Systems , 33(2):125–150, 2000.85] M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk,and S. Saurabh.
Parameterized Algorithms . Springer, 2015.[6] J. Fiala and P. A. Golovach. Complexity of the packing coloring problem for trees.
Discrete Appl. Math. , 158(7):771–778, 2010.[7] J. Fiala, S. Klavˇzar, and B. Lidick´y. The packing chromatic number of infinite productgraphs.
European J. Combin. , 30(5):1101–1113, 2009.[8] J. Gajarsk´y, M. Lampis, and S. Ordyniak.
Parameterized Algorithms for Modular-Width ,pages 163–176. Springer International Publishing, Cham, 2013.[9] R. Ganian, P. Hlinˇen´y, J. Neˇsetˇril, J. Obdrˇz´alek, and P. O. de Mendez. Shrub-depth:Capturing height of dense graphs. arXiv preprint arXiv:1707.00359 , 2017.[10] W. Goddard, S. M. Hedetniemi, S. T. Hedetniemi, J. M. Harris, and D. F. Rall. Broadcastchromatic numbers of graphs.
Ars Combin. , 86:33–49, 2008.[11] J. H˚astad. Clique is hard to approximate within n − (cid:15) . Acta Math. , 182(1):105–142, 1999.[12] B. Martin, F. Raimondi, T. Chen, and J. Martin. The packing chromatic number of theinfinite square lattice is between 13 and 15.
Discrete Appl. Math. , 225:136–142, 2017.[13] C. Sloper. An eccentric coloring of trees.
Australas. J. Combin. , 29:309–321, 2004.[14] R. Soukal and P. Holub. A note on packing chromatic number of the square lattice.