Computing the Chromatic Number Using Graph Decompositions via Matrix Rank

Computing the smallest number $q$ such that the vertices of a given graph can be properly $q$-colored is one of the oldest and most fundamental problems in combinatorial optimization. The $q$-Coloring problem has been studied intensively using the framework of parameterized algorithmics, resulting in a very good understanding of the best-possible algorithms for several parameterizations based on the structure of the graph. While there is an abundance of work for parameterizations based on decompositions of the graph by vertex separators, almost nothing is known about parameterizations based on edge separators. We fill this gap by studying $q$-Coloring parameterized by cutwidth, and parameterized by pathwidth in bounded-degree graphs. Our research uncovers interesting new ways to exploit small edge separators. We present two algorithms for $q$-Coloring parameterized by cutwidth $cutw$: a deterministic one that runs in time $O^*(2^{\omega \cdot cutw})$, where $\omega$ is the matrix multiplication constant, and a randomized one with runtime $O^*(2^{cutw})$. In sharp contrast to earlier work, the running time is independent of $q$. The dependence on cutwidth is optimal: we prove that even 3-Coloring cannot be solved in $O^*((2-\varepsilon)^{cutw})$ time assuming the Strong Exponential Time Hypothesis (SETH). Our algorithms rely on a new rank bound for a matrix that describes compatible colorings. Combined with a simple communication protocol for evaluating a product of two polynomials, this also yields an $O^*((\lfloor d/2\rfloor+1)^{pw})$ time randomized algorithm for $q$-Coloring on graphs of pathwidth $pw$ and maximum degree $d$. Such a runtime was first obtained by Bj\"orklund, but only for graphs with few proper colorings. We also prove that this result is optimal in the sense that no $O^*((\lfloor d/2\rfloor+1-\varepsilon)^{pw})$-time algorithm exists assuming SETH.


Introduction
Graph coloring is one of the most fundamental combinatorial problems, studied already in the 1850s. Countless papers (cf. [39]) and several monographs [29,30,34] have been devoted to its combinatorial and algorithmic investigation. Since the graph coloring problem is NPcomplete even in restricted settings such as planar graphs [22], considerable effort has been invested in finding polynomial-time approximation algorithms and exact algorithms that beat brute-force search [5,6].
A systematic study of which characteristics of inputs govern the complexity of the graph coloring problem has been undertaken using the framework of parameterized algorithmics. The aim in this framework is to obtain algorithms whose running time is of the form f (k) · n O (1) , where k is a parameter that measures the complexity of the instance and is independent of the number of vertices n in the input graph. Over the past decade, numerous parameters have been employed that quantify the structure of the underlying graph. In several settings, algorithms have been obtained that are optimal under the Strong Exponential Time Hypothesis (SETH) [25,26]. For example, it has long been known (cf. [10,Theorem 7.9], [41]) that testing q-colorability on a graph that is provided together with a tree decomposition of width k can be done in time O(q k · k O(1) · n). Lokshtanov, Marx, and Saurabh [35] proved a matching lower bound: an algorithm running in time (q − ε) k · n O(1) for any ε > 0 and integer q ≥ 3 would contradict SETH. Results are also known for graph coloring parameterized by the vertex cover number [27], pathwidth and the feedback vertex number [35], cliquewidth [18,24,32], twin-cover [21], modular-width [20], and split-matching width [40]. (See [17,Fig. 1] for relations between these parameters.) A survey of these algorithmic results for graph coloring results in the following picture of the complexity landscape: For graph parameters that are defined in terms of the width of decompositions by vertex separators (pathwidth, treewidth, vertex cover number, etc.), one can typically obtain a running time 3 of O * (q k ) to test whether a graph that is given together with a decomposition of width k is q-colorable, but assuming (S)ETH there is no algorithm with running time O * (c k ) for any constant c independent of q [27, Theorem 11].
The complexity of graph coloring parameterized by width measures based on vertex separators is therefore well-understood by now. However, only little attention has been paid to graph decompositions whose width is measured in terms of the number of edges in a separator. There is intriguing evidence that separators consisting of few edges (or, equivalently, consisting of a bounded number of bounded-degree vertices) can be algorithmically exploited in nontrivial ways when solving q-Coloring. In 2016, Björklund [4] presented a fascinating algebraic algorithm that decides q-colorability using an algorithmic variation on the Alon-Tarsi theorem [1]. Given a graph G of maximum degree d, a path decomposition of width k, and integers q and s, his algorithm runs in time ( d/2 + 1) k n O(1) · s. If the graph is not q-colorable it always outputs no. If the graph has at most s proper q-colorings, then it outputs yes with constant probability. Hence when q ≥ ( d/2 + 1) and s is small, it improves over the standard O * (q k )-time dynamic program by exploiting the boundeddegree vertex separators encoded in the path decomposition. However, the dependence of the running time on the number of proper q-colorings in the graph is very undesirable, as that number may be exponentially large in n.
Björklund's algorithm hints at the fact that graph decompositions whose width is governed by the number of edges in a separator may yield an algorithmic advantage over existing approaches. In this work, we therefore perform a deeper investigation of how decompositions by small edge separators can be exploited when solving q-Coloring. By leveraging a new rank upper bound for a matrix that describes the compatibility of colorings of subgraphs on two sides of a small edge separator, we obtain a number of novel algorithmic results. In particular, we show how to eliminate dependence on the number s of proper colorings.

Our results
We present efficient algorithms for q-Coloring parameterized by the width of various types of graph decompositions by small edge separators. Our first results are phrased in terms of the graph parameter cutwidth. A decomposition in this case corresponds to a linear ordering of the vertices; the cutwidth of this ordering is given by the maximum number of edges that connect a vertex in a prefix of the ordering to a vertex in the complement (see Section 2 for formal definitions). Cutwidth is one of the classic graph layout parameters (cf. [14]). It takes larger values than treewidth [33], and has been the subject of frequent study [23,42,43].
Informally speaking, we prove that interactions of partial solutions on low-cutwidth graphs are much simpler than interactions of partial solutions on low-pathwidth graphs. The rank-based approach developed in earlier work [8,11,19] can be used by setting up matrices whose rank determines the complexity of these interactions in low-cutwidth graphs. These are different from the matrices associated to partial solutions in low-pathwidth graphs, and admit better rank bounds. This is exploited by two different algorithms: a deterministic algorithm that employs fast matrix multiplication and therefore has the matrix-multiplication constant ω in its running time, and a faster randomized Monte Carlo algorithm.

Theorem 1.
There is a deterministic algorithm that, for any q, solves q-Coloring on a graph G with a given linear layout of cutwidth ctw in O * (2 ω·ctw ) time, where ω ≤ 2.373 is the matrix multiplication constant.

Theorem 2.
There is a randomized Monte Carlo algorithm that, for any q, solves q-Coloring on a graph G with a given linear layout of cutwidth ctw in O * (2 ctw ) time.
These results show a striking difference between cutwidth and parameterizations based on vertex separators such as treewidth and vertex cover number: we obtain single-exponential running times where the base of the exponent is independent of the number of colors q, which (assuming ETH) is impossible even parameterized by vertex cover [27]. The assumption that a decomposition is given in the input is standard in this line of research [8,12,11,19] and decouples the complexity of finding a decomposition from that of exploiting a decomposition.
The ideas underlying Theorems 1 and 2 can also be used to eliminate the dependence on the number of proper colorings from Björklund's algorithm. We prove the following theorem: Theorem 3. There is a randomized Monte Carlo algorithm that, for any q, solves q-Coloring on a graph G with maximum degree d and given path decomposition of width pw in O * (( d/2 + 1) pw ) time.
Our approach uses the first step of the proof of the Alon-Tarsi theorem (i.e. rewrite the problem into evaluating the graph polynomial) and also relates colorability to certain orientations, but deviates from the previous algorithm otherwise: to evaluate the appropriate graph polynomial we extend a fairly simple communication-efficient protocol to evaluate a product of two polynomials.
We also prove that the randomized algorithms of Theorem 2 and Theorem 3 are conditionally optimal, even when restricted to special cases:

Organization
In Section 2 we provide preliminaries. In Section 3 we present algorithms for graph coloring, proving Theorems 1, 2, and 3. In Section 4 we present reductions that show that our randomized algorithms cannot be improved significantly, assuming SETH, proving Theorems 4 and 5. Finally, we provide some conclusions in Section 5. Due to space restrictions, several proofs had to be moved to the appendix.

Preliminaries
We use N to denote the natural numbers, including 0. For a positive integer n and a set X we use X n to denote the collection of all subsets of X of size n. The power set of X is denoted 2 X . The set {1, . . . , n} is abbreviated as [n]. The O * notation suppresses polynomial factors in the input size n, such that O * (f (k)) is shorthand for O(f (k)n O(1) ). All our logarithms have base two. For sets S, T we denote by S T the set of vectors indexed by elements of T whose entries are from S. If T = [n], we use S n instead of S [n] .
We consider finite, simple, and undirected graphs G, consisting of a vertex set V (G) and . For a fixed integer q, the q-Coloring problem asks whether a given graph G has a proper q-coloring. The q-SAT problem asks whether a given Boolean formula, in conjunctive normal form with clauses of size at most q, has a satisfying assignment. ([25, 26]). For every ε > 0, there is a constant q such that q-SAT on n variables cannot be solved in time O * ((2 − ε) n ).

Strong Exponential Time Hypothesis
Cutwidth For an n-vertex graph G, a linear layout of G is a linear ordering of its vertex set, given by a bijection π : V (G) → [n]. The cutwidth of G with respect to the layout π is: and the cutwidth ctw(G) of a graph G is the minimum cutwidth attained by any linear layout. It is well-known (cf. [7]) that ctw(G) ≥ pw(G) ≥ tw(G), where the latter denote the pathwidth and treewidth of G, respectively. An intuitive way to think about cutwidth is to consider the vertices as being placed on a horizontal line in the order dictated by the layout π, with edges drawn as x-monotone curves. For any position i we consider the gap between vertex π −1 (i) and π −1 (i + 1), and count the edges that cross the gap by having one endpoint at position at most i and the other at position after i. The cutwidth of a layout is the maximum number of edges crossing any single gap.
Pathwidth and path decompositions A path decomposition of a graph G is a path P in which each node x has an associated set of vertices B x ⊆ V (G) (called a bag) such that x∈V (P ) B x = V (G) and the following properties hold: for all nodes z on the (unique) path from x to y in P . The width of P is the size of the largest bag minus one, and the pathwidth of a graph G is the minimum width over all possible path decompositions of G. Since our focus here is on dynamic programming over a path decomposition we only mention in passing that the related notion of treewidth can be defined in the same way, except for letting the nodes of the decomposition form a tree instead of a path.
It is common for the presentation of dynamic-programming algorithms to use path-and tree decompositions that are normalized in order to make the description easier to follow. For an overview of tree decompositions and dynamic programming on tree decompositions see e.g. [9]. Following [12] we use the following path decompositions: Definition 6 (Nice Path Decomposition). A nice path decomposition is a path decomposition where the underlying path of nodes is ordered from left to right (the predecessor of any node is its left neighbor) and in which each bag is of one of the following types: First (leftmost) bag: the bag associated with the leftmost node x is empty, B x = ∅. Introduce vertex bag: an internal node x of P with predecessor y such that B x = B y ∪ {v} for some v / ∈ B y . This bag is said to introduce v. Introduce edge bag: an internal node x of P labeled with an edge {u, v} ∈ E(G) with one predecessor y for which u, v ∈ B x = B y . This bag is said to introduce uv. Forget bag: an internal node x of P with one predecessor y for which B x = B y \ {v} for some v ∈ B y . This bag is said to forget v. Last (rightmost) bag: the bag associated with the rightmost node x is empty, B x = ∅.
It is easy to verify that any given path decomposition of pathwidth pw can be transformed in time |V (G)| · pw O(1) into a nice path decomposition without increasing the width. Let B 1 , . . . , B be a nice path decomposition of G. We say B i is before B j if i ≤ j. We denote V i = i j=1 B i and let E i denote the set of edges introduced in bags before i.

Upper bounds for Graph Coloring
In this section we outline algorithms for q-Coloring that run efficiently when given a graph and either a small-cutwidth layout or a good path decomposition on graphs with small maximum degree. We assume the input graph has no isolated vertices, as they are clearly irrelevant. We start by using the 'rank-based approach' as proposed in [8] to obtain deterministic algorithms, and afterward give a randomized algorithm with substantial speedup. In both approaches the idea is to employ dynamic programming to accumulate needed information about the existence of partial solutions, but use linear-algebraic methods to compress this information. Let us remark in passing that our approaches are robust in the sense that they directly extend to generalizations such as q-List Coloring in which for every vertex a set of allowed colors is given. 4 A key quantity that determines the amount of information needed after compression in general is the rank of a partial solutions matrix. This matrix has its rows and columns indexed by partial solutions (which could be defined in various ways) and an entry is 1 (or more generally, non-zero) if the two partial solutions combine to a solution. Previously, this method proved to be highly useful for connectivity problems parameterized by treewidth [8].

47:6 Chromatic Number via Matrix Rank
For q-Coloring parameterized by treewidth, partial solutions can naturally be defined as partial proper colorings of a subgraph whose boundary is formed by some vertex separator. Two partial colorings combine to a proper complete coloring if and only if the two partial colorings agree on the coloring of the separator. Unfortunately, the rank-based approach is not useful here as the partial solution matrices arising have large rank, as witnessed by induced identity submatrices of dimensions q tw . Indeed, the lower bound under SETH by Lokshtanov, Marx, and Saurabh [35] shows that no algorithm can solve the problem much faster than O * (q pw ), where pw denotes the pathwidth of the input graph.
Still, this does not exclude much faster running times parameterized by cutwidth. In our application of the rank-based approach for q-Coloring of a graph with a given linear layout of cutwidth ctw, the partial solutions are q-colorings of the first i and last n−i vertices in the linear order, and clearly only the colors assigned to vertices incident to the edges going over the cut are relevant. If we let X = X i , Y = Y i denote the endpoints of these edges occurring respectively not after and after i, and let H = H i denote the bipartite graph induced by the cut and these edges, we are set to study the rank of the following partial solutions matrix indexed by x ∈ [q] X and y ∈ [q] Y : Here and below, we slightly abuse notation by viewing elements of V I (i.e. vectors with values in V that are indexed by I) as sets of pairs in I × V ; that is, if x ∈ V I we also use x to denote the set {(i, x i )} i∈I . With this notation in mind, note that x ∪ y above can be interpreted as an element of [q] X∪Y in the natural way as X and Y are disjoint. As the rank of M H is generally high 5 and depends on q, we instead focus on the matrix M H defined by where all edges are directed from X to Y in E(H). The crux is that the support (e.g. Proof. If x v = y w for some (v, w) ∈ E(H) then the term (x v − y w ) is zero, implying the entire product on the right hand-side of (1) is zero. If x and y differ at every coordinate, then M H [x, y] is a product of nonzero terms, and therefore non-zero itself.
In Sections 3.1-3.2 this property will allow us to work with M H instead of M H , when combined with the Isolation Lemma or Gaussian-elimination approach; similarly as in previous work [8,11,12]. 6

A deterministic algorithm
We first show that M H has rank at most v∈X (d E(H) (v) + 1) by exhibiting an explicit factorization. Here we use the shorthand d W (v) for the number of edges in W containing vertex v. For a bipartite graph H with parts X, Y and edges oriented from X to Y , we have: (2) where the second equality follows by expanding the product and the third equality follows by grouping the summands on the number of edges incident to vertices in W included in X.
Expression (2) provides us with a matrix factorization . As the number of relevant sequences s is bounded by v∈X (d E(H) (v) + 1), the factorization implies the claimed rank bound for M H . 7 The rank bound allows some partial solutions to be pruned from the dynamic-programming table without changing the answer. The following definition captures correct reduction steps. Definition 8. Fix a bipartite graph H with parts X and Y and let S ⊆ [q] X be a set of q-colorings of X. We say S ⊆ [q] X H-represents S if S ⊆ S, and for each y ∈ [q] Y we have: (∃x ∈ S : x∪y is a proper coloring of H) ⇔ (∃x ∈ S : x ∪y is a proper coloring of H). (3) Note that the backward direction of (3) is implied by the property that S ⊆ S, but we state both for clarity. If H is clear from context it will be omitted. For future reference we record the observation that the transitivity of this relation follows directly from its definition: Observation 9. Let H be a bipartite graph with parts X and Y , and let A, B, C ⊆ [q] X . If A represents B and B represents C, then A represents C.
Given the above matrix factorization, we can directly follow the proof of [8,Theorem 3.7] to get the following result (note that ω denotes the matrix multiplication constant):

Lemma 10.
There is an algorithm reduce that, given a bipartite graph H with parts X, Y and a set S ⊆ [q] X , outputs in time Proof. The algorithm is as follows: compute explicitly the matrix L H [S, ·] (i.e. the submatrix of L H induced by all rows in S). As every entry of L H can be computed in polynomial time, clearly this can be done within the claimed time bound. Subsequently, the algorithm finds a row basis of this matrix and returns that set as S . As the rank of a matrix is at most its number of columns, |S | ≤ v∈X (d E(H) (v) + 1). Using [8,Lemma 3.15], this step also runs in the promised running time.
To see that S represents S, note that clearly S ⊆ S and thus it remains to prove the forward implication of (3). To this end, suppose that x ∪ y is a proper q-coloring of H and x ∈ S. As S is a row basis of L H , there exist x (1) , . . . , x ( ) ∈ S and λ 1 , . . . , λ such that where L H [x, ·] and R H [·, y] denote a row of L H and column of R H respectively. As x ∪ y is a proper coloring of H, Lemma 7 implies M H [x, y] is non-zero. Therefore there must also exist x (i) ∈ S such that M H [x (i) , y] is non-zero and hence x (i) ∪ y is a proper coloring of H.
Equipped with the algorithm reduce from Lemma 10 we are ready to present the algorithm for q-Coloring. On a high level, the algorithm uses a naïve dynamic-programming scheme, but by extensive use of the reduce procedure we efficiently represent sets of partial solutions and speed up the computation significantly.
First we need to introduce some notation. A vector x ∈ V I is an extension of a vector x ∈ V I if I ⊆ I and x i = x i for every i ∈ I . If x ∈ V I and P ⊆ I then the projection x |P is defined as the unique vector in V P of which x is an extension. Let G be the graph for which we need to decide whether a proper q-coloring exists and fix an ordering v 1 , . . . , v n of V (G). We denote all edges as directed pairs (v i , v j ) with i < j. For i = 1, . . . , n, define V i as the i'th prefix of this ordering, C i as the i'th cut in this ordering, and X i and Y i as the left and respectively right endpoints of the edges in this cut, i.e.
Xi be the set of all q-colorings of the vertices in X i that can be extended to a proper q-coloring of G[V i ]. The following lemma shows that we can continuously work with a table T that represents a table T : Proof. Assuming the hypothesis, we first show that Thus, to prove the lemma it remains to show the forward implication of (3). To this as it can be extended to a proper coloring of V i , and thus also to a proper coloring As no neighbor of v i was assigned color w vi by y, it follows that (x ∪ (v i , w vi )) ∪ y is an extension of a proper coloring of H i . As x ∪(y∪(v, w vi )) |Yi−1 is a proper coloring of H i−1 , no neighbors of v i are assigned color w vi by x , and by (4) we have that (x ∪ (v i , w vi )) ∈ T [i], as required. Now we combine Lemma 10 with Lemma 11 to obtain an algorithm to solve q-Coloring.

Lemma 12. q-Coloring can be solved in time
ω , which clearly is the bottleneck in the running time.
Theorem 1 now follows directly from this more general statement.
is upper bounded by 2 k by the AM-GM inequality. Thus the theorem follows from Lemma 12.

A randomized algorithm
In this section we use an idea similar to the idea from the matrix factorization of the previous section to obtain faster randomized algorithms. Specifically, our main technical result is as follows (recall that E i denotes the set of edges introduced in bags before B i ).

Theorem 13. There is a Monte Carlo algorithm for q-Coloring that, given a graph G and a nice path decomposition
). The algorithm does not give false-positives and returns the correct answer with high probability.
Similarly as in Lemma 7 we see that if P G = 0 then G has a proper q-coloring, and if G has a unique q-coloring then P G = 0 as it is the product of non-zero values. This is useful if the graph is guaranteed to have at most one proper q-coloring. To this end, we use a standard technique based on the Isolation Lemma, which we state now.
We will apply Lemma 15 to isolate the set of proper colorings of G. To this end, we use the set V (G) × [q] of vertex/color pairs as our universe U , and consider a weight func-

Chromatic Number via Matrix Rank
Let ω : V (G) × [q] → [2nq] be a random weight function, i.e. for every v ∈ V (G) and c ∈ [q] we pick an integer from [2nq] uniformly and independently at random. For every integer z we associate a number P G (z) with G, as follows: If G has no proper q-coloring, then P G (z) = 0 since for every q-coloring x there will be an edge (i, j) ∈ E for which x i = x j and therefore the product in (5) vanishes. We claim that if G has a proper q-coloring, then with probability at least 1/2 there exists z ≤ 2qn such that P G (z) = 0, which means we get a correct algorithm with high probability by repeating a polynomial in n number of times.
As F is non-empty, we may apply Lemma 15 to obtain that ω isolates F with probability at least 1/2. Conditioned on this event, there must exist an integer w such that there is exactly one proper q-coloring x of G satisfying ω(x) = z. In this case, x is the only summand in (5) that can have a non-zero contribution. Moreover, as it is a proper coloring, its contribution is a product of non-zero entries and therefore non-zero itself. Thus P G (z) is non-zero with probability at least 1/2. We now continue by showing how to compute P G (z) for all z ≤ 2qn quickly using dynamic programming. Note that by expanding the product in (5) we have: If B i is a bag of a path decomposition (Section 2), we need to define table entries T i containing all information about the graph (V i , E i ) needed to compute P G (z). Before we describe these table entries we make a small deviation to convey intuition about our approach. Specifically, we may interpret P G (z) as a polynomial in variables x v for v ∈ B i . Now suppose for simplicity that |B i | = 1. Then the amount of information about E i needed to compute P G (z) may be studied via a simple communication-complexity game that we now outline.
A One-way Communication Protocol Alice has a univariate polynomial P A (x) of degree d A , and Bob has a univariate polynomial P B (x) of degree d B . Both parties know d A , d B and an additional integer q. Alice needs to send as few bits as possible to Bob after which Bob needs to output the quantity x∈[q] P A (x)P B (x), where q ∈ N is known to both. An easy strategy is that Alice sends the d A + 1 coefficients of her polynomial to Bob. An alternative strategy for Alice is based on partial evaluations, which is useful when so as second strategy Alice may send the In our setting for defining table entries T i for evaluating P G (z), we think of d A (v) as the number of edges in E i incident to v and of d B (v) as the number of edges incident to v not in E i . Roughly speaking, the running time of Theorem 13 is obtained by defining table entries storing Alice's message, in which she chooses the best of the two strategies independently for every vertex.

Definition of the Table Entries
An orientation O of a subset X ⊆ E(G) of edges is a set of directed pairs such that for every {u, v} ∈ X, If O is an orientation of X, we also say O orients X. The number of reversals rev(O) of O is the number of (v, u) ∈ O such that u is introduced in a bag before the bag in which v is introduced. An orientation is even if its number of reversals is even, and it is odd otherwise.
For a fixed path decomposition B 1 , . . . , B of the input graph G, let L i ⊆ B i consist of all vertices in B i of which at most half of their incident edges are already introduced in B i or a bag before B i , and let R i = B i \ L i . Let l i be the vector indexed by L i such that for every v ∈ L i the value l i v denotes the number of edges incident to v already introduced before or at bag B i . Similarly, let r i be the vector indexed by R i such that for every v ∈ R i the value For d ∈ P(l i ) and e ∈ P(r i ), define: Intuitively, this could be seen as a partial evaluation of P G (z). Note we sum over all possible Thus P G (z) can be computed in the time stated in Theorem 13. As discussed, P G (z) = 0 if G has no proper q-coloring. Otherwise, ω isolates the set of proper q-colorings of G with probability at least 1/2. Conditioned on this event we have P G (z) = 0, where z is the weight of the unique minimum-weight q-coloring. Therefore we output yes if P G (z) = 0 for some z and obtain the claimed probabilistic guarantee. This concludes the proof of Theorem 13.
As special cases of Theorem 13 we obtain Theorems 2 and 3.
Proof of Theorem 2. Given a linear layout v 1 , . . . , v n of cutwidth k, define a nice path decomposition in which vertices are introduced in the order of the layout. After v i is introduced, its incident edges to v j with j < i are introduced in arbitrary order. Forget v i directly after the series of edge introductions that introduced its last incident edge.
As v 1 , . . . , v n has cutwidth at most k, for any bag B i of this path decomposition the number of edges between V i and V \ V i is at most k. Together with the edges incident on the most-recently introduced vertex v j , these k edges are the only edges incident on B i that are Vertex v j contributes at most one factor n. For the remaining vertices in B i , the only incident edges not in E i are those in the cut of size at most k. By the AM-GM inequality, their contribution to the product is maximized when they are all incident to distinct vertices, in which case the algorithm of Theorem 13 runs in time O * (2 k ).

Lower Bounds for Graph Coloring
In this section we discuss the main ideas behind our lower bounds, whose proofs are deferred to the appendix. We first start with Theorem 4, which rules out algorithms for solving 3-Coloring in time O * ((2 − ε) ctw ), even on planar graphs. (We remark that a companion paper [44] was the first to present lower bounds for planar graphs of bounded cutwidth.) The overall approach is based on the framework by Lokshtanov et al. [35]. We prove that an n-variable instance of CNF-SAT can be transformed in polynomial time into an equivalent instance of 3-Coloring on a planar graph G with a linear layout of cutwidth n + O(1).
Consequently, saving ε in the base of the exponent when solving graph coloring would violate SETH. By employing clause-checking gadgets in the form of a path [27], crossover gadgets [22], and a carefully constructed ordering of the graph, we get the desired reduction. The second lower bound, Theorem 5, rules out algorithms with running time O * (( d/2 + 1 − ε) pw ) for solving q-Coloring for q := d/2 + 1 on graphs of maximum degree d and pathwidth pw, for any odd integer d ≥ 5. The reduction employs chains of cliques to propagate assignments throughout a bounded-pathwidth graph. A t-chain of q-cliques is the graph obtained from a sequence of t vertex-disjoint q-cliques by selecting a distinguished terminal vertex in each clique and connecting it to the (q − 1) non-terminals in the previous clique. Any proper q-coloring of a chain assigns all terminals the same color, and terminals have 2(q−1) neighbors in the chain. Therefore, we can propagate a choice with q possibilities throughout a path decomposition. We encode truth assignments to variables of a CNF-SAT instance through colors given to the terminals of such chains. We enforce that the encoded truth assignment satisfies a clause, by enforcing that an assignment that does not satisfy the clause, is not the one encoded by the coloring. To check this, we take one terminal from each chain and connect it to a partner on a path gadget that forbids a specific coloring. Hence each vertex on a chain will receive at most one more neighbor, giving a maximum degree of d := 2(q − 1) + 1 = 2q − 1 to represent a q-Coloring instance. Then solving this q-Coloring instance in O * (( d/2 + 1 − ε) pw ) = O * (((q − 1) + 1 − ε) pw ) time will contradict SETH for the same reason as in the earlier construction [35] showing the impossibility of O * ((q − ε) pw )-time algorithms.

Conclusion
We showed how graph decompositions using small edge separators can be used to solve q-Coloring. The exponential parts of the running times of our algorithms are independent of q, which is a significant difference compared to algorithms for parameterizations based on vertex separators. The deterministic O * (2 ω·ctw ) algorithm of Theorem 1 for the cutwidth parameterization follows cleanly from the bound on the rank of the partial solutions matrix. It may serve as an insightful new illustration of the rank-based approach for dynamicprogramming algorithms in the spirit of [8,11,12,19]. One of the main take-away messages from this work from a practical viewpoint is the following. Suppose H is a subgraph of G connected to the remainder of the graph by k edges. Then any set of partial colorings S of H can be reduced to a subset S of size 2 k , with the guarantee that if some coloring in S could be extended to a proper coloring of G, then this still holds for S . The reduction can be achieved by an application of Gaussian elimination, which has experimentally been shown to work well for speeding up dynamic programming for other problems [16]. We therefore believe the table-reduction steps presented here may also be useful when solving graph coloring over tree-or path decompositions, and can be applied whenever processing a separator consisting of few edges.

A Proof of Lemma 17: A Recurrence for Computing Table Entries for the Randomized Algorithm
In this section we provide a recurrence to compute table entries as defined in (7). We make a case distinction based on the bag type: Left-most Bag: If B i is a leaf bag (i.e. i = 1 and V i = ∅), then V i \ L i has one q-coloring of weight 0 and orientation of the empty set which amounts to one summand which contributes 1, so where ∅ denotes the unique 0-dimensional vector.

Introduce Edge Bag: Suppose the edge (v, w) is introduced in bag
Let f 1 denote the edge (v, w) and f 2 denote its reversal (w, v). For j ∈ {1, 2} define , so it remains to compute the latter two expressions. We will focus on how to compute T z i,1 [d, e] as computing T z i,2 [d, e] is done similarly by replacing v with w, replacing f 1 by f 2 , and multiplying by −1 (to account for rev(O)). We distinguish the following cases: v is in L i : As f 1 contributes one to d + O (v), we have x v (interpreting x v as being bound by the quantification in the expression for T z i−1 [d, e]) so that we obtain Recall the range of the weight function ω : V (G) × [q] → [2nq]. Using the above recurrence, we can compute P G (z) for every 0 ≤ z ≤ 2nq in time poly(n) · i=1 T i where This concludes the proof of Lemma 17.

B
Lower bounds for graph coloring

B.1 Lower bounds for 3-coloring on planar graphs of bounded cutwidth
In this section we prove that 3-Coloring on planar graphs of cutwidth k cannot be solved in O * ((2 − ε) k ) time for any ε > 0, unless SETH fails. To lift our hardness result to planar graphs, we will employ ideas from the NP-completeness proof of 3-Coloring on planar graphs by Garey, Johnson, and Stockmeyer [22, Thm. 2.2]. It relies on the gadget graph H col due to Michael Fischer that is shown in Figure 1. We introduce some terminology for working with planar graphs, as well as drawings of non-planar graphs. A drawing of a graph G is a function ψ that assigns a unique point ψ(v) ∈ we have a planar drawing. We will combine (non-planar) drawings with crossover gadgets to build planar drawings. A graph is planar if it admits a planar drawing.
The operation of identifying vertices u and v in a graph G results in the graph G that is obtained from G by replacing the two vertices u and v by a new vertex w with N G (w) = N G ({u, v}).
The following theorem is illustrated in Figure 1.

For each {x, y} ∈ E(G), choose one endpoint as the distinguished endpoint and identify it with the nearest new vertex on the curve ψ({u, v}). Then the resulting graph G is planar, and it has a proper 3-coloring if and only if G has one.
Using Theorem 19 we present our lower bound for solving 3-Coloring on planar graphs of bounded cutwidth. The following lemma is the main ingredient.
Lemma 20. There is a polynomial-time algorithm that, given a CNF formula φ on n variables, constructs a planar graph G together with a linear layout π with ctw π (G) ≤ n + O(1), such that φ is satisfiable if and only if G is 3-colorable.
Proof. The construction is split into three steps. (I) In the first step we transform φ into a non-planar List-3-Coloring instance (G 1 , L 1 ) of cutwidth n + O(1). In this list-coloring instance, each vertex v ∈ V (G 1 ) is assigned a list L 1 (v) ⊆ [3] of allowed colors. The   x3 ∨ x5). The List-3-Coloring instance (G1, L1) that is constructed for φ is drawn. The colors available to a vertex are drawn inside the circle that represents it, using the encoding that 1 is red, 2 is blue, and 3 is green. Observe that a clause path such as D3 cannot be properly colored without using color 3 (green).
question is whether G 1 has a proper 3-coloring f : . We will ensure that such a list coloring exists if and only if φ is satisfiable. (II) In the second step we transform the List-3-Coloring instance (G 1 , L 1 ) into an equivalent instance G 2 of the plain 3-Coloring problem, while maintaining a bound of n + O(1) on the cutwidth of G 2 . (III) Finally, we draw G 2 in a particular way and use Theorem 19 to turn it into a planar graph G 3 without blowing up the cutwidth.

(I) Constructing a list-coloring instance
This part is almost identical to a construction in earlier work [28, Thm. 2] giving kernelization lower bounds for structural parameterizations of graph coloring problems. We repeat it here because the remainder of the proof builds on it. Let φ be a CNF formula on variables x 1 , . . . , x n with clauses C 1 , . . . , C m . We assume without loss of generality that no clause of φ contains repeated literals, since repetitions can be omitted without changing the satisfiability status. We also assume that no clause contains a literal and its negation (such clauses are trivially satisfied). For j ∈ [m] we use |C j | to denote the number of literals in C j , each of which is of the form x i or ¬x i for some i ∈ [n]. Construct a graph G 1 and a list function L 1 : V (G 1 ) → 2 [3] as follows (see Figure 2).  vertices a j,1 , b j,1 , . . . , a j,|Cj | , b j,|Cj | . We refer to D j as the clause path for C j . Set the lists of its vertices as follows. Observe that in any proper list coloring of the path D j , one of the vertices has to receive color 3. If no vertex has color 3, then the lists enforce that a j,1 and b j,|Cj | both have color 2 while the colors must alternate between 1 and 2 along the path; this implies that two adjacent vertices receive identical colors since the path contains an even number of vertices. 3. As the last part of the construction we connect the clause paths to the variable paths to enforce that clauses are satisfied. For each j ∈ [m], let i1 , i2 , . . . , i |C j | be the literals occurring in clause C j , and sort them such that i 1 < i 2 < . . . < i |Cj | . For each k ∈ [|C j |], do the following. If i k is a positive occurrence of variable x i k , then make a j,k adjacent to T i k ,j ; if i k = ¬x i k is a negative occurrence, make a j,k adjacent to F i k ,j instead.
This completes the construction of the list-coloring instance (G 1 , L 1 ). It remains to extend the coloring to the clause paths. Since there are no edges between clause paths, this can be done independently for all such paths. So let j ∈ [m] and consider the clause path D j . Each a-vertex on D j is adjacent to exactly one vertex of a variable path, which represents a literal of C j and to which we already assigned a color; we call this vertex the special neighbor of the a-vertex. For each k ∈ [|C j |] for which the special neighbor of a j,k is colored 2, set f (a j,k ) = 3. Since the a-vertices are pairwise nonadjacent, this does not introduce any conflicts. If the k'th literal of clause C j evaluates to true under v, then the corresponding vertex is colored 2 by the process above, and a j,k will be colored 3. Since each clause contains at least one literal that evaluates to true, we assign at least one a-vertex of D j color 3 in this way. Color the remaining vertices of D j as follows.

1.
Consider the prefix D j of D j starting from a j,1 up to (but not including) the first a-vertex that is colored 3. (If we assigned a j,1 the color 3 then this prefix is empty and we skip this step.) Assign the a-vertices in the prefix the color 2 and the b-vertices the color 1.

2.
Assign the remaining uncolored a-vertices the color 1, and assign the remaining uncolored b-vertices the color 2. It is straightforward to verify that each vertex on D j is assigned a color from its list, and that the colors of adjacent vertices on D j are distinct. To see that no vertex of D j is assigned the same color as a neighbor on a variable path, it suffices to observe the following. For a-vertices whose special neighbor represents a literal evaluating to true under v, the literal is colored 2 and the a-vertex is colored 3. For a-vertices whose adjacent literal evaluates to false, the literal is colored 3 and the a-vertex is colored 2 (if it belongs to the prefix D j ) or 1 (if it does not). After extending the partial coloring to each clause path independently, we obtain a proper list coloring of G 1 .
(⇐) For the reverse direction, suppose that G 1 has a proper list coloring f : . Create a truth assignment v : [n] → {true, false} by setting v(i) = true if all a-vertices on the variable path X i are colored 2, and setting v(i) = false if the a-vertices are all colored 3. To see that this is a satisfying assignment, consider an arbitrary clause C j . As remarked during the construction of G 1 , the fact that the clause path D j is properly list colored implies that at least one vertex of D j has color 3. Since 3 does not appear on the list of the b-vertices, some a-vertex a j,k is colored 3. This implies that the neighbor of a j,k on a variable path is colored 2, implying that a vertex representing the k'th literal of C j was colored 2. Hence the k'th literal of C j evaluates to true under the constructed assignment, implying that v satisfies all clauses.  The cutwidth of G 1 is n + O(1), but we will not prove this fact. Instead, we will bound the cutwidth of the graphs G 2 and G 3 constructed in next phases.

47:21
(II) Reducing to plain 3-coloring Next we reduce (G 1 , L 1 ) to an equivalent 3-Coloring instance G 2 while controlling the cutwidth. In most scenarios, reducing from List q-Coloring to plain q-Coloring is easy: insert a clique of vertices {p 1 , . . . , p q } into the graph, and for each color i that does not appear on the list of a vertex v, make v adjacent to p i . We cannot use this approach here, since it can cause some p i to have degree proportional to the size of the graph. As the size of the graph G 1 is linear in the number of clauses m of the n-variable formula φ, and the cutwidth of a graph with a vertex of degree d is at least d/2 , this would not result in a graph of cutwidth n + O(1). Hence we are forced to take a more involved approach. Rather than having a single vertex p i that is used to block color i from the lists of all vertices on which i may not be used, we create a chain of triangles in which the color i repeats. Then we connect each repetition to only constantly many vertices, to avoid creating high-degree vertices.
For an integer t, by a chain of t triangles we mean the structure consisting of t vertexdisjoint triangles Z 1 , . . . , Z t , in which each triangle Z i contains a distinguished terminal vertex z i , such that for each i ∈ [t − 1] the terminal vertex z i+1 is adjacent to the two non-terminal vertices in Z i .

Observation 22. In a proper 3-coloring of a chain of triangles, all terminal vertices receive the same color.
Using this notion we transform (G 1 , L 1 ) into a plain 3-Coloring instance G 2 , as follows (see Figure 3). 1. Initialize G 2 as a copy of G 1 .

2.
For each color c ∈ [3], create a chain Z c of 2nm triangles. Refer to the triangles in chain Z c as Z c,1 , . . . , Z c,2nm and to the terminal vertices as z c,1 , . . . , z c,2nm . 3. Insert edges to turn {z 1,1 , z 2,1 , z 3,1 } into a triangle. This ensures that among these three vertices, each of the three colors appears exactly once in a proper 3-coloring. Next, we connect vertices of V (G 1 ) to terminal vertices of the chains Z 1 , Z 2 , Z 3 to enforce the lists. 4. For each i ∈ [n], for each j ∈ [m], for each color c ∈ [3], do the following.
This concludes the description of the graph G 2 . The way in which vertices of V (G 1 ) are connected to vertices on the chains will be exploited later, when planarizing the graph.
Claim 23. Graph G 2 has a proper 3-coloring ⇔ graph G 1 has a proper 3-coloring respecting the lists L 1 .
Proof. (⇒) Suppose G 2 has a proper 3-coloring f 2 . Since {z 1,1 , z 2,1 , z 3,1 } forms a triangle by Step 2, each of these vertices has a unique color. Permute the color set of f 2 so that z c,1 receives color c, for all c ∈ [3]. By Observation 22 this implies that all terminals on chain Z c receive color c. For each vertex v ∈ V (G 1 ) ∩ V (G 2 ), for each color c ∈ [3] \ L 1 (v), we made v adjacent to a terminal vertex of chain Z c , implying that v does not receive color c under f 2 . Hence each vertex of V (G 1 ) receives a color from its list. Since G 1 is a subgraph of G 2 , it follows that f 2 restricted to the vertices in G 1 forms a proper list coloring of G 1 .
(⇐) Suppose G 1 has a proper 3-coloring f 1 that respects the lists L 1 . Create a coloring f 2 of G 2 as follows.
, give all terminals of chain Z c the color c, and give the non-terminal vertices in each triangle distinct colors unequal to c. It is easy to verify that this results in a proper 3-coloring of G 2 .
We construct a drawing ψ of G 2 as follows; see Figure 3. 1. Draw the variable paths horizontally stacked above one another, such that the indices of the vertices along one variable path X i increase from left to right, and such that variable path X i+1 is drawn below X i for all i ∈ [n − 1]. Ensure that for all j ∈ [m], the vertices {T i,j | i ∈ [n]} are on a vertical line, and the vertices {F i,j | i ∈ [n]} are on a vertical line. For a given j ∈ [m], we will refer to the area of the plane enclosed by these two vertical lines as the j'th column. The horizontal lines for the variable paths divide each column into n + 1 cells: one cell above each variable path X i in the column, and one more cell at the bottom of the column. We refer to the cell just above variable path X i in the j'th column as A i,j ; the bottom cell of the column is A n+1,j .

2.
For each j ∈ [m], draw clause path D j vertically in the j'th column such that the indices of its vertices increase from top to bottom. For k ∈ [|C j |], draw the two vertices a j,k , b j,k just above the horizontal line for the variable path representing the k'th literal of C j . 3. For each color c ∈ [3], the chain of triangles Z c winds up and down in the m columns of the drawing. Exactly 2n triangles of the chain are drawn in each column. The first triangle of the chain is drawn in the top-left corner of the first column. Each of the 2n triangles in the j'th column crosses a variable path, as visualized in Figure 3. Note that no two triangle-edges cross in the drawing; the drawing of G 2 [Z 1 ∪ Z 2 ∪ Z 3 ] is planar, including the triangle constructed in Step 2. The chain Z 1 is on the left when going down in the column and on the right when going up on the other side. The chain Z 3 is on the right when going down and on the left when going up, and Z 2 is in between them.

4.
We draw the edges connecting variable paths to triangle chains. Each vertex on a variable path X i is adjacent to a terminal vertex of Z 1 , since 1 / ∈ L 1 (T i,j ) and 1 ∈ L 1 (F i,j ) for any i and j. Due to the layout of the chains, the edge from a T -vertex or F -vertex to the terminal on the Z 1 chain to which it is adjacent, can be drawn without crossings, in the same cell as the corresponding terminal vertex on Z 1 . There are no other edges between variable paths and triangle chains. 5. Finally, we draw the edges that connect a clause path to a triangle chain or variable path. The connections from vertices on the clause paths D j to their special neighbor on the variable paths, and to terminal vertices on the triangle chains, may cross other edges. We draw them such that they stay within the cell of the drawing in which the vertex from the clause path is drawn, and only cross the connections between successive triangles in that cell of the drawing.
This concludes the description of the drawing ψ. It is straight-forward (but tedious) to automate this process; there is a polynomial-time algorithm constructing a drawing with the described properties.

Observation 24. For any
} are not crossed in drawing ψ, and the edges that connect triangles in the j'th column to triangles in the j + 1'th column are not crossed either.
Proof. We describe the linear layout based on the subdivision of the drawing ψ of G 2 into cells. Consider a cell A i,j (i ∈ [n + 1], j ∈ [m]) of the drawing of G 2 , as illustrated in Figure 3. Associate to this cell the vertices lying inside the cell, together with the two vertices T i,j , F i,j on the boundary if i ≤ n. Then every vertex of G 2 belongs to exactly one cell, each cell contains constantly many vertices, and the neighbors of a vertex in cell A i,j lie in the same cell, or one of the four adjacent cells. There is a constant number of edges connecting cell A i,j to A i+1,j for any choice of i and j. Crucially, for 1 < i ≤ n there is only a single edge connecting cell A i,j to A i,j+1 : this is the edge {F i,j , T i,j+1 }. (For i = 1 there are six edges on triangle chains connecting A 1,j to A 1,j+1 , and for i = n + 1 there are no edges to A n+1,j+1 .) Consider a linear layout π 2 of G 2 which enumerates the cells in column-major order: it enumerates all cells of column j before moving on to column j + 1, and within one column it enumerates all vertices of a cell A i,j before moving on to cell A i+1,j . The relative order of vertices from the same cell is not important.
We claim that ctw π2 (G 2 ) ≤ n + O(1). To see this, consider an arbitrary position p in the ordering and consider the cut C of edges that connect a vertex with index at most p, to a vertex with index greater than p. Let i ∈ [n + 1] and j ∈ [m] such that vertex π 2 (p) belongs to cell A i,j . We now bound the number of edges in C based on the cells that contain their endpoints. Since π 2 enumerated cells in column-major order, and vertices in a cell are only adjacent to vertices in adjacent cells, the edges in cut C must be of one of the following types: Edges that connect two vertices from A i,j to each other, or that connect  Edges that connect a cell A i ,j for i < i to the cell on its right. Since horizontallyneighboring cells are connected by exactly one edge for 1 < i ≤ n, and by O(1) edges otherwise, there are i + O(1) such edges. Edges that connect a cell A i ,j−1 for i > i to the cell on their right. There are at most n − i such edges. This accounts for all possible edges in C. In particular, that there are no edges in C whose endpoints both lie in cells that come before A i,j in the column-major order, or both lie in cells coming after A i,j . It follows that cut C contains at most n + O(1) edges, which proves that ctw π2 (G 2 ) ≤ n + O(1). It is trivial to construct π 2 in polynomial time.
(III) Reducing to a planar graph The final step of the construction turns G 2 into a planar graph of cutwidth n + O(1). Let G 3 be obtained by applying Theorem 19 on the drawing ψ of G 2 constructed above. The choice of which endpoint to distinguish in Step 3 of the transformation can be made arbitrarily. See Figure 4 for an illustration. By Theorem 19, we know that G 3 is 3-colorable if and only if G 2 is; by Claims 21 and 23, this happens if and only if φ is satisfiable. It is straightforward to implement the transformation in polynomial time. The following claim bounds the cutwidth of G 3 .

Claim 26. A linear layout
Proof. The strategy used in the proof of Claim 25 can be easily adapted for G 3 . The drawing of G 3 that is obtained from Theorem 19 can be used to partition V (G 3 ) into columns and cells, such that ordering the vertices in column-major order achieves the desired cutwidth. Concretely, the planarization procedure inserts copies of H col into cells of the drawing of G 2 . Each such inserted vertex is associated to the cell in which the inserted vertex lies, with ties broken arbitrarily. By Observation 24, the single edge connecting a cell A i,j for 1 < i ≤ n to the cell A i,j+1 in G 2 is not crossed, and therefore remains a single connecting edge in G 3 . As the number of vertices in each cell increases by a constant, the argumentation of Claim 25 goes through unchanged to argue that a column-major ordering π 3 of V (G 3 ) has cutwidth n + O(1). It can easily be constructed in polynomial time.
This completes the proof of Lemma 20.
Using Lemma 20, it is easy to prove the claimed runtime lower bound for 3-Coloring.
Proof of Theorem 4. Suppose 3-Coloring on a planar graph with a given linear layout of cutwidth k can be solved in O * ((2 − ε) k ) time for some ε > 0, by an algorithm called A. Then CNF-SAT with clauses of arbitrary size can be solved in O * ((2 − ε) k ) time by turning an input formula φ into a planar graph G with linear layout π of cutwidth n + O(1) using Lemma 20, and then running A on (G, π). This contradicts SETH.

B.2 Lower bounds for coloring on graphs of bounded pathwidth and degree
In this section we prove that the base of the exponent in the running time of Theorem 3 is optimal for every odd d ≥ 5. Our proof is inspired by a construction due to Jaffke and Jansen [27, Theorem 15]   The lemma gives a way to construct a small path that forbids a specific coloring to be used on a given set of vertices, in a list-coloring instance. If (v 1 , . . . , v m ) are vertices in a graph under construction for which we want to forbid a certain coloring (c 1 , . . . , c m ) ∈ [q] m (i.e. we want to ensure that it is not the case that v i will be colored c i for all i ∈ [m]), then this can be achieved as follows. We create a gadget (P, Λ), add it to the graph, and connect each vertex v i to the corresponding distinguished vertex π i on the path. Given a coloring on the vertices v 1 , . . . , v m , if we want to find a proper coloring of the path P , we have to assign each π i a color different from its partner v i ; hence π i has to avoid the color d i given to v i . The lemma guarantees that each π i can avoid its forbidden color d i , if and only if (d 1 , . . . , d m ) = (c 1 , . . . , c m ); hence a coloring of (v 1 , . . . , v m ) can be extended to P if and only if it is not the coloring (c 1 , . . . , c m ) the gadget is meant to forbid.
The second gadget we need in the construction is a chain of cliques, to propagate a coloring choice throughout a small-pathwidth graph. For integers t ∈ N and q ∈ N, define a t-chain of q-cliques as the graph constructed as follows. Start from a disjoint union of t cliques Z 1 , . . . , Z t of size q each, in which each clique Z i contains a distinguished terminal vertex z i ∈ Z i . For each i ∈ [t − 1], connect the terminal vertex z i+1 ∈ Z i+1 to the q − 1 non-terminal vertices in Z i .

Proposition 28.
In any proper q-coloring of a t-chain of q-cliques, all distinguished vertices have the same color.
Proof. In the first q-clique Z 1 , all q colors occur exactly once. Since z 2 is adjacent to all vertices in Z 1 except the terminal, the (q − 1)-colors of the non-terminals in Z 1 cannot be used on terminal z 2 , hence z 2 must receive the same color as z 1 . Repeating this argument shows that all terminals have the same color.
Observe that the maximum degree in a t-chain of q-cliques is 2(q − 1), which is achieved by any terminal vertex z i in the interior of the chain. It is adjacent to q − 1 vertices in its own clique Z i , and to q − 1 non-terminal vertices in Z i−1 .
The main idea of the reduction is that by creating a chain of cliques, we can propagate a choice with q possibilities (the color of the terminals) throughout a path decomposition, using vertices of degree at most 2(q − 1). We will encode truth assignments to variables of a CNF-SAT instance through colors given to such chains. We will enforce that the encoded truth assignment satisfies a clause, by enforcing that an assignment that does not satisfy the clause, is not the one encoded by the coloring. To check this, we take one terminal from each chain and connect it to a partner on a path gadget (P, Λ) that forbids a specific coloring. Hence each vertex on a chain will receive at most one more neighbor, giving a maximum degree of d := 2(q − 1) + 1 = 2q − 1 to represent a q-Coloring instance. Then solving this q-Coloring instance in O * (( d/2 +1−ε) pw ) = O * (((q −1)+1−ε) pw ) time will contradict SETH for the same reason as in the earlier construction showing the impossibility of O * ((q − ε) pw )-time algorithms.
We are now ready to prove the main result of this section. Note that Theorem 5 is a direct consequence of this result. Proof. Suppose there is some ε > 0 such that q d -Coloring can be solved in time We will show that this implies the existence of δ > 0 such that for each constant s ∈ N, the CNF-SAT problem with clauses of size at most s (s-SAT) can be solved in O * ((2 − δ) n ) time for formulas with n variables. (We refer to this problem as s-SAT instead of q-SAT in this proof, to avoid confusion with the number of colors.) We choose an integer p depending on ε, in a way explained later. Take an n-variable input formula φ of s-SAT for some constant s. Let C 1 , . . . , C m be the clauses of φ, and assume without loss of generality that no clause contains contradicting literals and that each variable occurs in at least one clause. Split the variables x 1 , . . . , x n of φ into groups F 1 , . . . , F t , each of size at most β := log((q d ) p ) = p log q d so that t = n/β . A truth assignment to the variables in one group F i is a group assignment. A group assignment for F i satisfies a clause C j if F i contains a variable x such that (i) x is set to true by the group assignment and x is a literal in C j , or (ii) x is set to false by the group assignment and ¬x is a literal in C j . Since there are (q d ) p distinct q d -colorings of V i , and F i contains at most β = log((q d ) p ) variables, it follows that the number of q d -colorings of V i is at least as large as the number of group assignments for F i which is 2 |Fi| ≤ 2 β ≤ (q d ) p . For each group i ∈ [t], we can therefore find an efficiently computable injection g i : 2 |Fi| → [q d ] p that assigns to each group assignment for F i a unique (q d )-coloring of V i .
The colorings of the chains constructed for the groups F i will represent a truth assignment for the variables of φ. In addition, we create q d more chains that will be used to simulate list-coloring behavior of the path gadgets constructed by Lemma 27. Let N ∈ O((q d ) s ) such that when applying Lemma 27 to obtain a path gadget to block a coloring of at most (q d ) s vertices, the resulting path gadget has at most N vertices. We create a color chain We connect the first terminal vertex on each color chain to the first terminal vertex of the other color chains, so that they form a clique of size q d called the palette. In a proper q d -coloring, each vertex of the palette receives a unique color, and this color repeats on all later terminal vertices on the same chain. To simulate a vertex v in a list-coloring gadget whose list forbids the use of color i, we will connect v to a terminal on color chain Y i .
The chains constructed so far from the heart of the instance. The remainder of the instance will be formed by path gadgets constructed using Lemma 27, which will enforce that a proper q d -coloring of the graph encodes a truth assignment that satisfies all clauses.
For each clause index j ∈ [m], we augment the graph to enforce that C j is satisfied. The clause C j contains s ≤ s variables x j 1 , . . . , x j s , which are spread over s ≤ s different groups F j1 , . . . , F j s whose group assignments are encoded by colorings of V j1 , . . . , V j s . There is exactly one assignment to the variables in C j that does not satisfy clause C j . Now do the following. Consider the tuples of colorings (f 1 : V j1 → [q d ] p , . . . , f s : V j s → [q d ] p ) with the property that (i) some coloring in this tuple does not correspond to a group assignment, or (ii) all colorings correspond to group assignments, but none of these group assignments satisfy clause C j . For each such tuple, construct a q d -list-coloring instance (P, Λ) using Lemma 27 for the forbidden coloring given by (the concatenation of) f 1 , . . . , f s . To forbid this coloring from appearing in a solution, we could connect the distinguished vertices on P to the corresponding vertices in the sets V j1 , . . . , V j s . However, that would blow up the degree of those vertices. Instead, we will use the fact that the chains of cliques force the coloring to repeat, so that instead of connecting the distinguished vertices on P to V j1 , . . . , V j s , we may equivalently connect them to later terminal vertices on the same chains. When considering the r'th tuple of colorings that fail to satisfy clause C j , we insert the path P into the graph and connect its distinguished vertices to the terminals with index (j − 1) · (q d ) p·s + r of the relevant chains. Observe that M is chosen such that for each clause index, we have fresh terminals to accommodate all of the at most (q d ) p·s ways in which it can fail to be satisfied. Now we will deal with the fact that (P, Λ) is a list-coloring instance whereas we are embedding it in a normal coloring instance. Let p 1 , . . . , p |P | be (all) the vertices of the path gadget P in their natural order along the path, and observe that our choice of N guarantees that |P | ≤ N . For the path gadget P created for the r'th tuple of bad colorings for clause C j , for each vertex p on P , do the following. For each color c ∈ [q d ] \ Λ(p ), i.e. for each color c that is not allowed to be used on p in the list-coloring instance (P, Λ), connect vertex p to the terminal vertex with index (j − 1) · (q d ) p·s · N + N · (r − 1) + on color chain Y c .
This concludes the construction of the graph G.
Claim 30. The maximum degree of G is d.
Proof. We first consider vertices on chains of q d -cliques. Each such vertex has at most 2(q d − 1) neighbors on the chain. In addition, each vertex on a chain is connected to at most one vertex of a gadget path P over the course of the entire construction, so its degree is at most 2(q d − 1) + 1 = d.
It remains to bound the degree of vertices on a gadget path P . Such a vertex has at most two neighbors on the path, at most q d − 1 neighbors on color chains corresponding to at most q d − 1 colors that are not on its list of allowed colors (no color list is empty), and at most one neighbor on a variable-encoding chain. Hence vertices on gadget paths have degree at most q d + 2 ≤ d.
Claim 31. G has a proper q d -coloring if and only if φ is satisfiable.
Proof. (⇒) Suppose φ is satisfied by some truth assignment v : [n] → {true, false}. We construct a proper coloring of G with q d colors. For each color chain Y i for i ∈ [q d ], give all terminals color c, and for each clique on the chain give the non-terminals in the clique distinct colors in [q d ] \ {i}. For each group F i of variables for i ∈ [t], consider the group assignment to F i induced by v. The group assignment corresponds to a unique coloring of V i according to the mapping g i ; color the vertices V i accordingly, and repeat this coloring on the remaining terminal vertices. Color the non-terminals of each clique on a variableencoding chain by distinct colors different from the terminal. It remains to show that for each inserted path gadget (P, Λ), the coloring can be extended to the vertices of P . Since the connections from P to the color chains match the list requirements of Λ, for this it suffices to obtain a list coloring of P in which no vertex of P is assigned the same color as a neighbor on a variable-encoding chain. But since the path gadgets were only inserted to block colorings representing group assignments that do not satisfy a clause C j , whereas the group assignments induced by f do satisfy all clauses, it follows that each such gadget (P, Λ) can be list colored while avoiding the colors of its neighbors on variable paths. Performing this extension separately for all inserted path gadgets yields a proper q d -coloring of G.
(⇐) Suppose G has a proper q d -coloring. Since the palette is a clique of size q d , it contains each color exactly once. By permuting the color set if needed, we obtain a proper q d -coloring f : V (G) → [q d ] such that y i has color i for all i ∈ [q d ]. Now consider the coloring of the sets V i that represent the different variable groups F i . We claim that the coloring of each V i corresponds to a proper group assignment under g i . Suppose not; consider a variable x ∈ F i and a clause C j involving x . Then for all tuples of colorings we considered for the variable groups related to clause C j in which the coloring of F i matches that of f , we inserted a path gadget (P, Λ) to block the coloring. Since the colors of the palette propagate through the color chains, each path gadget is properly list colored. Since terminal vertices on a variable-encoding chain have the same color as the first vertices V i of the chains, by Lemma 27 it follows that the path gadget cannot be properly list colored while avoiding all colors of its neighbors on variable chains; hence the coloring f is improper.
It follows that the coloring of each V i corresponds to a proper group assignment. Combining these group assignments into a truth assignment v : [n] → {true, false} of the entire formula, we obtain a satisfying assignment for φ. All clauses are satisfied because any tuple of colorings representing group assignments that fail to satisfy the clause, is blocked by a path gadget.
Claim 32. A path decomposition of G of width pt + q d + O(q d ) s can be constructed in polynomial time.
Proof. To bound the pathwidth we give a vertex search strategy [15,31], which can be used to upper bound the pathwidth. This is a strategy for the following game. The edges of the graph are interpreted as a network of tunnels, which are initially filled with contagious gas. One by one, cleaners can be placed or removed from vertices. An edge is cleared when both endpoints are occupied by cleaners. An edge is recontaminated if there is ever a path in the