Complexity of Grundy coloring and its variants

17 downloads 0 Views 274KB Size Report
Jul 22, 2014 - Given a graph G, a colored witness of height ℓ, or simply called an. ℓ-witness,2 is a ...... [6] Hans L. Bodlaender. A tourist guide through ...
Complexity of Grundy coloring and its variants ´ Edouard Bonnet∗

Florent Foucaud†



Eun Jung Kim∗

Florian Sikora∗

July 22, 2014

arXiv:1407.5336v1 [cs.DS] 20 Jul 2014

Abstract The Grundy number of a graph is the maximum number of colors used by the greedy coloring algorithm over all vertex orderings. In this paper, we study the computational complexity of Grundy Coloring, the problem of determining whether a given graph has Grundy number at least k. We show that Grundy Coloring can be solved in time O∗ (2n ) on graphs of order n. While the problem is known to be solvable in time f (k, w) · n for graphs of treewidth w, we prove that under the Exponential Time Hypothesis, it cannot be computed in time O∗ (cw ), for any constant c. We also consider two previously studied variants of Grundy Coloring, namely Weak Grundy Coloring and Connected Grundy Coloring. We show that Weak Grundy Coloring is fixed-parameter tractable with respect to the weak Grundy number. In stark contrast, it turns out that checking whether a given graph has connected Grundy number at least k is NP-complete already for k = 7.

1

Introduction

A k-coloring of a graph G is a surjective mapping ϕ : V (G) → {1, . . . , k} and we say v is colored with ϕ(v). A k-coloring ϕ is proper if any two adjacent vertices receive different colors in ϕ. The chromatic number χ(G) of G is the smallest k such that G has a k-coloring. Determining the chromatic number of a graph is the most fundamental problem in graph theory. Given a graph G and an ordering σ = v1 , . . . , vn of V (G), the first-fit algorithm colors vertex vi with the smallest color that is not present among the set of its neighbors within {v1 , . . . , vi−1 }. The Grundy number Γ(G) is the largest k such that G admits a vertex ordering on which the first-fit algorithm yields a proper k-coloring. The first-fit is presumably the simplest heuristic to compute a proper coloring of a graph. In this sense, the Grundy number gives an algorithmic upper bound on the performance of any heuristic for the chromatic number. This notion was first studied by Grundy in 1939 in the context of digraphs and games [4, 16], and formally introduced 40 years later in [8]. It was independently defined under the name ochromatic number in [31], which turns out to be equivalent to the Grundy number [12]. Many works have studied the first-fit algorithm in connection with on-line coloring algorithms, see e.g. [27]. The related notions of weak Grundy number and connected Grundy number were introduced by Kierstead and Saoub [22] and by Benevides et al. [3], respectively. Let us introduce the problems formally. Let G be a graph and let σ = v1 , . . . , vn be an ordering of V (G). A (not necessarily proper) k-coloring ϕ : V (G) → {1, . . . , k} of G is a firstfit coloring with respect to σ if for every vertex vi and every color c with c < ϕ(vi ), vi has a neighbor vj with ϕ(vj ) = c for some j < i. In particular, ϕ(v1 ) = 1. A vertex ordering ∗

LAMSADE CNRS UMR 7243, PSL, Universit´e {edouard.bonnet,florent.foucaud,eunjung.kim,florian.sikora}@dauphine.fr † Department of Mathematics, University of Johannesburg (South Africa).

1

Paris-Dauphine

(France).

σ = v1 , . . . , vn is connected if for every i, 1 6 i 6 n, the subgraph induced by {v1 , . . . , vi } is connected. A k-coloring ϕ : V (G) → {1, . . . , k} is called the (i) weak Grundy, (ii) Grundy, (iii) connected Grundy coloring of G, respectively, if it is a first-fit coloring with respect to some vertex ordering σ such that (i) ϕ and σ has no restriction, (ii) ϕ is proper, (iii) ϕ is proper and σ is connected, respectively. The maximum number of colors used in a (weak, connected, respectively) Grundy coloring is called the (weak, connected, respectively) Grundy number and is denoted Γ(G) (Γ′ (G) and Γc (G), respectively). In this paper, we study the complexity of computing these invariants. Grundy Coloring Input: A graph G, an integer k. Question: Do we have Γ(G) > k? Weak Grundy Coloring Input: A graph G, an integer k. Question: Do we have Γ′ (G) > k? Connected Grundy Coloring Input: A graph G, an integer k. Question: Do we have Γc (G) > k? Note that χ(G) 6 Γ(G) 6 ∆(G) + 1, where χ(G) is the chromatic number and ∆(G) is the maximum degree of G. However, the difference Γ(G) − χ(G) can be (arbitrarily) large. For example, the Grundy number of the tree of Figure 1 is 4, whereas its chromatic number is 2. Previous results. Grundy Coloring remains NP-complete on bipartite graphs [19], cobipartite graphs (and hence claw-free graphs and P5 -free graphs) [33], on chordal graphs [30], and on line graphs [18]. Certain graph classes admit polynomial-time algorithm. There is a linear-time algorithm for Grundy Coloring on trees [20]. This result was extended to graphs of bounded treewidth by Telle and Proskurowski [32], which proposed a dynamic programming 2 algorithm running in time kO(w) 2O(wk) n = O(n3w ) for graphs of treewidth w (in other words, their algorithm is in FPT for parameter k + w and in XP for parameter w).1 A polynomial-time algorithm for P4 -laden graphs, which contains all cographs as a subfamily, was given in [2]. Grundy Coloring has polynomial-time constant-factor approximation algorithms for inputs that are interval graphs [17, 27], complements of chordal graphs [17], complements of bipartite graphs [17] and bounded tolerance graphs [22]. In general, however, there is a constant c > 1 s.t. approximating Grundy Coloring within c is impossible unless NP ⊆ RP [23]. It is not known if a polynomial-time o(n)-factor approximation algorithm exists. When parameterized by |V | minus the number of colors, Grundy Coloring was shown to be in FPT by Havet and Sempaio [19]. Connected Grundy Coloring was introduced by Benevides et al. [3], who proved it to be NP-complete, even for chordal graphs and for co-bipartite graphs. Weak Grundy Coloring is NP-complete [15]. Our results. As is pointed out in [32], no (extended) monadic second order expression is known for having Γ(G) > k. Therefore it is not clear whether the algorithm of [32] can be improved, e.g. to an algorithm of running time f (w) · poly(n). Nevertheless, on general graphs, 1

The first running time is not explicitly stated in the paper but follows from their meta-theorem. The second one is deduced by the authors from the first one by bounding k by w log2 n + 1.

2

we show that Grundy Coloring can be solved in time O∗ (2n ) using the fast subset convolution, a technique developped in [5]. As a lower bound to these positive algorithmic bounds, we show that under the Exponential Time Hypothesis (ETH) [21], an O(cw · poly(n))-time algorithm for Grundy Coloring does not exist (for any fixed constant c). We also study the parameterized complexity of Grundy Coloring parameterized by the number of colors, showing that it is in FPT for chordal graphs, claw-free graphs, and graphs excluding a fixed minor. Finally, we observe that Weak Grundy Coloring and Connected Grundy Coloring exhibit opposite computational behavior when viewed in parameterized complexity (for parameter “number of colors”). The former is fixed-parameter tractable on general graphs while the latter is NP-complete even when k = 7, i.e. does not belong to XP. Note that the proof of [3] showing that Connected Grundy Coloring is NP-complete was for an unbounded number of colors.

2

Preliminaries

Computational complexity. A decision problem is said to be fixed-parameter tractable (or in the class FPT) w.r.t. parameter k if it can be solved in time f (k) · |I|c for an instance I, where f is a computable function and c is a constant (see e.g. [10, 28] for details). The class XP contains those problems solvable in time |I|f (k) , where f is a computable function. The Exponential Time Hypothesis (ETH) is a conjecture by Impagliazzo, Paturi and Zane asserting that there is no O∗ (2o(n) )-time algorithm for 3-SAT on instances with n variables [21]. Many algorithmic lower bounds have been proved under ETH, see e.g. [25]. Minors. A minor of a graph G is a graph that can be obtained from G by (i) deletion of vertices or edges (ii) contraction of edges (removing an edge and merging its endpoints into one). Given a graph H, a graph G is H-minor-free if H is not a minor of G. An apex graph is a graph obtained from a planar graph G and a single vertex v, and by adding arbitrary edges between v and G. A graph is said to be apex-minor-free if it is H-minor-free for some apex graph H. Tree-decompositions. A tree-decomposition of a graph G is a pair (T , X ), where T is a tree and X := {Xt : t ∈ V (T )} is a collection of subsets of V (G) (called bags), and they must S satisfy the following conditions: (i) X∈V (T ) = V (G), (ii) for every edge uv ∈ E(G), there is a bag of T that contains both u and v, and (iii) for every vertex v ∈ V (G), the set of bags containing v induces a connected subtree of T . The maximum size of a bag Xt over all tree nodes t of T minus one is called the width of T . The minimum width of a tree-decomposition of G is the treewidth of G. The notion of tree-decomposition has been used extensively in algorithm design, especially via dynamic programming on the tree-decomposition. A class of graphs has bounded local treewidth if for any of its members G, the treewidth of G is upper-bounded by a function of the diameter of G. The following result was proved by Demaine and Hajiaghayi [9]: Theorem 1 ([9]). For every apex graph H, the class of H-minor-free graphs has bounded local treewidth. More precisely, there is a function f such that any H-minor-free graph G of diameter D has treewidth at most f (H)D. 3

In fact, it was proved by Eppstein [11] that a graph has bounded local treewidth if and only if it apex-minor-free. Grundy coloring. Given a graph G, a colored witness of height ℓ, or simply called an ℓ-witness,2 is a subgraph G′ of G, which comes with a partition W = W1 ⊎ · · · ⊎ Wℓ of V (G′ ) such that for every i in 1, . . . , ℓ (1) Wi 6= ∅, and (2) Wi is an independent dominating set of G[Wi ∪ · · · ∪ Wℓ ]. The cell Wi under W is called the color class of color i. A witness G′ of height ℓ is said to be minimal if for every u ∈ V (G′ ), G′ − u with the partition W|V (G′ )−{u} is not an ℓ-witness. Observation 2. For any graph G, Γ(G) > k if and only if G allows a minimal k-witness. Observation 3. A minimal k-witness has a vertex of degree k − 1 (the root), has at most 2k−1 vertices, and is included in the distance-k neighborhood of the root. Using this, Zaker [34] observed that k-Grundy Coloring can be solved by checking, for every subset of 2k−1 vertices, if it contains a k-witness as an induced subgraph: k−1

Corollary 4 ([34]). Grundy Coloring can be solved in time f (k)n2 oring parameterized by the number k of colors is in XP.

, i.e. Grundy Col-

Observation 5. In any Grundy coloring of G, a vertex with degree d cannot be colored with color d + 2 or larger. Lemma 6. Let G be a graph with a minimal Grundy coloring achieving color k and let W be the corresponding minimal witness. Then, if a vertex u of W is colored with k′ < k, u has a neighbor colored with some color k′′ , k′′ > k′ . Proof. Otherwise, one could remove u from the witness, contradicting its minimality. Lemma 7. Let G be a graph and let G′ be the corresponding minimal ℓ-witness with the partition S W := W1 ⊎ · · · ⊎ Wℓ . Then, Wi is an independent set which dominates the set j∈[i+1,ℓ] Wj (and no proper subset of Wi has this property). In particular, W1 is a minimal independent dominating set of V (G′ ). Proof. As a Grundy coloring is a proper coloring, Wi is an independent set. If a vertex v ∈ Wh (with h > i) has no neighbor in Wi then v is colored with a color at most i. Wi minimally dominates Wh , otherwise W is not a minimal witness. For each i ∈ [l], let ti be a rooted tree. We define v[t1 , t2 , . . . , tl ] as the tree rooted at node v where v is linked to the root of each tree ti . The set (Tk )k>1 is a family of rooted trees (known as binomial trees) defined as follows (see Figure 1 for an illustration): • T1 consist only of one node (incidentally the root), and • ∀k > 1, Tk+1 = v[T1 , T2 , . . . , Tk ]. In a tree Tk with root v, for each i ∈ [k], v(i) denotes the root of Ti (i.e. the i-th child of v). We show a useful lemma about Grundy colorings of the tree Tk . Lemma 8. The Grundy number of Tk is k. Moreover, there are exactly two Grundy colorings achieving color k, and a unique coloring if we impose that the root is colored k. 2

A witness was called atom by Zaker [34].

4

4 3 2 1

2 1

1

1

Figure 1: Illustration of binomial tree T4 , where numbers denote the color of each vertex in a first-fit proper coloring with largest number of colors. Proof. Let v be the root of Tk . In Tk , there are only two vertices with degree k −1, that therefore can potentially be colored with k: v and v(k − 1). As Tk is rooted in v is isomorphic to Tk rooted in v(k − 1), we can assume that v will be the vertex colored by k. We show by induction that there is only one Grundy coloring of Tk where the root has color k. Obviously, there is a unique Grundy coloring of T1 . For any integer k > 2, if we impose that the root v is colored by k, the k − 1 children of v have to be colored with all the integers of [k − 1]. As for each i ∈ [k − 1], Ti has maximum degree i − 1, the color of v(i) is at most i. So, the only possibility is to color v(i) with i for each i ∈ [k − 1]. By the induction hypothesis, there is a unique such coloring of each subtree. The following result of Chang and Hsu [7] will prove useful: Theorem 9 ([7]). Let G be a graph on n vertices for which every subgraph H has at most d|V (H)| edges. Then Γ(G) 6 logd+1/d (n) + 2.

3

Grundy Coloring: algorithms and complexity

We now present our results about the (classical) problem Grundy Coloring.

3.1

A fast exact algorithm

A straightforward way to solve Grundy Coloring is to enumerate all possible orderings of the vertex set and to check whether the greedy algorithm uses at least k colors. This is a Θ(n!)-time algorithm. A natural question is whether there is a faster exact algorithm. Such algorithms for Coloring based on dynamic programming have been long known, see e.g. Lawler [24], but no cn algorithm for Grundy Coloring, for any constant c, was previously known. We now give such an algorithm. We rely on two observations: (a) in a colored witness, every color class Wi is an independent S dominating set in G[ j>i Wj ] (Lemma 7), and (b) any independent dominating set is a maximal independent set (and vice versa). Theorem 10. Grundy Coloring can be solved in time O∗ (2.246n ). Proof. Let G = (V, E) be a graph. We present a dynamic programming algorithm to compute Γ(G). For simplicity, given S ⊆ V , we denote the Grundy number of the induced subgraph G[S] by Γ(S). We recursively fill a table Γ∗ (S) over the subset lattice (2V , ⊆) of V in a bottom-up manner starting from S = ∅. The base case of the recursion is Γ∗ (∅) = 0. The recursive formula is given as Γ∗ (S) = max{Γ∗ (S \ X) + 1 | X ⊆ S is an independent dominating set of G[S]}. Now let us show by induction on |S| that Γ∗ (S) = Γ(S) for all S ⊆ V . The assertion trivially holds for the base case. Consider a nonempty subset S ⊆ V ; by induction hypothesis, 5

Γ∗ (S ′ ) = Γ(S ′ ) for all S ′ ⊂ S. Let X be a subset of S achieving Γ∗ (S) = Γ∗ (S \ X) + 1 and X ′ be the set of the color class 1 in the ordering achieving the Grundy number Γ(S). Let us first see that Γ∗ (S) 6 Γ(S). By induction hypothesis we have Γ∗ (S \ X) = Γ(S \ X). Consider a vertex ordering σ on S \X achieving Γ(S \X). Augmenting σ by placing all vertices of X at the beginning of the sequence yields a (set of) vertex ordering(s). Since X is an independent set, the first-fit algorithm gives color 1 to all vertices in X, and since X is also a dominating set for S \ X, no vertex of S \ X receives color 1. Therefore, the first-fit algorithm on such ordering uses Γ(S \ X) + 1 colors. We deduce that Γ(S) > Γ(S \ X) + 1 = Γ∗ (S \ X) + 1 = Γ∗ (S). To see that Γ∗ (S) > Γ(S), we first observe that Γ(S \ X ′ ) > Γ(S) − 1. Indeed, the use of the optimal ordering of S ignoring vertices of X ′ on S \ X ′ yields the color Γ(S) − 1. We deduce that Γ(S) 6 Γ(S \ X ′ ) + 1 = Γ∗ (S \ X ′ ) + 1 6 Γ∗ (S \ X) + 1 = Γ∗ (S). As a minimal independent dominating set is a maximal independent set, we can estimate the computation of the table by restricting X to the family of maximal independent sets of G[S]. On an n-vertex graph, the current best algorithm, due to F¨ urer and Kasiviswanathan [14], enumerates all maximal independent sets in time O(1.246n ). Checking whether a given set is a minimal independent set is polynomial and thus, the number of execution steps is dominated (up to a polynomial factor) by the number of recursion steps taken. This is ! n X n i=0

i

· 1.246i = (1 + 1.246)n .

We further improve Theorem 10 into an O∗ (2n )-time algorithm using the technique of fast subset convolution [5]. In order to apply fast subset convolution, let us reformulate Grundy Coloring. Given a graph G, a spanning witness of height ℓ is a spanning subgraph G′ with a partition P = P1 ⊎ · · · ⊎ Pℓ of V (G) forming a colored ℓ-witness. Notice that Pi is an independent dominating set of G[Pi ∪· · ·∪Pℓ ] for every i in 1, . . . , ℓ. In particular, P1 is a maximal independent set. Let gℓ (S) be the number of spanning witnesses of height ℓ in G[S]. In particular, g1 (S) = 1 is S is a nonempty independent set (g1 (S) = 0 otherwise), and gℓ (∅) = 0 for all ℓ > 1. Moreover, given a subset S ⊆ V (G), we define a function fS as follows. For every set X with X ⊆ S, fS (X) = 1 if X is a maximal independent set in the induced subgraph G[S], and fS (X) = 0 otherwise. Moreover, fS (∅) = 0. We establish the following recursive formula, whose usefulness is demonstrated in the next lemma : gℓ (S) =

X

fS (X) · gℓ−1 (S \ X)

(1)

X⊆S

Lemma 11. Given a graph G = (V, E), Γ(G) > k if and only if gℓ (V ) > 0 for some ℓ > k. Proof. If Γ(G) > k, then by Lemma 7, there is a minimal witness W consisting of W1 , . . . , Wk disjoint color classes. For notational convenience, this sequence of vertex sets are extended as long as necessary and Wi = ∅ for i > k. We present a procedure to obtain a spanning witness of height ℓ for ℓ > k: take any maximal independent set containing W1 and let this set be P1 . Observe P1 is an independent dominating set. Iteratively for i = 1, . . . , k we can find a (any) S maximal independent set Pi of Gi containing Wi . Here Gi := G − 16j 1 (which subsumes G1 := G). The procedure stops at i = ℓ, when Gℓ is independent. Observe that then S we have V = 16i6ℓ Pi . Clearly the partition P1 ⊎ · · · ⊎ Pℓ is a spanning witness of height ℓ and ℓ > k. The opposite direction is true by definition of gℓ .

6

Let f and g be two functions from the subsets of an n-set V to Z. The subset convolution of f and g [5] is denoted as f ∗ g and defined as (f ∗ g)(S) :=

X

f (X) · g(S \ X).

X⊆S

Using the subset convolution with fS and g1 and the recursion (1), we have gℓ (S) = fS ∗ · · · ∗ fS ∗ g1 (S) |

{z

ℓ − 1 times

}

Notice that the functions fS (X) and g1 (X) can be evaluated in polynomial time for any given X ⊆ V . The subset convolution can be computed in O(n2 2n ) time, see [5]. Hence Grundy Coloring can be decided in time O(n3 2n ): Theorem 12. Grundy Coloring can be solved in time O∗ (2n ).

3.2

Lower bound on the treewidth dependency

The following result is inspired by ideas in [25] for proving near-optimality of known algorithm on bounded treewidth graphs. Unlike [25] which is based on the Strong ETH, our result is based on the ETH. Theorem 13. Under the ETH, for any constant c, Grundy Coloring is not solvable in time O∗ (cw ) on graphs with feedback vertex set number (and hence treewidth) at most w. Proof. Let C = {C1 , . . . , Cm } be the list of m clauses of any instance of SAT, on the set of n variables X = {x1 , . . . , xn }. We partition X into t = ⌈ ⌊k log k⌋ ⌉ sets of size ⌊k log k⌋ and we call them V1 , . . . , Vt . An i-assignment is an assignment of all the variables in Vi . A group assignment is an iassignment for some i ∈ [t]. The number of i-assignments is 2|Vi | 6 kk 6 (2k)!. Thus, we can map each i-assignment to a permutation on 2k elements. Let φi be such a one-to-one function. For the sake of convenience, we denote by φ−1 the inverse function of φi where unmatched i permutations are matched with any i-assignment. We construct an instance G of Grundy Coloring in the following way. For each i ∈ [t], Vi is encoded by a clique Si = {vi1 , . . . , vi2k } of size 2k. Intuitively, coloring that clique Si with colors 1 up to 2k will define a permutation σ such that for each j ∈ [2k], σ(j) is the color of vij . This permutation, in turn, defines the i-assignment φ−1 i (σ). Therefore, coloring all the Si ’s with colors from 1 to 2k corresponds to a total assignment of the variables. Each clause Cj is encoded by an independent set Ij where each vertex corresponds to a distinct group assignment that satisfies Cj . Note that the number of group assignments is bounded by tkk , so |Ij | 6 tkk . We add to the construction a copy of the tree T⌈log m⌉+1 . This tree has more than m vertices: u1 (the root), u2 , . . . , um′ with m′ ∈ [m, 2m). For every j ∈ [m], we link uj to all the vertices of the independent set Ij and to the root of a copy of Tl for each l ∈ [2k + 1]. For every j ∈ (m, m′ ], we link uj to the root of a copy of Tl for each l ∈ [2k + 2]. We denote by T the tree induced by the ui ’s, the sets Ij s and all the copies of Tl linked to the ui s. Intuitively, to color u1 , the root of the tree T⌈log m⌉+1 , with color 2k + ⌈log m⌉ + 3 (which is the Grundy number we will ask for), one has to color at least one vertex in each Ij (j ∈ [m]) with color 2k + 2. Therefore, coloring a vertex in Ij with color 2k + 2 will correspond to satisfying the clause Cj . Now, we have to describe how we connect the clause vertices (the Ij ’s) to the compressed variable vertices (the Vi ’s) to ensure the aforementioned property. For every j ∈ [m], and for each vertex w in Ij , let µ be the i-assignment represented by w for some i ∈ [t], and let σ = φi (µ). The vertex w becomes the root of a copy of a tree T2k+2 where 7

T1 ... T5 v14

v13

v11

v12

S1

.. .

.. .

u2 I1

S2

.. . .. .

T1 T2

w .. .

T1 St

T3 T2

... I2

um

u1

T5

.. .

.. .

T1

T1 .. . Im T

Figure 2: A sample of the construction of the proof of Theorem 13 with k = 2. The edges incident to the rectangular boxes containing Ti s are only incident to the root of the tree. For the sake of readability, only T (w) is represented, but there is in fact one tree T (w′ ) per vertex S w′ in j∈[m] Ij . Here, w represents a 1-assignment mapped to the permutation σ = (12). for every a ∈ [2, 2k + 1], the subtree rooted in w(a)(a − 1) is removed and w(a) is connected to σ−1 (a−1) vi instead. We denote this tree by T (w). Intuitively, to color w with 2k + 2, the clique Si has to be colored according to σ. This ends the construction of graph G (see Figure 2 for an illustration). We now show a series of lemmas in order to prove that G has Grundy number 2k + ⌈log m⌉ + 3 if and only if (X, C) is a satisfiable formula. Lemma 14. In a minimally (2k + ⌈log m⌉ + 3)-colored witness W of G, for any j ∈ [m], no vertex in W ∩ Ij is colored with a color greater or equal to 2k + 3. Proof. A vertex v in Ij is connected to 2k + 1 vertices in T (v) and one vertex in T . So it has degree 2k + 2 and therefore cannot obtain a color strictly greater than 2k + 3. To get color 2k + 3 all its neighbors have to be colored (with each colored from 1 to 2k + 2 appearing exactly once). So, we conclude by Lemma 6. Lemma 15. In a minimally colored witness W of G where u1 has color 2k + ⌈log m⌉ + 3, W intersects each set Ij in a single vertex colored with color 2k + 2. Proof. According to Lemma 8, for each uj (j ∈ [m]) the best one can do when coloring the pendant trees Tl of uj (for each l ∈ [2k + 1]) is to color the root of Tl with color l. This way, one obtains all the colors from 1 to 2k + 1 in the neighborhood of uj , while colors 2k + 2 or more are not reachable. Thus, by Lemma 14, the only useful color that a vertex in Ij can bring to uj is 2k + 2. This shows that |W ∩ Ij | 6 1 and that if v ∈ W ∩ Ij , v is colored with color 2k + 2. The fact that |W ∩ Ij | > 1 is a consequence of Lemma 8, as otherwise it would yield a different optimal Grundy coloring of T2k+⌈log m⌉+3 still coloring u1 with the highest color. To see this, one could replace each Ij by T2k+2 in T , and add an edge between the root of the copy of T2k+2 and 8

uj . There, one obtains the tree T2k+⌈log m⌉+3 . Coloring no vertex in any Ij with color 2k + 2 but still achieving color 2k + ⌈log m⌉ + 3 would imply an optimal coloring of T2k+⌈log m⌉+3 without coloring some part of the tree, a contradiction to Lemma 8. Lemma 16. The only two vertices of G which can receive color 2k + ⌈log m⌉ + 3 in a Grundy coloring of G are u1 and u2 = u1 (log m). S

Proof. In T , u1 and u2 are the only vertices with degree 2k + ⌈log m⌉ + 2. For each w ∈ j Ij , the degree of the vertices in T (w) is bounded by 2k + 2. Thus, by Observation 5, the only vertices having sufficient degree to be colored with color 2k + ⌈log m⌉ + 2 are the vertices in S i Si . Although a vertex v ∈ Si (i ∈ [t]) can have a number of neighbors unbounded in k, its number of neighbors with degree unbounded in k, is bounded in k. Indeed, the 2k − 1 S other vertices in Si can have a large degree, but all its other neighbors are in w T (w) and therefore have degree bounded by 2k + 2. Overall, v cannot have in its neighborhood more than (2k + 2) + (2k − 1) = 4k + 1 different colors. As k is a constant, we can assume that 2k 6 log m, and we are done. The vertices u1 and u2 playing similar roles, the problem is equivalent to asking to color u1 with color 2k + ⌈log m⌉ + 3. Lemma 17. Let v be a vertex in Ij , µ the i-assignment represented by v, and σ = φi (µ). In a Grundy coloring of G, vertex v is colored with color 2k + 2 while its neighbor in T is not colored if and only if Si is colored according to σ. Proof. The arguments are similar to those of the proof of Lemma 15. If one wants to color v with color 2k + 2 without coloring yet its neighbor in T , one has to color w(a) with color a for each a ∈ [2k + 1]. Each vertex w(a) has a − 2 pendant trees Tl (l ∈ [a − 2]) which, at best, will be colored such that the root of Tl gets color l. Then the only color which w(a) is missing in order to get color a is color a − 1. So, the neighbor of w(a) in Si has to be colored with color a − 1. It implies that the clique Si has to be colored according to σ. The converse is straightforward. If (X, C) is a satisfiable formula, let µ be a satisfying truth assignment. For each i ∈ [t], let µi be the projection of µ to Vi , that is, the corresponding i-assignment. If one colors each Si according to φi (µi ), by Lemma 17, one can color with color 2k + 2, in each Ij (j ∈ [m]), one S vertex representing one µi . Then one can perform the standard coloring of T \ j Ij which ends up coloring u1 (or u2 ) with color 2k + ⌈log m⌉ + 3. Now, if (X, C) is not satisfiable, by Lemma 17 one cannot color at least one Ij with color 2k + 2. Thus, it is impossible to color u1 (or u2 ) with color 2k + ⌈log m⌉ + 3 by Lemma 15, hence the Grundy number is strictly smaller than 2k + ⌈log m⌉ + 3 by Lemma 16. 2n The set ∪16i6k Si is a feedback vertex set, so the treewidth is bounded by 2kt = ⌈ log k ⌉. The number of vertices in the instance of Grundy Coloring is bounded by N = 2m + 22k+1 mt(2k)! + 2kt. If one can solve Grundy Coloring in ctw N d for some constants c and 2n 2 d, then one can solve SAT in g(k)p(n)c log k = O∗ (g(k)(c log k )n ). Assuming the ETH, there is a 2 constant λ > 1 such that SAT is not solvable in time O∗ (λn ). We set k = c log λ in the above 2 construction. Then one can solve SAT in time O∗ (g(c log λ )(λn )) = O∗ (λn ), contradicting the ETH.

9

3.3

Grundy Coloring on special graph classes

For each fixed k, Grundy Coloring can be solved in polynomial time [34] and thus Grundy Coloring parameterized by the number of colors is in XP. However, it is unknown whether it is in FPT for this parameter. We present several positive results in this subsection. We observe that the XP algorithm of [32] implies a pseudo-polynomial-time algorithm on apex-minor-free graphs (such as planar graphs). 2

Proposition 18. Grundy Coloring is nO(log

n) -time

solvable on apex-minor-free graphs.

Proof. Any H-minor-free graph of order n has at most f (H)n edges [26] for some function f ; hence, by Theorem 9, we have k 6 Γ(G) 6 c log n for some constant c (otherwise, we have a NOinstance). As noted in Observation 3, any k-witness is included in some distance-k neighborhood 2 of G. Hence, we apply the O(n3w )-time algorithm of [32] for graphs of treewidth at most w: for every vertex v of G, apply it to the distance-k neighborhood of v. This is a subgraph of diameter at most 2k = O(log n), and by Theorem 1 it has treewidth w = O(log n) as well. Hence 2 2 O(n3w ) = nO(log n) . Proposition 19. Grundy Coloring parameterized by the number of colors is in FPT for the class of graphs excluding a fixed graph H as a minor. Proof. Notice that G contains a k-witness H as an induced subgraph if and only if Γ(G) > k. We can check, for every k-witness H, whether the input graph G contains H as an induced subgraph. By Observation 2, it suffices to test only the minimal k-witnesses. The number of minimal kwitnesses is bounded by some function of k and H-Induced Subgraph Isomorphism is in FPT when parameterized by |V (H)| on graphs excluding H as a minor [13]. Therefore, one can check if Γ(G) > k by solving H-Induced Subgraph Isomorphism for all minimal k-witnesses H. We have the following corollary of the algorithm of [32]. Proposition 20. Let C be a graph class for which every member G satisfies tw(G) 6 f (Γ(G)) for some function f . Then, Grundy Coloring parameterized by the number of colors is in FPT on C. In particular, Grundy Coloring is in FPT on chordal graphs. Proof. Since Grundy Coloring is in FPT for parameter combination of the number of colors and the treewidth [32], the first claim is immediate. Moreover ω(G) 6 Γ(G), hence if tw(G) 6 f (ω(G)) we have tw(G) 6 f (Γ(G)). For any chordal graph G, tw(G) = ω(G) − 1 [6]. Note that Grundy Coloring is NP-complete on chordal graphs [30]. 

Proposition 21. Grundy Coloring can be solved in time O nk∆ of maximum degree ∆.

k+1



= n∆∆

O(∆)

for graphs

Proof. Observation 3 implies that one can enumerate every distance-k-neighbourhood of each vertex, test every k-coloring of this neighborhood, and check if it is a valid Grundy k-coloring. Every such neighborhood has size at most ∆k+1 6 ∆∆+3 since by Observation 5, k 6 ∆ + 2. There are at most kx k-colorings of a set of x elements. We have the following corollary of Proposition 21. Note that Grundy Coloring is NPcomplete on claw-free graphs [33]. Corollary 22. Let C be a graph class for which every member G satisfies ∆(G) 6 f (Γ(G)) for some function f . Then, Grundy Coloring parameterized by the number of colors is in FPT for graphs in C. In particular, this holds for the class of claw-free graphs. 10

Proof. Straightforward by Proposition 21. Moreover, let G be a claw-free graph, and consider a vertex v of degree ∆(G). Since G is claw-free, the subgraph induced by the neighbors of v has independence number at most 2, and hence Γ(G) > χ(G) > χ(N (v)) > ∆(G) 2 .

4

Weak and connected Grundy coloring

Among the three versions of Grundy Coloring we consider in this paper, Weak Grundy Coloring is the least constrained while Connected Grundy Coloring appears to be the most constrained one. This intuition turns out to be true when it comes to their parameterized complexity. When parameterized by the number of colors, Weak Grundy Coloring is in FPT while Connected Grundy Coloring does not belong to XP.

4.1

Weak Grundy Coloring

We recall that Weak Grundy Coloring is NP-complete [15]. Theorem 23. Weak Grundy Coloring parameterized by number of colors is in FPT. Proof. Let G be the input graph. We use the randomized color-coding technique of Alon et al. [1]. Let us first uniformly randomly color the vertices of G with integers between 1 and k, and denote by col the function giving the color of a vertex according to this random coloring. Then, we apply a pruning step, removing all vertices which violate the property of a weak Grundy coloring. That is, we remove each vertex v such that col(v) = c if ∃c′ < c, 6 ∃u ∈ N (v), col(u) = c′ (equivalently, we keep only vertices v such that ∀c ∈ [1, col(v) − 1], ∃u ∈ N (v), col(u) = c). Note that a vertex can satisfy the condition at first, but, after having some neighbors removed, it is possible that the vertex no longer satisfies the condition. Therefore, we apply the pruning until all the vertices satisfy the condition. If there is still a vertex colored with k after this pruning step, then, by construction, there is a weak Grundy coloring achieving color k in G (by coloring first the vertices v such that col(v) = 1, then the vertices v such that col(v) = 2, and so on, up to k). If there is no Grundy k-witness, this computation always rejects. Otherwise, it accepts only if a witness is well-colored by the random coloring. We recall that a weak Grundy kwitness (as a Grundy k-witness) has a size bounded above by 2k−1 . At worst, there is a unique weak Grundy witness of size 2k−1 admitting a unique coloring. The probability to find this k−1 1 . Therefore, by repeating the previous step log( 1ǫ )k2 times, we witness in one trial is 2k−1 k have an optimum solution with probability at least 1 − ǫ, for any ǫ > 0. Overall the running k−1 time O(k2 (n + m)n) is fixed parameter tractable. The algorithm can be derandomized using standard techniques [1]. We also remark that the approach used to prove Theorem 23 does not work for Grundy Coloring because there is no control on the fact that a color class is an independent set.

4.2

Connected Grundy Coloring

Contrary to Grundy Coloring (Observation 3), the size of a minimal witness for Connected Grundy Coloring is not bounded by a function of k. Indeed, it can be of the order of n for some graphs (e.g. any odd cycle for k = 3). Observe that Γc (G) 6 2 if and only if G is bipartite. Hence, Connected Grundy Coloring is polynomial-time solvable for any k 6 3. However, we will now show that this is not the case for larger values of k, contrary to Grundy Coloring (Corollary 4). Hence, the parameterized version of the problem does not belong to XP. 11

Theorem 24. Connected Grundy Coloring is NP-hard even for k = 7. Proof. We give a reduction from 3-SAT 3-OCC, an NP-complete restriction of 3-SAT where each variable appears in at most three clauses [29], to Connected Grundy Coloring with k = 7. We first give the intuition of the reduction. Minimal connected Grundy k-witnesses, contrary to minimal Grundy k-witnesses, have arbitrarily large order: for instance, the cycle Cn of order n (n > 4, n odd) has a Grundy 3-witness of order 4, but its unique connected Grundy 3-witness achieving is of order n: the whole cycle. However, any minimal connected Grundy k-witness can be decomposed into two parts: a Grundy k-witness W with no more than 2k−1 vertices, and connected subgraphs P1 , P2 , . . . , Pt (t being bounded from above by a function of k) of arbitrarily large orders linking the vertices of W colored 1. Although it is not difficult, we will not prove this claim since we do not use it formally. Nevertheless, having the claim in mind facilitates the understanding of the proof. Informally, the construction consists of a tree-like graph of constant order (resembling binomial tree T6 ) whose root is adjacent to two vertices of a K6 (this constitutes W ) and contains three special vertices a4 , a21 , and a24 (which will have to be colored with colors 1, 3, and 2 respectively), a connected graph P1 which encodes the variables and a path P2 which encodes the clauses. One in three vertices every of P2 is adjacent to a4 , a21 and a24 . To achieve color 7, we will need to color those vertices with color strictly greater than 3. This will be possible if and only if the assignment corresponding to the coloring of P1 satisfies all the clauses. We now formally describe the construction. Let φ = (X = {x1 , . . . , xn }, C = {C1 , . . . , Cm }) be an instance of 3-SAT 3-OCC where no variable appears always as the same literal. P1 = ({i1 , i2 , v} ∪ {vi , vi | i ∈ [n]}, {{i1 , i2 }, {i2 , v}} ∪ {{v, vi } ∪ {v, vi } ∪ {vi , vi } | i ∈ [n]}) consists of n triangles sharing the vertex v. P2 = ({pj | j ∈ [3m − 1]}, {{pj , pj+1 } | j ∈ [3m − 2]) consists def

of a path of length 3m − 1. For each j ∈ [m] and i ∈ [n], cj = p3j−1 is adjacent to vi if xi appears positively in Cj , and is adjacent to vi if xi appears negatively in Cj . For each j ∈ [m], cj is adjacent to a4 , a21 , and a24 .

a4

a9

i1

c1

v

i2 v1

v1

v2

P1 v3

v2

c2

v4

v3

c3

a6

v4

P2 c4

a11

Figure 3: P1 and P2 for the instance {x1 ∨¬x2 ∨x3 }, {x1 ∨x2 ∨¬x4 }, {¬x1 ∨x3 ∨x4 }, {x2 ∨¬x3 ∨x4 }. Intuitively, setting a literal to true consists of coloring the corresponding vertices with 3. Therefore, a clause Cj is satisfied if cj has a 3 among its neighbors. To actually satisfy a clause, one has to color cj with 4 or higher. Thus, cj must also see a 2 in its neighborhood. We will show that the unique way of doing so is to color p3j−2 with 2, so all the clauses have to be checked along the path P2 . We give, in Figure 4, a coloring of P1 corresponding to a truth assignment of the instance SAT formula. One can check that when going along P2 all the cj ’s are colored with color 4. The constant gadget W is depicted in Figure 5. The waves between a4 and a6 , and between a9 and a11 correspond, respectively, to the gadgets encoding the variables (P1 ) and the clauses (P2 ) described above and drawn in Figure 3. A connected Grundy coloring achieving color 7 is given in Figure 6 provided that going from a9 to a11 can be done without coloring any vertex cj with color 2 or less. 12

2

1

1

2

4

2

1 3

1

1

3

2

1

4

1

1

3

2

3

4

1

1

1

2

4

1

Figure 4: A connected Grundy coloring such that all the cj ’s are colored with color at least 4. a30

a31

a29

a32 a28

a33 a27

a15

a1

a23

a7

a12

a13

a14

a3

a5

a6

a10

a11

a2

a4

a8

a9

a16

a22

a26

a21

a20

a17

a19

a25

a24

a18

Figure 5: The constant gadget. The doubly-circled vertices are adjacent to all the cj ’s (j ∈ [m]). In the following lemmas, we use extensively Observation 2 which states that a vertex with degree d gets a color at most d + 1. We observe that coloring with color d + 1 a vertex of degree d is useful only if we want to achieve color d+ 1. Indeed, otherwise, the vertex has all its neighbors already colored and cannot be used in the sequel. Moreover, if one wants to color a neighbor y of a vertex x to color x afterwards with a higher color, y cannot receive a color greater than its degree d(y). In particular, the only vertices that could achieve color k are vertices of degree at least k − 1 having at least one neighbor of degree at least k − 1. In the sequel, we call doubly-circled vertices the special vertices a4 , a21 and a24 , as they are doubly-circled in our figures. Lemma 25. To achieve color 7, a27 needs to be colored with color 6 (while for all i ∈ [28, 33], ai is still uncolored). Proof. One can achieve color 7 only in a vertex of degree at least 6 which has a neighbor of degree at least 6. There are m + 7 vertices of degree at least 6: a28 and a33 (of degree 6), a27 (of degree 7), all the cj ’s (of degree 8), v (of degree 2n + 2), a24 (of degree m + 2), a21 (of degree m + 3), and a4 (of degree m + 4). As each vertex cj is adjacent to a4 , a21 and a24 , we need to investigate the possibility of coloring with color 7, a vertex cj , a4 , a21 , or a24 . A vertex cj has two neighbors of degree 2 (p3j−2 and p3j ; or p3m−2 and a11 in the special case of cm ), three neighbors of degree at most 4 (the three vertices corresponding to the literals of Cj ) since a literal has at most two occurrences, and three vertices of degree more than m + 2 (a4 , a21 , and a24 ). So, if no doubly-circled vertex is colored yet, a vertex cj can be colored with a color at most 5. And if some doubly-circled vertices are already colored but with always the same color, a vertex cj can be colored with a color at most 6 (when the shared color of the doubly-circled vertices is 5).

13

3

4

2

5 1

7 6

5

1

4

4

3

1

2

3

2

1

2

1

2

1

2

1

1

2

1

3

1

2

2

3

2

1

Figure 6: A connected Grundy coloring of the constant gadget achieving color 7. The order is given by the sequence (ai )16i633 . Let show that the three doubly-circled vertices a4 , a21 , and a24 cannot take two different colors both greater or equal to 5. Indeed, suppose that two of those three vertices are colored with colors p and q such that p < q and p, q > 5. The doubly-circled vertex colored with color q must have a vertex colored p in its neighborhood, but that color p cannot come from a cj (since the vertex colored p is adjacent to the cj ’s). Thus, this color p must come from another neighbor. But, among all the neighbors of the doubly-circled vertices which are not a vertex cj , no vertex is of degree at least 5, a contradiction. From the last two paragraphs, we conclude that none of the vertices a4 , a21 , a24 , and the cj ’s can receive color 7. The only other pairs of adjacent vertices both of degree at least 6 are the pairs of the triangle formed by a27 , a28 and a33 . We observe that a27 is a cut-vertex whose removal disconnects the clique K6 from the rest of the graph. Hence, in a connected Grundy coloring, a27 cannot get a color higher than 6 since its degree in one part of this cut is 2 and in the other part its degree is 5. Vertex a33 (or by symmetry a28 ) can be colored with color 7, but then a27 has to be colored with color 6 otherwise it will lack a vertex colored 6 in its neighborhood. The conclusion is that the only way to achieve color 7 is to color a27 with color 6. Lemma 26. Vertices a26 , a22 , a25 , a23 , a15 must receive color 1, 2, 3, 4, 5 respectively. Proof. By Lemma 25, a27 must be colored with color 6 before the clique K6 is colored. Thus, the five neighbors of a27 which are not in the clique K6 must get all the colors from 1 to 5. Among those neighbors, the only vertex with degree 5 is a15 , so this vertex must get color 5. Vertices a23 and a25 both have degree 4 but for connectivity reasons a26 cannot be colored before a25 , so a25 cannot get a color higher than 3. Thus, a23 must get color 4. Vertex a22 can bring a 1 or a 2 to a27 while the pair (a25 , a26 ) can only bring the combinations (1, 2), (2, 1) or (3, 1). Thus, the unique way to bring 1, 2 and 3 to a27 is that a25 is colored 3, a26 is colored 1, and a22 is colored 2. Lemma 27. Vertex a7 must receive color 4. Proof. By Lemma 26, a15 has to receive color 5, so one of its four neighbors (apart from a27 ) must receive color 4. Only a7 and a12 have degree 4. But a12 cannot be colored 4 since its three neighbors a10 , a11 , and a13 (apart from a15 ) have only one neighbor which is neither a12 nor a15 , so none of these vertices can bring color 3 to a12 . 14

Lemma 28. Vertex a3 must receive color 3. Proof. By Lemma 27, a7 must be colored 4. Thus, one of its three neighbors a3 , a5 , and a6 (apart from a15 ) must receive color 3. Vertices a3 and a6 have two neighbors apart from a7 . But if a6 is colored with color 3, then a4 must be colored 3 to let colors 1 and 2 available for a3 and a5 . In that case, a3 and a5 would both receive color 1. Another attempt is to color a1 (or a2 ) with 1, a3 with 2 but then a4 has to be colored 1 and a5 can no longer be colored 1. Hence, only a3 can be colored with 3. Lemma 28 has further consequences: we must start the connected Grundy coloring by giving colors 1 and 2 to a1 and a2 . The only follow-up, for connectivity reasons, is then to color a3 with color 3 and a4 with color 1. Thus, vertices a5 and a6 has to be colored with colors 2 and 1 respectively (so that a7 can be colored 4). As, by Lemma 26, a25 must receive color 3, a24 must receive color 2 (since a4 has already color 1), so a18 must be colored 1. Lemma 29. Vertex a21 must receive color 3. Proof. By Lemma 26, a23 must get color 4, so its three neighbors apart from a27 must receive colors 1, 2 and 3. As a20 must be colored 1 (in order to color a22 with color 2), a21 will be colored 2 or 3. Suppose a21 is colored 2. Then, {a16 , a17 } must be colored 1 and 3. Vertex a17 cannot be colored 1 since a18 must get color 1, so a16 must get color 1 and a17 , color 3. In that case, a17 lacks a vertex colored 2 in its neighborhood, and therefore cannot be colored 3. So, a21 has to be colored 3 and a19 has to be colored 2 (since a20 has to get color 1). A further consequence of Lemma 29 is that a16 must be colored 2 and a17 must be colored 1 (the reverse being impossible, since a18 has to be colored 1). More importantly, we have now established that all the colored cj ’s (for each j ∈ [m]) have to be colored with color 4 or higher. Indeed, we recall that the three doubly-circled vertices (adjacent to all the cj ’s) a4 , a21 , and a24 must respectively get color 1, 3, and 2. In particular, after having colored a1 up to a4 , we cannot short-cut to P2 since it will color a cj with 2, so we have to color i1 with 2, i2 with 1, and v with 2. As v must be colored with color 2, none of the vertices encoding the literals can have color 2, so, again, we cannot short-cut from P1 to P2 otherwise, we would color a cj with 2. Then, we can partly (or entirely) color P1 but we have to color a6 with 1, a8 with 2, and a9 with 1. As a9 is forced to get color 1, a10 has to give a 2 to a12 and a11 is therefore forced to give color 1 to a12 . Lemma 30. The unique way of coloring a11 with color 1 without coloring any vertex cj with color 1, 2, or 3 is to color all the cj ’s for each j ∈ [m]. Proof. We recall that the first four vertices to be colored are a1 , a2 , a3 , When going along the path from a9 to a11 , the only vertex colored 2 which can be in the neighborhood of cj is p3j−2 . Indeed, we recall that the vertices encoding literals cannot be colored 2 since they are all adjacent to v which is colored 2. By induction, as the only way to color vertex p3j−2 with color 2 before cj is colored, is to color cj−1 , we have to color all the vertices in the path P2 . We remark that opposite literals are adjacent, so for each i ∈ [n], only one of vi and vi can be colored with color 3. We interpret coloring vi with 3 as setting xi to true and coloring vi with 3 as setting xi to false. Lemma 31. To color each cj (j ∈ [m]) of the path P2 with a color at least 4, the SAT formula must be satisfiable.

15

Proof. Each cj must have a vertex colored 3 in its neighborhood, but this vertex cannot be a21 since this vertex cannot be colored yet. We recall that a21 will be colored after a11 is colored. Thus, the vertex colored 3 can only belong to a set {vi , vi } encoding a literal li such that li is in Cj . Indeed, the neighbors p3j−2 and p3j are of degree 2 and a4 is already colored 1. Hence, there must be an assignment of the variables such that all the clauses of C are satisfied. As one cannot color both vi and vi with color 3, the coloring of P1 does constitute a feasible assignment. So, to achieve color 7 by a connected Grundy coloring the SAT formula has to be satisfiable. The reverse direction consists of finishing the connected Grundy coloring by giving a13 color 1 and a14 color 2, as shown in Figure 4 and Figure 6.

5

Concluding remarks and questions

We presented several positive and negative results concerning Grundy Coloring and two of its variants. To conclude this article, we suggest some questions which might be useful as a guide for further studies. There is a gap between the f (k, w) · n (and XP) algorithm of [32] and the lower bound of Theorem 13. Is Grundy Coloring in FPT when parameterized by treewidth? Two simpler questions are whether there is a better f (k, w)poly(n) algorithm (for example with f (k, w) = kO(w) ), and whether Grundy Coloring is in FPT when parameterized by the feedback vertex set number (it is easy to see that it is the case when parameterized by the vertex cover number). Grundy Coloring (parameterized by the number of colors) is in XP, and in FPT on many important graph classes. Yet, the central question whether Grundy Coloring is in FPT or W[1]-hard when parameterized by the number of colors remains impenetrable. Some perhaps more accessible research direction is to settle this question on bipartite graphs. It would also be interesting to determine the (classic) complexity of Grundy Coloring on interval graphs and chordal bipartite graphs (the latter question being asked in [30]). Also, we saw that the algorithm of [32] implies a pseudo-polynomial algorithm for planar (even apexminor-free) graphs, making it unlikely to be NP-complete on this class. Can one design a polynomial-time algorithm? Concerning Connected Grundy Coloring, we showed that it becomes NP-complete for k = 7. As Connected Grundy Coloring is polynomial-time solvable for k 6 3, its complexity status for 4 6 k 6 6 and/or on restricted graph classes remains open. Acknowledgements

We thank Sundar Vishwanathan for sending us the paper [15].

References [1] Noga Alon, Raphael Yuster, and Uri Zwick. Color-coding. Journal of the ACM, 42(4):844– 856, 1995. [2] J´ ulio Araujo and Cl´ audia Linhares Sales. On the Grundy number of graphs with few P4 ’s. Discrete Applied Mathematics, 160(18):2514 – 2522, 2012. [3] Fabr´ıcio Benevides, Victor Campos, Mitre Dourado, Simon Griffiths, Robert Morris, Leonardo Sampaio, and Ana Silva. Connected greedy colourings. In LATIN 2014, volume 8392 of Lecture Notes in Computer Science, pages 433–441. Springer, 2014. [4] Claude Berge. Graphs and Hypergraphs. North Holland, 1973.

16

[5] Andreas Bj¨ orklund, Thore Husfeldt, Petteri Kaski, and Mikko Koivisto. Fourier meets M¨obius: fast subset convolution. In Proc. 39th Annual ACM Symposium on Theory of Computing, STOC ’07, pages 67–74. ACM, 2007. [6] Hans L. Bodlaender. A tourist guide through treewidth. Acta Cybernetica, 11(1-2):1–21, 1993. [7] Gerard Jennhwa Chang and Hsiang-Chun Hsu. First-fit chromatic numbers of d-degenerate graphs. Discrete Mathematics, 312(12–13):2088 – 2090, 2012. [8] Claude A. Christen and Stanley M. Selkow. Some perfect coloring properties of graphs. Journal of Combinatorial Theory, Series B, 27(1):49 – 59, 1979. [9] Erik D. Demaine and MohammadTaghi Hajiaghayi. Equivalence of local treewidth and linear local treewidth and its algorithmic applications. In Proc. 15th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’04, pages 840–849. SIAM, 2004. [10] Rodney G. Downey and Michael R. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. [11] David Eppstein. Diameter and treewidth in minor-closed graph families. Algorithmica, 27(3):275–291, 2000. [12] Paul Erd˝os, W. R. Hare, Stephen T. Hedetniemi, and Renu Laskar. On the equality of the Grundy and ochromatic numbers of a graph. Journal of Graph Theory, 11(2):157–159, 1987. [13] J¨ org Flum and Martin Grohe. Fixed-parameter tractability, definability, and modelchecking. SIAM Journal on Computing, 31(1):113–145, 2001. [14] Martin F¨ urer and Shiva Prasad Kasiviswanathan. Algorithms for counting 2-SAT solutions and colorings with applications. In Proc. 3rd International Conference on Algorithmic Aspects in Information and Management, AAIM ’07, pages 47–57. Springer, 2007. [15] Navin Goyal and Sundar Vishwanathan. NP-completeness of undirected Grundy numbering and related problems. Manuscript, 1997. [16] Patrick Michael Grundy. Mathematics and games. Eureka, 2:6–8, 1939. [17] Andr´ as Gy´arf´as and Jen¨o Lehel. On-line and first fit colorings of graphs. Journal of Graph Theory, 12(2):217–227, 1988. [18] Fr´ed´eric Havet, Ana Karolinna Maia, and Min-Li Yu. Complexity of greedy edge-colouring. Research report RR-8171, INRIA, December 2012. [19] Fr´ed´eric Havet and Leonardo Sampaio. On the Grundy and b-chromatic numbers of a graph. Algorithmica, 65(4):885–899, 2013. [20] Sandra M. Hedetniemi, Stephen T. Hedetniemi, and Terry Beyer. A linear algorithm for the Grundy (coloring) number of a tree. Congressus Numerantium, 36:351–363, 1982. [21] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63(4):512–530, December 2001.

17

[22] Hal A. Kierstead and Karin R. Saoub. First-fit coloring of bounded tolerance graphs. Discrete Applied Mathematics, 159(7):605–611, 2011. [23] Guy Kortsarz. A lower bound for approximating Grundy numbering. Discrete Mathematics & Theoretical Computer Science, 9(1), 2007. [24] Eugene L. Lawler. A note on the complexity of the chromatic number problem. Information Processing Letters, 5(3):66 – 67, 1976. [25] Daniel Lokshtanov, D´aniel Marx, and Saket Saurabh. Known algorithms on graphs of bounded treewidth are probably optimal. In Proc. 22nd Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’11, pages 777–789. SIAM, 2011. [26] Wolfgang Mader. Homomorphieeigenschaften und mittlere kantendichte von graphen. Mathematische Annalen, 174(4):265–268, 1967. [27] N. S. Narayanaswamy and R. Subhash Babu. A note on first-fit coloring of interval graphs. Order, 25(1):49–53, 2008. [28] Rolf Niedermeier. Invitation to Fixed-Parameter Algorithms. Oxford University Press, February 2006. [29] Christos H. Papadimitriou. Computational complexity. Addison-Wesley, 1994. [30] Leonardo Sampaio. Algorithmic aspects of graph colouring heuristics. PhD thesis, University of Nice-Sophia Antipolis, November 2012. [31] Gustavus J. Simmons. The ochromatic number of graphs. Graph Theory Newsletters, 11(6):2–3, 1982. [32] Jan Arne Telle and Andrzej Proskurowski. Algorithms for vertex partitioning problems on partial k-trees. SIAM Journal on Discrete Mathematics, 10(4):529–550, 1997. [33] Manouchehr Zaker. The Grundy chromatic number of the complement of bipartite graphs. Australasian Journal of Combinatorics, 31:325–329, 2005. [34] Manouchehr Zaker. Results on the Grundy chromatic number of graphs. Discrete Mathematics, 306(23):3166–3173, 2006.

18