# Parameterized Complexity of Equitable Coloring

A graph on n vertices is equitably k-colorable if it is k-colorable and every color is used either n/k or n/k times. Such a problem appears to be considerably harder than vertex coloring, being NP-Complete even for cographs and interval graphs. In this work, we prove that it is W[1]-Hard for block graphs and for disjoint union of split graphs when parameterized by the number of colors; and W[1]-Hard for K_1,4-free interval graphs when parameterized by treewidth, number of colors and maximum degree, generalizing a result by Fellows et al. (2014) through a much simpler reduction. Using a previous result due to Dominique de Werra (1985), we establish a dichotomy for the complexity of equitable coloring of chordal graphs based on the size of the largest induced star. Finally, we show that equitable coloring is FPT when parameterized by the treewidth of the complement graph.

There are no comments yet.

## Authors

• 1 publication
• 4 publications
• 11 publications
• ### Complexity of tree-coloring interval graphs equitably

An equitable tree-k-coloring of a graph is a vertex k-coloring such that...
03/09/2020 ∙ by Bei Niu, et al. ∙ 0

• ### A Complexity Dichotomy for Critical Values of the b-Chromatic Number of Graphs

A b-coloring of a graph G is a proper coloring of its vertices such that...
11/09/2018 ∙ by Lars Jaffke, et al. ∙ 0

• ### Grundy Coloring friends, Half-Graphs, Bicliques

The first-fit coloring is a heuristic that assigns to each vertex, arriv...
01/11/2020 ∙ by Pierre Aboulker, et al. ∙ 0

• ### Parameterized (Approximate) Defective Coloring

In Defective Coloring we are given a graph G = (V, E) and two integers χ...
01/11/2018 ∙ by Rémy Belmonte, et al. ∙ 0

• ### On the Descriptive Complexity of Color Coding

Color coding is an algorithmic technique used in parameterized complexit...
01/10/2019 ∙ by Max Bannach, et al. ∙ 0

• ### The Multicolored Graph Realization Problem

We introduce the Multicolored Graph Realization problem (MGRP). The inpu...
03/24/2021 ∙ by Josep Diaz, et al. ∙ 0

• ### Dual parameterization of Weighted Coloring

Given a graph G, a proper k-coloring of G is a partition c = (S_i)_i∈ [1...
05/17/2018 ∙ by Júlio Araújo, et al. ∙ 0

##### 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

equitable coloring is a variant of the classical vertex coloring problem, where we not only want to partition an vertex graph into independent sets, but also that each of these sets has either ou vertices. The smallest integer for which admits an equitable -coloring is called the equitable chromatic number of .

An extensive survey was conducted by Lih Lih (2013), where many of the results on equitable coloring of the last 50 years were assembled. Most of them, however, are upper bounds on the equitable chromatic number. Such bounds are known for: bipartite graphs, trees, split graphs, planar graphs, outerplanar graphs, low degeneracy graphs, Kneser graphs, interval graphs, random graphs and some forms of graph products.

Almost all complexity results for equitable coloring arise from a related problem, known as bounded coloring, an observation given by Bodlaender and Fomin Bodlaender and Fomin (2004). On bounded coloring, we ask that the size of the independent sets be bounded by an integer , which is not necessarily a function on or . Among the known results for bounded coloring, we have that the problem is solvable in polynomial time for: split graphs Chen et al. (1996), complements of interval graphs Bodlaender and Jansen (1995), forests Baker and Coffman (1996), trees Jarvis and Zhou (2001) and complements of bipartite graphs Bodlaender and Jansen (1995). For cographs, there is a polynomial-time algorithm when the number of colors is fixed, otherwise the problem is  Bodlaender and Jansen (1995); the same is also valid for bipartite graphs and interval graphs Bodlaender and Jansen (1995). A consequence of the difficulty of bounded coloring for cographs is the difficulty of the problem for graphs of bounded cliquewidth. In complements of comparability graphs, even if we fix , bounded coloring remains . In Fellows et al. (2011), it is shown that equitable coloring parameterized by treewidth and number of colors is - and, in Bodlaender and Fomin (2004), an algorithm for graphs of bounded treewidth is given.

In this work, we perform a series of reductions proving that equitable coloring is - for different subclasses of chordal graphs. In particular, we show that the problem parameterized by the number of colors is - for block graphs and for the disjoint union of split graphs. Moreover, the problem remains - for -free interval graphs even if we parameterize it by treewidth, number of colors and maximum degree. This last results generalize the proof given by Fellows et al. in Fellows et al. (2011) that equitable coloring is - when parameterized by treewidth and number of colors. A result given by de Werra in de Werra (1985) guarantees that every -free graph can be equitable -colored if is at least the chromatic number. Since vertex coloring can be solved in polynomial time on chordal graphs, we trivially have a polynomial-time algorithm for equitable coloring of -free chordal graphs. This allows us to establish a dichotomy for the computational complexity of equitable coloring of chordal graphs based on the size of the largest induced star.

## 2 Preliminaries

We used standard graph theory notation. Define and the powerset of . A -coloring of a graph is a function . Alternatively, a -coloring is a -partition such that . A set is monochromatic if . A -coloring is said to be equitable if, for every , . A -coloring of is proper if no edge of is monochromatic, that is, if is an independent set for every . Unless stated, all colorings are proper.

The disjoint union, or simply union, of two graphs is a graph such that  and . The join of two graphs  is the graph given by  and . A graph is a block graph if and only if every biconnected component is a clique; it is a split graph if and only if can be partitioned in a clique and an independent set. The length of a path on vertices is the number of edges it contains, that is, . The diameter of a graph is the length of the largest minimum path between any two vertices of the graph.

###### Definition 1.

Tree Decomposition Robertson and Seymour (1986) A tree decomposition of a graph is a tree such that, for each of its nodes there is a corresponding bag such that and the following holds:

1. For every edge , there is some such that .

2. For every with , for every in the path between and , .

A tree decomposition of a graph is defined as , where is a tree and is a family where: ; for every edge there is some  such that ; for every , if is in the path between and in , then . Each is called a bag of the tree decomposition. The width of a tree decomposition is defined as the size of a largest bag minus one. The treewidth of a graph is the smallest width among all valid tree decompositions of  Downey and Fellows (2013). If is a rooted tree, by we will denote the subgraph of induced by the vertices contained in any bag that belongs to the subtree of rooted at bag . An algorithmically useful property of tree decompositions is the existence of a so said nice tree decompositions of width .

###### Definition 2.

Nice tree decomposition A tree decomposition of is said to be nice if it is a tree rooted at, say, the empty bag and each of its bags is from one of the following four types:

1. Leaf node: a leaf of with .

2. Introduce node: an inner bag of with one child such that .

3. Forget node: an inner bag of with one child such that .

4. Join node: an inner bag of with two children such that .

## 3 Subclasses of Chordal Graphs

All of our reductions involve the bin-packing problem, which is in the strong sense Garey and Johnson (1979) and - when parameterized by the number of bins Jansen et al. (2013). In the general case, the problem is defined as: given a set of positive integers , called items, and two integers and , can we partition into bins such that the sum of the elements of each bin is at most ? We shall use a version of bin-packing where each bin sums exactly to . This second version is equivalent to the first, even from the parameterized point of view; it suffices to add  unitary items to . For simplicity, by bin-packing we shall refer to the second version, which we formalize as follows.

bin-packing
Instance
: A set of items and a bin capacity .
Parameter: The number of bins .
Question: Is there a -partition of such that, , ?

The idea for the following reductions is to build one gadget for each item  of the given bin-packing instance, perform their disjoint union, and equitably -color the resulting graph. The color given to the circled vertices in Figure 1 control the bin to which the corresponding item belongs to. Each reduction uses only one of the three gadget types. Since every gadget is a chordal graph, their treewidth is precisely the size of the largest clique minus one, that is, , which is also the number of desired colors for the built instance of equitable coloring.

### 3.1 Disjoint union of Split Graphs

###### Definition 3.

An -antiflower is the graph , that is, it is the graph obtained after performing the disjoint union of ’s followed by the join with .

###### Theorem 1.

equitable coloring of the disjoint union of split graphs parameterized by the number of colors is -.

###### Proof.

Let be an instance of bin-packing and a graph such that . Note that . Therefore, in any equitable -coloring of , each color class has  vertices. Define  and let  be the corresponding . We show that there is an equitable -coloring  of  if and only if  is a instance of bin-packing.

Let  be a solution to bin-packing. For each , we do if . We color each vertex of the independent set of  with  and note that all remaining possible proper colorings of the gadget use each color the same number of times. Thus, .

Now, let  be an equitable -coloring of . Note that  and that the independent set of an antiflower is monochromatic. For each , if . That is, , from which we conclude that . ∎

### 3.2 Block Graphs

We now proceed to the parameterized complexity of block graphs. Conceptually, the proof follows a similar argumentation as the one developed in Theorem 1; however, we are also able to show that the addition of the diameter of the graph to the parameterization is not enough to develop an algorithm, unless .

###### Definition 4.

An -flower is the graph , that is, it is obtained from the union of cliques of size followed by a join with .

###### Theorem 2.

equitable coloring of block graphs parameterized by the number of colors, treewidth and diameter is -.

Let be an instance of bin-packing, , , and, for , let be the universal vertex of . Define a graph such that and . Looking at Figure 2, it is easy to see that any minimum path between a non-universal vertex of and a non-universal vertex of , has length 4. We show that is an instance if and only if is equitably -colorable.

 |V(G)| =|V(F0)|+∑j∈[n]|V(Fj)| = k(B+1)+1+∑j∈[n](1+k(aj+1)) =kB+k+n+k2B+kn+1 = (k+1)(kB+n+1)

Given a -partition of that solves our instance of bin-packing, we construct a coloring of such that if and . Using a similar argument to the previous theorem, after coloring each , the remaining vertices of are automatically colored. For , it is easy to see that . It remains to prove that every other color class also has vertices.

 |ψi| =B+1+∑j∣yj∉ψi(aj+1)+∑j∣yj∈ψi1 = B+1+∑j∈[n](aj+1)−∑j∣yj∈ψiaj =B+1+kB+n−B = kB+n+1

For the converse we take an equitable -coloring of and suppose, without loss of generality, that and, consequently, for every other , . To build our -partition of , we say that if . The following equalities show that for every and completes the proof.

 |ψi| =B+1+∑j∣yj∈ψi1+∑j∣yj∉ψi(aj+1) = B+1+∑j∈[n](aj+1)−∑j∣yj∈ψiaj kB+n+1 =B+1+kB+n−∑j∣yj∈ψiaj ⇒ B=∑j∣yj∈ψiaj

### 3.3 Interval Graphs without some induced stars

Before proceeding to our last reduction, we present a polynomial time algorithm to equitably -color a claw-free chordal graph . To do this, given a partial -coloring of , denote by the subgraph of induced by the vertices colored with , define as the set of colors used times in and the remaining colors. If , we say that . Our goal is to color one maximal clique (say ) at a time and keep the invariant that, the new vertices introduced by can be colored a subset of the elements of . To do so, we rely on the fact that, for claw-free graphs, the maximal connected components of the subgraph induced by any two colors form either cycles, which cannot happen since

is chordal, or paths. By carefully choosing which colors to look at, we find odd length paths that can be greedily recolored to restore our invariant.

###### Lemma 1.

There is an -time algorithm to equitably -color a claw-free chordal graph or determine that no such coloring exists.

###### Proof.

We proceed by induction on the number of vertices of , and show that is equitably -colorable if and only if its maximum clique has size at most . The case is trivial. For general , take one of the leaves of the clique tree of , say , a simplicial vertex and define . By the inductive hypothesis, there is an equitable -coloring of if only if . If or , can’t be properly colored.

Now, since , take an equitable -coloring of and define . If , we can extend to using one of the colors of to greedily color . Otherwise, note that because . Now, take some color , ; by our previous observation, we know that has connected components, which in turn are paths. Now, take such that has odd length and both endvertices are colored with ; said component must exist since and . Moreover, , we can swap the colors of each vertex of and then color with ; neither operation makes an edge monochromatic.

As to the complexity of the algorithm, at each step we may need to select and – which takes time – construct , find and perform its color swap, all of which take time. Since we need to color vertices and , our total complexity is . ∎

The above algorithm was not the first to solve equitable coloring for claw-free graphs; this was accomplished by Dominique de Werra (de Werra, 1985) which implies that, for any claw-free graph , .

###### Theorem 3 (de Werra (1985)).

If is claw-free and -colorable, then is equitably -colorable.

###### Definition 5.

Let be a family of cliques such that and be a set of vertices. An -trem is the graph where and .

###### Theorem 4.

Let be a -free interval graph. If , equitable coloring of parameterized by treewidth, number of colors and maximum degree is -. Otherwise, the problem is solvable in polynomial time.

Once again, let be an instance of bin-packing, define , and let be the set of cut-vertices of . The graph is defined as . By the definition of an -trem, we note that the vertices with largest degree are the ones contained in , which have degree equal to . We show that is an instance if and only if is equitably -colorable, but first note that .

Given a -partition of that solves our instance of bin-packing, we construct a coloring of such that, for each , if and only if . Using a similar argument to the other theorems, after coloring each , the remaining vertices of are automatically colored, and we have .

For the converse we take an equitable -coloring of and observe that, for every , . As such, to build our -partition of , we say that if and only if . Thus, since , we have that , from which we conclude that .

## 4 Clique Partitioning

Since equitable coloring is - when simultaneously parameterized by many parameters, we are led to investigate a related problem. Much like equitable coloring is the problem of partitioning in independent sets of size and independent sets of size , one can also attempt to partition in cliques of size or . A more general version of this problem is formalized as follows:

clique partitioning
Instance
: A graph and two positive integers and .
Question: Can be partitioned in cliques of size and cliques of size ?

We note that both maximum matching (when ) and triangle packing (when ) are particular instances of clique partitioning, the latter being when parameterized by  (Fellows et al., 2005). As such, we will only be concerned when . To the best of our efforts, we were unable to provide an algorithm for clique partitioning when parameterized by and , even if we fix . However, the situation is different when parameterized by the treewidth of , and we obtain an algorithm running in time for the corresponding counting problem, #clique partitioning.

The key ideas for our bottom-up dynamic programming algorithm are quite straightforward. First, cliques are formed only when building the tables for forget nodes. Second, for join nodes, we can safely consider only the combination of two partial solutions that have empty intersection on the covered vertices. Finally, both join and forget nodes can be computed using fast subset convolution (Björklund et al., 2007). For each node , our algorithm builds the table , where each entry is indexed by a subset that indicates which vertices of have already been covered, an integer recording how many cliques of size have been used, and stores how many partitions exist in such that only is yet uncovered.

###### Theorem 5.

There is an algorithm that, given a nice tree decomposition of an -vertex graph of width , computes the number of partitions of in cliques of size and cliques of size in time time.

###### Proof.

Leaf node: Take a leaf node with . Since there is only one way of covering an empty graph is with 0 cliques, we compute with:

Introduce node: Let be a an introduce node, its child and . Due to our strategy, introduce nodes are trivial to solve; it suffices to define .

Forget node: For a forget node with child and forgotten vertex , at first glance we would need to test, for every and every clique of size or contained in , if and some is a valid entry of , yielding a running time of . However, we can formulate the computation of as the subset convolution of two functions. That is:

 \centeringfx(S,k′)\@add@centering =∑A⊆Sfy(S∖A,k′−1)gr(A,v)+∑A⊆Sfy(S∖A,k′)gr−1(A,v) gl(A,v) ={1, if A is a clique of size l contained % in N[v] and v∈A0,otherwise

Correctness follows directly from the hypothesis that is correctly computed and that, for every , . For the running time, we can pre-compute both and in , so their values can be queried in time. As such, each forget node takes time, since we can compute the subset convolutions of and in time each. The additional factor of comes from the second coordinate of the table index.

Join node: Take a join node with children and . Since we want to partition our vertices, the cliques we use in and must be completely disjoint and, consequently, the vertices of covered in and must also be disjoint. As such, we can compute through the equation:

 fx(S,k′)=∑ky+kz=k′∑A⊆Sfy(A,ky)fz(S∖A,kz)

Note that we must sum over the integer solutions of the equation since we do not know how the cliques of size are distributed in . To do that, we compute the subset convolution . The time complexity of follows directly from the complexity of the fast subset convolution algorithm, the range of the outermost sum and the range of the second parameter of the table index.

For the root , we have if and only if can be partitioned in cliques of size and the remaining vertices in cliques of size . Since our tree decomposition has nodes, our algorithm runs in time .

To recover a solution given the tables , start at the root node with , and let be the cliques in the solution. We shall recursively extend in a top-down manner, keeping track of the current node , the set of vertices and the number of ’s used to cover . Our goal is to keep the invariant that .

Introduce node: Due to the hypothesis that and the way that is computed, it follows that .

Forget node: Since the current entry is non-zero, there must be some such that exactly one of the products , is non-zero and, in fact, any such suffices. To find this subset, we can iterate through in time and test both products to see if any of them is non-zero. Note that the chosen will be a clique of size either or , and thus, we can set .

Join node: The reasoning for join nodes is similar to forget nodes, however, we only need to determine which states to look at in the child nodes. That is, for each integer solution to and for each , we check if both is non-zero; in the affirmative, we compute the solution for both children with the respective entries. Any such triple that satisfies the condition suffices.

Clearly, retrieving the solution takes time per node, yielding a running time of . ∎

###### Corollary 1.

Equitable coloring is when parameterized by the treewidth of the complement graph.

## 5 Conclusions

In this work, we investigated the equitable coloring problem. We developed novel parameterized reductions from bin-packing, which is - when parameterized by number of bins. These reductions showed that equitable coloring is in three more cases: (i) if we restrict the problem to block graphs and parameterize by the number of colors, treewidth and diameter; (ii) on the disjoint union of split graphs, a case where the connected case is polynomial; (iii) equitable coloring of interval graphs, for any , remains hard even if we parameterize by the number of colors, treewidth and maximum degree. This, along with a previous result by de Werra (1985), establishes a dichotomy based on the size of the largest induced star: for -free graphs, the problem is solvable in polynomial time if , otherwise it is . These results significantly improve the ones by Fellows et al. (2011) through much simpler proofs and in very restricted graph classes.

Since the problem remains hard even for many natural parameterizations, we resorted to a more exotic one – the treewidth of the complement graph. By applying standard dynamic programming techniques on tree decompositions and the fast subset convolution machinery of Björklund et al. (2007), we obtain an algorithm when parameterized by the treewidth of the complement graph.

Natural future research directions include the identification and study of other uncommon parameters that may aid in the design of other algorithms. Revisiting clique partitioning when parameterized by and is also of interest, since its a related problem to equitable coloring and the complexity of its natural parameterization is yet unknown.

## References

• Baker and Coffman [1996] B. S. Baker and E. G. Coffman. Mutual exclusion scheduling. Theoretical Computer Science, 162(2):225–243, 1996.
• Björklund et al. [2007] A. Björklund, T. Husfeldt, P. Kaski, and M. Koivisto. Fourier meets möbius: fast subset convolution. In

Proceedings of the thirty-ninth annual ACM symposium on Theory of computing

, pages 67–74. ACM, 2007.
• Bodlaender and Fomin [2004] H. L. Bodlaender and F. V. Fomin. Equitable Colorings of Bounded Treewidth Graphs, pages 180–190. Springer Berlin Heidelberg, Berlin, Heidelberg, 2004.
• Bodlaender and Jansen [1995] H. L. Bodlaender and K. Jansen. Restrictions of graph partition problems. part i. Theoretical Computer Science, 148(1):93 – 109, 1995. ISSN 0304-3975.
• Chen et al. [1996] B.-L. Chen, M.-T. Ko, and K.-W. Lih. Equitable and -bounded coloring of split graphs, pages 1–5. Springer Berlin Heidelberg, Berlin, Heidelberg, 1996.
• de Werra [1985] D. de Werra. Some uses of hypergraphs in timetabling. Asia-Pacific Journal of Operational Research, 2(1):2–12, 1985.
• Downey and Fellows [2013] R. G. Downey and M. R. Fellows. Fundamentals of parameterized complexity, volume 4. Springer, 2013.
• Fellows et al. [2005] M. Fellows, P. Heggernes, F. Rosamond, C. Sloper, and J. A. Telle. Finding k disjoint triangles in an arbitrary graph. In J. Hromkovič, M. Nagl, and B. Westfechtel, editors, Graph-Theoretic Concepts in Computer Science, pages 235–244, Berlin, Heidelberg, 2005. Springer Berlin Heidelberg.
• Fellows et al. [2011] M. R. Fellows, F. V. Fomin, D. Lokshtanov, F. Rosamond, S. Saurabh, S. Szeider, and C. Thomassen. On the complexity of some colorful problems parameterized by treewidth. Information and Computation, 209(2):143 – 153, 2011.
• Garey and Johnson [1979] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman &amp; Co., New York, NY, USA, 1979.
• Jansen et al. [2013] K. Jansen, S. Kratsch, D. Marx, and I. Schlotter. Bin packing with fixed number of bins revisited. Journal of Computer and System Sciences, 79(1):39 – 49, 2013.
• Jarvis and Zhou [2001] M. Jarvis and B. Zhou. Bounded vertex coloring of trees. Discrete Mathematics, 232(1-3):145–151, 2001.
• Lih [2013] K.-W. Lih. Equitable coloring of graphs. In

Handbook of combinatorial optimization

, pages 1199–1248. Springer, 2013.
• Robertson and Seymour [1986] N. Robertson and P. Seymour. Graph minors. ii. algorithmic aspects of tree-width. Journal of Algorithms, 7(3):309 – 322, 1986.