    # Notes on complexity of packing coloring

A packing k-coloring for some integer k of a graph G=(V,E) is a mapping φ:V→{1,...,k} such that any two vertices u, v of color φ(u)=φ(v) are in distance at 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 for chordal graphs is -complete for diameter exactly 5. While the problem is easy to solve for diameter 2, we show -completeness for any diameter at least 3. Our reduction also shows that the packing chromatic number is hard to approximate within n^1/2-ε for any ε > 0. In addition, we design an algorithm for interval graphs of bounded diameter. This leads us to exploring the problem of finding a partial coloring that maximizes the number of colored vertices.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Given a graph and an integer , a packing -coloring is a mapping such that any two vertices of color are in distance at least . An equivalent way of defining the packing -coloring of is that it is a partition of into sets such that for all and any , the distance between and is at least . The packing chromatic number of , denoted , is the smallest such there exists a packing -coloring of .

The definition of packing -coloring is motivated by frequency assignment problems. It emphasizes the fact that the signal on different frequencies can travel different distances. In particular, lower frequencies, modeled by higher colors, travel further so they may be used less often than higher frequencies. The packing coloring problem was introduced by Goddard et al.  under the name broadcasting chromatic number. The term packing coloring was introduced by Brešar, Klavžar, and Rall .

Determining the packing chromatic number is often difficult. For example, Sloper  showed that the packing chromatic number of the infinite 3-regular tree is 7 but the infinite 4-regular tree does not admit any packing coloring by a finite number of colors. Results of Brešar, Klavžar, and Rall  and Fiala, Klavžar and Lidický  imply that the packing chromatic number of the infinite hexagonal lattice is 7.

Looking at these examples, researchers asked the question if there exists a constant such that every subcubic graph has packing chromatic number bounded by . A very recent result of Balogh, Kostochka and Liu  shows that there is no such in quite a strong sense. They show that for every fixed and , almost every -vertex cubic graph of girth at least has packing chromatic number greater than . It is still open if a constant bound holds for planar subcubic graphs, and no deterministic construction of subcubic graphs with arbitrarily high packing chromatic number is known.

Despite a lot of effort [7, 10, 12, 14], the packing chromatic number of the square grid is still not determined. It is known to be between 13 and 15 due to Barnaby, Franco, Taolue, and Jos , who use state of the art SAT-solvers to tackle the problem.

In this paper, we consider the packing coloring problem from the computational complexity point of view. In particular, we study the following problem.

Packing -coloring of a graph
Input: A graph and a positive integer .
Question: Does allow a packing -coloring?

### 1.1 Known results

We characterize our algorithmic parameterized results in terms of (running time ) and (running time ) where is the size of the input, is the parameter and is any computable function.

The investigation of computational complexity of packing coloring was started by Goddard et al.  in 2008. They showed that packing -coloring is -complete for general graphs and and it is polynomial time solvable for . Fiala and Golovach  showed that packing -coloring is -complete for trees for large (dependent on the number of vertices).

For a fixed , packing -coloring is expressible in logic. Thus, due to Courcelle’s theorem , it admits a fixed parameter tractable () algorithm parameterized by the treewidth or clique width  of the graph. Moreover, it is solvable in polynomial time if both the treewidth and the diameter are bounded . The problem remains in even if we fix the number of colors that can be used more than once by the extended framework of Courcelle, Makowsky and Rotics , see Theorem 11. On the other hand, the problem is -complete for chordal graphs of diameter exactly 5 , and it is polynomial time solvable for split graphs . Note that split graphs are chordal and have diameter at most 3. However, packing -coloring admits an algorithm on chordal graphs parameterized by  .

### 1.2 Our results and structure of the paper

We split our results into two parts.

In Section 2, we describe new complexity results on chordal, interval and proper interval graphs. We improve a result by Fiala and Golovach  to chordal graphs of any diameter greater 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). We complement these results by several and algorithms on interval and proper interval graphs. We use dynamic programming as an algorithm for interval graphs of bounded diameter (Theorems 6). For unit interval graphs, there is an algorithm parameterized by the size of the largest clique (Theorem 9). Note that the existence of an algorithm parameterized by path-width would imply an algorithm for general interval graphs parameterized by the size of the largest clique, but this remains unknown. We provide an algorithm for interval graphs parameterized by the number of colors that can be used more than once (Theorem 10).

In Section 3, we describe complexity results and algorithms parameterized by structural parameters. We design algorithms for them. For standard notation and terminology we refer to the recent book about parameterized complexity .

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 formula and use the algorithm by Courcelle  parameterized by the clique width of the graph. We show that we can do a similar modeling even when we fix only the number of colors that can be used more than once and then use a stronger result by Courcelle, Makowski and Rotics  that gives an 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 several structural graph classes. If a structural graph class has bounded diameter, then we can use Theorem 11 due to the following easy observation.

###### Observation 1.

Let be a graph of bounded diameter. Then has a bounded number of colors that can be used more than once.

This observation together with Theorem 11 implies that the problem is for any class of graphs of bounded shrub depth. Any class of graphs that has bounded shrub depth has a bounded length of induced paths (, Theorem 3.7) and thus bounded diameter. The same holds for graphs of bounded modular width as they have bounded diameter according to Observation 2. On the other hand, the problem was shown to be hard on graphs of bounded treewidth , in fact the problem is -hard even on trees. There seems to be a big gap and thus interesting question about parameterized complexity with respect to pathwidth of the graph. It still remains open (Question 14). Note that the original hardness reduction by Fiala and Golovach  has unbounded pathwidth since it contains large stars.

We refer  for the definition of modular width and its construction operations.

###### Observation 2.

Let be a graph of modular width . Then has diameter at most .

###### Proof.

We look at the last step of the decomposition. It has to create a connected graph and thus it is either a join operation or a template operation. If it is the join operation then the diameter is at most and if it is the template operation the longest path between any two vertices in different operands is at most and if they are in the same operand their distance is at most . ∎

See Figure 2 for an overview of the results with respect to the structural parameters.

## 2 Chordal and Interval graphs

###### Proposition 3.

Packing chromatic number is in for chordal graphs of diameter 2.

###### Proof.

Let be a chordal graph of diameter . Notice that in graphs of diameter , the only color that can be used more than once is color 1. Hence, determining the packing chromatic number of is equivalent to finding a largest independent set in . In chordal graphs, the larges independent set can be found in polynomial time. Hence can be found in polynomial time. ∎

For larger diameters, we use a similar reduction as Fiala and Golovach  to finding a largest independent set in a general graph. is a complexity class of problems which can be solved in expected polynomial time by a probabilistic algorithm that never makes an error. It lies between and (). It is strongly believed that . Håstad  showed that finding a largest independent set is hard to approximate.

Unless , Max-Clique cannot be approximated within for any .

Together with our reduction, this implies that the packing chromatic number is hard to approximate.

###### Theorem 5.

Packing chromatic number is -complete on chordal graphs of any diameter at least 3. Moreover, it is hard to approximate within for any , unless .

###### Proof.

We use a reduction to the independent set problem. Let be any connected graph on vertices. We construct a chordal graph of diameter from by the following sequence of operations:

1. start with , denote the set of its vertices by ,

2. subdivide every edge once, denote the set of new vertices by ,

3. add all possible edges between vertices in ,

4. for every add a duplicate vertex and the edge ; denote the set of new duplicate vertices by ,

5. to increase the diameter to , add a path of length starting in one vertex in .

See Figure 1 for an example of the construction.

We will choose a packing coloring of with colors. Notice that the graph induced by has diameter at most three. Hence, only colors 1 and 2 can be used more than once on . We call colors other than 1 and 2 unique. Notice that we can freely permute the unique colors. Pick in a way to maximize the number of unique colors among vertices in , and subject to that, to maximize the number of vertices in colored 1. We will show that has only vertices of unique colors and all vertices in are colored 1.

Suppose for the sake of contradiction that there is a vertex colored 1 or 2. Since is a clique, is the only vertex in with this color. Let be a neighbor of with a unique color. Such a vertex must exist since has four neighbors in , and at most two can be colored by 1 and 2. Observe that by the construction of , the closed neighborhood . Thus, for every vertex , the distance . Hence, we can swap the colors on and , contradicting the choice of . Therefore, all vertices in have unique colors.

Now let and let be its unique neighbor in . If has color 1, we can swap the colors on and , contradicting our choice of . Therefore, no vertices in have color 1, and thus has color 1 by our choice of .

Since all vertices in are colored 1, no vertex in can be colored 1. Minimizing the number of unique colors on is the same as maximizing the number of vertices colored 2. By the distance constraints in , a subset of can be colored 2 in if and only if it is an independent set in . Therefore, the vertices colored in form a largest independent set in .

Recall that in order to increase the diameter of , we added the path with one endpoint in step (e). Notice that can be colored by a pattern of four colors starting in : . The existence of the path neither increases nor influences the coloring in .

Finally, notice that has at most vertices. Hence, if we could approximate with precision for some , we could approximate largest independent set in with precision , which contradicts Theorem 4. ∎

###### Theorem 6.

Packing chromatic number for interval graphs of diameter at most can be solved in time .

###### Proof.

Let be a packing coloring of an interval graph with diameter , and let be a diameter path in . Note that every interval corresponding to a vertex of intersects an interval corresponding to an internal vertex of . Suppose is a set colored by color in . Let , and let such that . Then the distance between and is at least . Therefore, .

Therefore, only colors can be used more than once by . Notice that the number of vertices colored by is upper bounded by

 f(d)=∑2≤c≤d−1(d−2c−1+1)=(d−2)(1+H(d−2))

where is the harmonic number. There are at most such partial colorings of by colors . Finally, vertices colored by 1 form an independent set. Therefore, the following is an algorithm to find the packing chromatic number of .

Enumerate all partial colorings by colors . For each partial coloring, find a maximum independent set in the remaining graph, which takes time and color the remaining vertices with unique colors. The whole algorithm runs in time . ∎

When restricting the class of graphs to unit interval graphs, we can find an FPT algorithm parametrized by the size of the largest clique, independent of diameter. We need the following two results.

###### Lemma 7 (Goddard et al. ).

For every , the infinite path can be colored by colors .

###### Proposition 8 (Fiala and Golovach ).

Chordal graphs admit an algorithm parameterized by the number of colors used in the solution.

###### Theorem 9.

Packing chromatic number for unit interval graphs with a largest clique of size at most is in .

###### Proof.

Let be a unit interval graph. As is perfect, we can find a partition of its vertex set into independence sets in polynomial time. Let , where the are ordered corresponding to their interval representation. Note that for all , the distance of and in is at least . This implies that any packing coloring of a path on vertices can be used to packing color the set without conflicts.

Use Lemma 7 to color each with colors , and notice that these color sets are disjoint. This yields a packing coloring of with at most colors. Therefore, the number of colors we need is bounded in terms of , and we can apply Theorem 8 to conclude the proof. ∎

In the previous argument, we saw that restricting the number of colors makes the problem simpler. While we obviously do not have such a restriction for all interval graphs, we can still achieve a result about partial packing colorings with a bounded number of colors along similar ideas.

###### Theorem 10.

Let be fixed and be an interval graph. Finding a partial coloring by colors that is maximizing the number of colored vertices can be solved in time .

###### Proof.

We compute a function , which counts the maximum number of colored vertices such that has its interval with the right end-point most to the right among all vertices colored by color . The domain of is , where is a symbol representing that a particular color was not used at all. It is possible to compute using dynamic programming in time . ∎

Notice that Theorem 10 implies Theorem 6 with a smaller exponent in the running time.

## 3 Structural parameters

###### Theorem 11.

Let be fixed and be a graph of clique width . Finding a partial packing coloring by colors that is maximizing the number of colored vertices can be solved in time parameterized by .

###### Proof.

We model the problem as an extended formulation in logic with one free variable that represents the large colors. We use a result by Courcelle, Makowski and Rotics  to solve this formula on graphs of clique width in time such that it minimize the size of the set .

 φ(X)⊨∃X1,…Xk⊆V s.t. ∀i i-independent(Xi)∧V=X˙∪X1˙∪⋯˙∪Xk.
 i-independent(X)⊨∀x,y∈X d(x,y)≥i.
 d(x,y)≥i⊨∄z1,…,zi−1∈V s.t. x=z1∧y=zi−1∧∪i−2j=1(edge(zj,zj+1)∨(zj=zj+1)).

## 4 Conclusion

Although the diameter is a widely investigated structural parameter we found that in some cases a related parameter better captures the problem, namely the number of colors that can be 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 or is it -hard?

###### Question 13.

Is determining the packing chromatic number for interval graphs when parametrized by the largest clique size?

One can think of graphs of bounded path-width as a generalization of interval graphs with bounded clique size. This leads to the following question.

###### Question 14.

Is determining the packing chromatic number or when parametrized by the path width?

Notice that Theorem 9 could be modified to work on graphs of bounded path width that have a decomposition such that every vertex is in a bounded number of bags.

#### Acknowledgements

All authors were supported in part by NSF-DMS Grants #1604458, #1604773, #1604697 and #1603823,“Collaborative Research: Rocky Mountain - Great Plains Graduate Research Workshops in Combinatorics”.

## References

•  J. Balogh, A. Kostochka, and X. Liu. Packing chromatic number of subcubic graphs, 2017.
•  B. Brešar, S. Klavžar, and D. F. Rall. On the packing chromatic number of Cartesian products, hexagonal lattice, and trees. Discrete Appl. Math., 155(17):2303–2311, 2007.
•  B. Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finite graphs. Inf. Comput., 85(1):12–75, 1990.
•  B. Courcelle, J. A. Makowsky, and U. Rotics. Linear time solvable optimization problems on graphs of bounded clique-width. Theory of Computing Systems, 33(2):125–150, 2000.
•  M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized Algorithms. Springer, 2015.
•  J. Fiala and P. A. Golovach. Complexity of the packing coloring problem for trees. Discrete Appl. Math., 158(7):771–778, 2010.
•  J. Fiala, S. Klavžar, and B. Lidický. The packing chromatic number of infinite product graphs. European J. Combin., 30(5):1101–1113, 2009.
•  J. Gajarský, M. Lampis, and S. Ordyniak. Parameterized Algorithms for Modular-Width, pages 163–176. Springer International Publishing, Cham, 2013.
•  R. Ganian, P. Hliněný, J. Nešetřil, J. Obdržálek, and P. O. de Mendez. Shrub-depth: Capturing height of dense graphs. arXiv preprint arXiv:1707.00359, 2017.
•  W. Goddard, S. M. Hedetniemi, S. T. Hedetniemi, J. M. Harris, and D. F. Rall. Broadcast chromatic numbers of graphs. Ars Combin., 86:33–49, 2008.
•  J. Håstad. Clique is hard to approximate within . Acta Math., 182(1):105–142, 1999.
•  B. Martin, F. Raimondi, T. Chen, and J. Martin. The packing chromatic number of the infinite square lattice is between 13 and 15. Discrete Appl. Math., 225:136–142, 2017.
•  C. Sloper. An eccentric coloring of trees. Australas. J. Combin., 29:309–321, 2004.
•  R. Soukal and P. Holub. A note on packing chromatic number of the square lattice. Electron. J. Combin., 17(1):Note 17, 7, 2010.