Fine-grained complexity of the list homomorphism problem: feedback vertex set and cutwidth
aa r X i v : . [ c s . CC ] S e p Fine-grained complexity of the list homomorphism problem:feedback vertex set and cutwidth ∗Marta Piecyk † Paweł Rzążewski ‡ September 25, 2020
Abstract
For graphs
G, H , a homomorphism from G to H is an edge-preserving mapping from V ( G ) to V ( H ) . In the list homomorphism problem, denoted by LHom ( H ), we are given a graph G , whoseevery vertex v is equipped with a list L ( v ) ⊆ V ( H ) , and we need to determine whether there existsa homomorphism from G to H which additionally respects the lists L . List homomorphisms are anatural generalization of (list) colorings.Very recently Okrasa, Piecyk, and Rzążewski [ESA 2020] studied the fine-grained complexity of theproblem, parameterized by the treewidth of the instance graph G . They defined a new invariant i ∗ ( H ) ,and proved that for every relevant graph H , this invariant is the correct base of the exponent in therunning time of any algorithm solving the LHom ( H ) problem.In this paper we continue this direction and study the complexity of the problem under differentparameterizations. As the first result, we show that i ∗ ( H ) is also the right complexity base if theparameter is the size of a minimum feedback vertex set of G , denoted by fvs ( G ) . In particular, forevery relevant graph H , the LHom ( H ) problem• can be solved in time i ∗ ( H ) fvs ( G ) · | V ( G ) | O (1) , if a minimum feedback vertex set of G is given,• cannot be solved in time ( i ∗ ( H ) − ε ) fvs ( G ) · | V ( G ) | O (1) , for any ε > , unless the SETH fails.Then we turn our attention to a parameterization by the cutwidth ctw ( G ) of G . Jansen and Ned-erlof [ESA 2018] showed that List k -Coloring (i.e., LHom ( K k )) can be solved in time O ∗ (cid:0) c ctw ( G ) (cid:1) for an absolute constant c , i.e., the base of the exponential function does not depend on the numberof colors. Jansen asked whether this behavior extends to graph homomorphisms. As the main resultof the paper, we answer the question in the negative. We define a new graph invariant mim ∗ ( H ) ,closely related to the size of a maximum induced matching in H , and prove that for all relevant graphs H , the LHom ( H ) problem cannot be solved in time O ∗ (cid:0) ( mim ∗ ( H ) − ε ) ctw ( G ) (cid:1) for any ε > , unlessthe SETH fails. In particular, this implies that there is no constant c , such that for every odd cycle thenon-list version of the problem can be solved in time O ∗ (cid:0) c ctw ( G ) (cid:1) .Finally, we generalize the algorithm of Jansen and Nederlof, so that it can be used to solve LHom ( H )for every graph H ; its complexity depends on ctw ( G ) and another invariant of H , which is constantfor cliques. ∗ This work is supported by Polish National Science Centre grant no. 2018/31/D/ST6/00062. † Warsaw University of Technology, Faculty of Mathematics and Information Science, [email protected] ‡ Warsaw University of Technology, Faculty of Mathematics and Information Science and University of Warsaw, Institute ofInformatics, [email protected]
Introduction
The k - Coloring problem, which asks whether an input graph G admits a proper coloring with k colors,is arguably one of the best studied computational problems. The problem is known to be notoriously hard:it is polynomial-time solvable (and, in fact, very simple) only for k , and NP -complete otherwise, evenin very restricted classes of graphs [25, 31, 32, 39].When dealing with such a hard problem, an interesting direction of research is to study its fine-grainedcomplexity depending on some parameters of input instances, in order to understand where the boundaryof easy and hard cases lies. Such investigations usually follow two paths in parallel. On one hand, weextend our algorithmic toolbox in order to solve the problem efficiently in various settings. On the otherhand, we try to show hardness of the problem, using appropriate reductions. This way we can show somelower bounds for the algorithms solving the problem.In order to obtain meaningful lower bounds, the basic assumption of the classical complexity theory,i.e., P = NP , is not strong enough. The usual assumptions used in this context are the Exponential TimeHypothesis (ETH) and the Strong Exponential Time Hypothesis (SETH), both formulated by Impagliazzoand Paturi [34, 35]. Let us point out that the SETH is indeed stronger than the ETH, i.e, the former impliesthe latter one [14]. Conjecture 1 (ETH).
There exists δ > , such that with n variables cannot be solved in time δ · n · n O (1) . Conjecture 2 (SETH).
CNF-Sat with n variables and m clauses cannot be solved in time (2 − ε ) n · ( n + m ) O (1) for any ε > . In case of k - Coloring , the most natural parameter is the number of vertices. While the brute-forceapproach to solve the problem on an n -vertex instance takes time k n · n O (1) , it is known that this can beimproved, so that the base of the exponential function does not depend on k . The currently best algorithm isdue to Björklund, Husfeldt, and Koivisto [4] and has complexity n · n O (1) . On the other hand, the standardhardness reduction shows that the problem cannot be solved in time o ( n ) , unless the ETH fails [14].Similarly, we can ask how the complexity depends on some parameters, describing the structure ofthe instance. The most famous structural parameter is arguably the treewidth of the graph, denoted by tw( G ) [2, 6, 48]. Intuitively, treewidth measures how tree-like the graph is. Thus, on graphs with boundedtreewidth, we can mimick the bottom-up dynamic programming algorithms that works very well on trees.In case of the k - Coloring problem, the complexity of such a straightforward approach is k tw( G ) · n O (1) ,where n is the number of vertices of of an instance graph G , provided that G is given along with its treedecomposition of width tw( G ) . One might wonder whether this could be improved, in particular, if onecan design an algorithm with running time c tw( G ) · n O (1) , where c is a constant that does not depend on k , as it was possible in the case if the parameter is n . Lokshtanov, Marx, and Saurabh [43] proved that thisis unlikely, and an algorithm with running time ( k − ε ) tw( G ) · n O (1) , for any ε > , would contradict theSETH. This lower bounds holds even if we replace treewidth with pathwidth pw( G ) ; the latter result isstronger, as we always have tw( G ) pw( G ) .Another way to measure how close a graph G is to a tree or forest is to analyze the size of a minimum feedback vertex set , i.e., the minimum number of vertices that need to be removed from G to break allcycles. This parameter is denoted by fvs( G ) . If G is given with a minimum feedback vertex set S , wecan easily solve k - Coloring by enumerating all possible colorings of S , and trying to extend them on theforest G − S using dynamic programming. The running time of such a procedure is k fvs( G ) · n O (1) . This iscomplemented by a hardness result of Lokshtanov, Marx, and Saurabh [43], who showed that the problem1annot be solved in time ( k − ε ) fvs( G ) · n O (1) for any ε > , unless the SETH fails. Let us point that pw( G ) and fvs( G ) are incomparable parameters, so this result is incomparable with the previously mentionedlower bound. These two lower bounds were later unified by Jaffke and Jansen [36], who considered theparameterization by the distance to a linear forest .The above examples show a behavior which is typical for many other parameters: the running timeof the algorithm depends on the number k of colors and this dependence is necessary under standardcomplexity assumptions [26, 36, 40]. Thus, it was really surprising that Jansen and Nederlof [38] showedthat for any k , the k - Coloring problem can be solved in time c ctw( G ) · n O (1) , where c is an absoluteconstant and ctw( G ) is the cutwidth of G . Intuitively, we can imagine ctw( G ) as follows. We fix somepermutation of the vertices of G and place them on a horizontal line in this ordering. The edges of G aredrawn as arcs above the line; we do not care about intersections. Now, the width of this arrangement isthe maximum number of edges that can be cut by a vertical line. The cutwidth is the minimum width overall linear arrangements of vertices of G . The substantial difference between cutwidth and the previouslymentioned parameters is that cutwidth corresponds to the number of edges, not the number of vertices,and, in particular, ctw( G ) is not upper-bounded by | V ( G ) | . Also, it is known that pw( G ) ctw( G ) [5].To be more specific, Jansen and Nederlof [38] presented two algorithms for k - Coloring , parameterizedby the cutwidth. The first one is deterministic and has running time ω · ctw( G ) · n O (1) , where ω < . isthe matrix multiplication exponent, see Coppersmith, Winograd [12] and Vassilevska-Williams [51]. Thesecond algorithm is randomized and works in time ctw( G ) · n O (1) . Also, the authors show that the lattercomplexity is optimal under the SETH, even for - Coloring .Let us point out that all the algorithms mentioned above work also for the more general
List k -Coloring problem, where each vertex v of G is equipped with a list L ( v ) ⊆ { , , . . . , k } , and we ad-ditionally require that the assigned color comes from this list. The general direction of our work is toinvestigate how further the techniques developed for k - Coloring can be generalized.
Graph homomorphisms.
A rich family of graph problems that generalize k - Coloring comes fromconsidering graph homomorphisms . A homomorphism from a graph G to a graph H (called target ) isan edge-preserving mapping from V ( G ) to V ( H ) . In the Hom ( H ) problem we ask if the input graph G admits a homomorphism to H , which is usually treated as a fixed graph. Observe that if H is K k , i.e., acomplete graph on k vertices, then Hom ( H ) is equivalent to k - Coloring . The complexity classificationof
Hom ( H ) was provided by the seminal paper by Hell and Nešetřil [29]: the problem is polynomial-timesolvable if H is bipartite or has a vertex with a loop, and NP -complete otherwise. This problem can alsobe considered in a list setting, where every vertex v of G is equipped with a list L ( v ) ⊆ V ( H ) , and we askfor a homomorphism from G to H , which additionally respects lists L . The corresponding computationalproblem is denoted by LHom ( H ).The complexity dichotomy for LHom ( H ) was proven in three steps: first, for reflexive graphs H (i.e.,where every vertex has a loops) by Feder and Hell [20], then for irreflexive graphs H (i.e., with no loops)by Feder, Hell, and Huang [21], and finally, for all graphs H , again by Feder, Hell, and Huang [22]. Theproblem appears to be polynomial-time solvable if H is a so-called bi-arc graph . We will now skip thedefinition of this class and return to it in Section 2. Let us also mention a special case if H is irreflexive andbipartite: then the LHom ( H ) problem is in P if the complement of H is a circular-arc graphs, and otherwisethe problem is NP -complete. This special case will play a prominent role in our paper.Let us point out that despite the obvious similarity of Hom ( H ) and LHom ( H ), the methods used toprove lower bounds are very different. In case of the Hom ( H ), all hardness results use some algebraictools, which allow us to capture the structure of the whole graph H at once. On the other hand, hardness2roofs for LHom ( H ) are purely combinatorial and are based on the analysis of some small subgraphs of H . The study of the complexity of Hom ( H ), LHom ( H ), and their variants led to many interesting algo-rithms and lower bounds [8, 9, 15, 17, 18, 23, 30]. Let us mention few of them, that are most relevant toour results. For more information about the combinatorics and complexity of graph homomorphisms, werefer the reader to the comprehensive monograph by Hell and Nešetřil [28].A brute-force approach to solving Hom ( H ) (and LHom ( H )) has complexity | V ( H ) | n · n O (1) . Thiscan be improved if H has some special structure: several algorithms with running time f ( H ) n · n O (1) were obtained, where f is a function of some structural parameter of H . Among possible choices of thisparameter we can find the maximum degree (folklore), treewidth [24], clique-width [50], or bandwidth ofthe complement [49]. A natural open question was whether one can obtain a c n algorithm, where c is aconstant that does not depend on H [50]. This question was finally answered in the negative by Cygan etal. [13], who proved that the brute force algorithm is essentially optimal under the ETH.If we are interested in the complexity, parameterized by the treewidth of G , then both Hom ( H ) and LHom ( H ) can be solved in time | V ( H ) | tw( G ) · n O (1) by a naive dynamic programming (again, provided that G is given with a tree decomposition). The fine-grained complexity of the Hom ( H ) problem, parameterizedby the treewidth of G , was studied recently by Okrasa and Rzążewski [47]. Using mostly algebraic tools,they were able obtain tight bounds, conditioned on two conjectures from algebraic graph theory from early2000s.The analogous question for the LHom ( H ) problem was first investigated by Egri, Marx, and Rzążewski [19]for reflexive graphs H , and then by Okrasa, Piecyk, and Rzążewski [45, 46] for the general case. The au-thors defined a new graph invariant i ∗ ( H ) , and proved the following, tight bounds (recall that always tw( G ) pw( G ) ). Theorem 1 (Okrasa, Piecyk, Rzążewski [45, 46]).
Let H be a connected, non-bi-arc graph.a) Even if H is given in the input, every instance ( G, L ) of LHom ( H ) can be solved in time i ∗ ( H ) tw( G ) · ( | V ( G ) | · | V ( H ) | ) O (1) , provided that G is given along with a tree decomposition of width tw( G ) .b) Even if H is fixed, there is no algorithm that solves every instance ( G, L ) of LHom ( H ) in time ( i ∗ ( H ) − ε ) pw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails. To the best of our knowledge, the complexity depending on other structural parameters of G was notinvestigated. In this paper, we make some progress to fill this gap. In particular, our main motivation isthe following question by Jansen [37], repeated by Okrasa, Piecyk, Rzążewski [45, 46]. Question 1 (Jansen [37]).
Is there a universal constant c , such that for every H , every instance G of the Hom ( H ) problem can be solved in time c ctw( G ) · | V ( G ) | O (1) ? Our results.
As our first result, we complement the recent result of Okrasa et al. [45, 46] and show tightcomplexity bounds, parameterized by the size of a minimum feedback vertex set of the instance graph.
Theorem 2.
Let H be a connected, non-bi-arc graph.a) Even if H is given in the input, every instance ( G, L ) of LHom ( H ) can be solved in time i ∗ ( H ) fvs( G ) · ( | V ( G ) | · | V ( H ) | ) O (1) , provided that G is given along with a feedback vertex set of size fvs( G ) .b) Even if H is fixed, there is no algorithm that solves every instance ( G, L ) of LHom ( H ) in time ( i ∗ ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails. G and its feedback vertex set S , we can in polynomial time construct atree decomposition of G with width | S | + 1 (see also Section 2). The proof of the lower bound followsthe general direction of the hardness proof for k - Coloring by Lokshtanov et al. [43]. However, as weare showing hardness for all relevant graphs H , the gadgets are significantly more complicated. In theirconstruction we use some machinery developed by Okrasa et al. [45, 46]. Furthermore, similarly to theproof of Theorem 1 b), the proof of Theorem 2 is split into two parts: first we prove hardness for thespecial case if H is bipartite, and then we reduce the general case to the bipartite one.Then we turn our attention to the setting, where the parameter is the cutwidth of the instance graph.Recall that ctw( G ) > pw( G ) > tw( G ) . Furthermore, given a linear layout of G with width w , we can inpolynomial time construct a tree decomposition of G with width at most w [5]. Thus by Theorem 1 a) weknow that LHom ( H ) can be solved in time ( i ∗ ( H )) ctw( G ) · | V ( G ) | O (1) . On the other hand, we know thatthis algorithm cannot be optimal for all H , as i ∗ ( K k ) = k , while List k -Coloring , i.e., LHom ( K k ) , canbe solved in deterministic time ω · ctw( G ) · | V ( G ) | O (1) or in randomized time ctw( G ) · | V ( G ) | O (1) , usingthe algorithms of Jansen and Nederlof [38].We introduce another graph parameter, mim ∗ ( H ) , which is closely related to the size of a maximuminduced matching in H , and show two lower bounds, assuming, respectively, the SETH and the ETH. Theorem 3.
Let H be the class of connected non-bi-arc graphs. For g ∈ N , let C g be the class of subcubicbipartite graphs G with girth at least g , such that vertices of degree in G are at distance at least g .a) For every H ∈ H , there is no algorithm that solves every instance ( G, L ) of LHom ( H ) , where G ∈ C g , intime ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails,b) There exists a constant < δ < , such that for every H ∈ H , there is no algorithm that solves everyinstance ( G, L ) of LHom ( H ) , where G ∈ C g , in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless the ETH fails. As a sanity check, we point out that mim ∗ ( K k ) = 2 , so our lower bounds are consistent with theresults of Jansen and Nederlof [38].Let us highlight that the lower bounds from Theorem 3 hold even for very restricted instances, andthis statement captures some important graphs classes. In particular, for a fixed graph F , we say that G is F -free if it does not contain F as an induced subgraph. Recently Chudnovsky et al. [10] studied thecomplexity of Hom ( C k ) and LHom ( C k ) for F -free graphs. Among other results, they proved that if F has a connected component that is not a path nor a subdivided claw, then for any k > , the LHom ( C k ) problem is NP -complete and cannot be solved in subexponential time in F -free graphs, unless the ETHfails. One can immediately verify that the class C g from Theorem 3 for g = | V ( F ) | + 1 is contained inthe class of F -free graphs. Thus we obtain the following corollary from Theorem 3, which significantlygeneralizes the result of Chudnovsky et al. [10], as cycles with at least 5 vertices are not bi-arc graphs [21], Corollary 4.
Let F be a fixed graph, which has a connected component that is not a path nor a subdividedclaw. Let H be the class of connected non-bi-arc graphs.a) For every H ∈ H , there is no algorithm that solves every instance ( G, L ) of LHom ( H ) , where G is F -free,in time ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails,b) There exists a universal constant < δ < , such that for every H ∈ H , there is no algorithm that solvesevery instance ( G, L ) of LHom ( H ) , where G is F -free, in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless theETH fails. Hom ( H ). Note that here we only considergraphs H that are irreflexive and non-bipartite, as otherwise the problem is polynomial-time solvable.Furthermore, we restrict our attention to graphs H that are projective cores . The definition of projectivecores is postponed to Section 4.3, but let us point out that many graphs fall into this class. We say that aproperty Π is satisfied by almost all graphs , if the probability, that a graph chosen uniformly at randomfrom the set of all graphs with n vertices, satisfies Π , tends to 1 as n grows. It is well-known that almostall graphs are non-bipartite and connected [1]. Hell and Nešetřil [28] proved that almost all graphs arecores, while Łuczak and Nešetřil [44] showed that almost all graphs are projective. All these results implythat almost all graphs are connected non-bipartite projective cores, see also [47]. For this class of graphs H , we show the following lower bounds, answering Question 1 in the negative. Theorem 5.
Let H be the class of connected non-bipartite projective cores with at least three vertices.a) For every H ∈ H , there is no algorithm that solves every instance G of Hom ( H ) in time ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails,b) There exists a universal constant < δ < , such that for every H ∈ H , there is no algorithm that solvesevery instance G of Hom ( H ) in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless the ETH fails. In particular, it is well known that odd cycles are projective cores [41]. Furthermore, for any odd cycle C k it holds that mim ∗ ( C k ) = ⌊ k/ ⌋ . Thus, we obtain the following as a corollary from Theorem 5. Notethat here we do not treat C as a fixed graph. Corollary 6.
Let C be the family of odd cycles. Then for C ∈ C , there is no algorithm that solves Hom ( C ) for instances G in time o (log | V ( C ) |· ctw( G )) · | V ( G ) | O (1) , unless the ETH fails.In particular, there is no universal constant c , such that Hom ( C ) can be solved in time c ctw( G ) · | V ( G ) | O (1) for every C ∈ C and every instance G . Finally, in Section 6 we have a closer look at the algorithm by Jansen and Nederlof [38], and try togeneralize it to the
LHom ( H ) problem for non-complete targets H . We define yet another graph invariant γ ∗ ( H ) and show the following result. Corollary 7.
Let H be a graph with possible loops and let ( G, L ) be an instance of LHom ( H ) , where G isgiven with a linear layout of width k . Then ( G, L ) can be solved in time γ ∗ ( H ) · ω · k · ( | V ( G ) | · | V ( H ) | ) O (1) . Let us point out that γ ∗ ( K k ) = 1 , so our result covers the result by Jansen and Nederlof [38]. Actually,we define our algorithm for the so-called Binary Constraint Satisfaction Problem (BCSP), which is a furthergeneralization of
LHom ( H ) (the definition of BCSP is quite technical, so we postpone it to Section 6).This approach allows us to obtain an algorithm for another natural problem, called DP-coloring [3, 16],see Section 6.3 for the definition. This problem, being a special case of BCSP, was introduced by Dvořakand Postle as a generalization of list coloring.We conclude the paper with comparison of the discussed parameters, i.e., i ∗ ( H ) , mim ∗ ( H ) , and γ ∗ ( H ) ,and pointing out some open questions and directions for future investigations.5 Notation and preliminaries
For a positive integer n , we define [ n ] := { , . . . , n } . For a set X , by X we denote the set of all subsetsof X . Unless explicitly stated otherwise, all logarithms are of base , i.e., log x := log x .Let G be a graph. For a set S ( V ( G ) , by G − S we denote the graph induced by V ( G ) \ S . For avertex v ∈ V ( G ) , by N G ( v ) we denote the set of neighbors of v . If the graph G is clear from the context,we write N ( v ) instead of N G ( v ) . Note that v ∈ N ( v ) if and only if v is a vertex with a loop. We saythat two vertices u, v ∈ V ( G ) are incomparable if N ( u ) N ( v ) and N ( v ) N ( u ) . A set S ⊆ V ( G ) is incomparable if all its vertices are pairwise incomparable. Equivalently, we can say that for every distinct u, v ∈ S , there is a vertex u ′ ∈ N ( u ) \ N ( v ) . A set S ⊆ V ( G ) is strongly incomparable if for every u ∈ S there exists u ′ ∈ N ( u ) , such that u ′ is non-adjacent to every vertex in S \ { u } . Such a vertex u ′ is calleda private neighbor of u . Clearly a strongly incomparable set is in particular incomparable.The degree of a vertex v , denoted by deg( v ) , is the number of vertices in N ( v ) . For u, v ∈ V ( G ) , by dist( u, v ) we denote the length (i.e., the number of edges) of a shortest path from u to v . By girth( G ) wedenote the length of a shortest cycle in G .Let G, H be graphs. A mapping ϕ : V ( G ) → V ( H ) is a homomorphism from G to H if for everyedge uv ∈ E ( G ) it holds that ϕ ( u ) ϕ ( v ) ∈ E ( H ) . By H -lists we mean an assignment L : V ( G ) → V ( H ) .For a graph G with H -lists L , list homomorphism is a homomorphism ϕ from G to H , which additionallyrespects lists L , i.e., for every v ∈ V ( G ) it holds ϕ ( v ) ∈ L ( v ) . To denote that ϕ is a list homomorphismfrom G to H we will write ϕ : ( G, L ) → H . By ( G, L ) → H we denote that some list homomorphism ϕ : ( G, L ) → H exists. In the Hom ( H ) problem the instance is a graph G and we ask whether G → H . Inthe LHom ( H ) problem the instance is a pair ( G, L ) , where G is a graph and L are H -lists, and ask whether ( G, L ) → H .For a set S ⊆ V ( G ) we define L ( S ) := S v ∈ S L ( v ) . If it does not lead to confusion, for a set V suchthat V ( G ) ⊆ V and H -lists L : V → V ( H ) , we will denote the instance ( G, L | V ( G ) ) by ( G, L ) , in orderto simplify the notation.Let H be a graph. A walk P in H is a sequence p , . . . , p ℓ of vertices of H such that p i p i +1 ∈ E ( H ) for i ∈ [ ℓ − . We define the length of a walk P = p , . . . , p ℓ as ℓ − and denote it by |P| . We also write P : p → p ℓ to emphasize that P starts in p and ends in p ℓ . Let us define a relation that is crucial forbuilding our gadgets. Definition 8 (Avoiding).
For walks P = p , . . . , p ℓ and Q = q , . . . , q ℓ of equal length, such that p isin the same bipartition class as q , we say P avoids Q if p = q and for every i ∈ [ ℓ − it holds that p i q i +1 E ( H ) .By P we denote walk P reversed, i.e., if P = p , . . . , p ℓ , then P = p ℓ , . . . , p . It is straightforward toobserve that if P avoids Q , then Q avoids P . Treewidth and pathwidth.
Let G be a graph. A tree decomposition of G is a pair ( T , ( X t ) t ∈ V ( T ) ) suchthat:1. T is a tree,2. ( X t ) t ∈ V ( T ) is a family of subsets of V ( G ) ,3. every v ∈ V ( G ) is contained in at least one X t ,6. for every uv ∈ E ( G ) there is X t such that { u, v } ⊆ X t ,5. for every v ∈ V ( G ) the graph induced by { t ∈ V ( T ) | v ∈ X t } in T is connected.We call sets X t for t ∈ V ( T ) bags . The width of a tree decomposition ( T , ( X t ) t ∈ V ( T ) ) is max t ∈ V ( T ) | X t |− . The minimum width over all tree decompositions of G is called the treewidth of G and we denote it by tw( G ) . Similarly, we define a path decomposition ( P , ( X t ) t ∈ V ( T ) ) of G as a tree decomposition, in whichthe tree P is a path. The minimum width over all path decompositions of G is called the pathwidth of G and we denote it by pw( G ) . Clearly tw( G ) pw( G ) . Feedback vertex set.
A set F ⊆ V ( G ) , such that G − F does not contain any cycle, is called a feedbackvertex set of G . We denote the size of a minimum feedback vertex set in G by fvs( G ) .Observe that if F is a feedback vertex set of G , we can obtain a tree decomposition of G by taking thetree decomposition of G − F (of width 1), and adding F to every bag. This gives the following. Proposition 9.
Let G be a graph given along with its feedback vertex set F of size s . Then there exists atree decomposition ( T , ( X t ) t ∈ V ( T ) ) of G of width s + 1 . Moreover, ( T , ( X t ) t ∈ V ( T ) ) can be constructed inpolynomial time. In particular this implies that for every graph G we have tw( G ) fvs( G ) + 1 . Let us point out thatthe parameters pw( G ) and fvs( G ) are incomparable. Indeed, if G is a complete binary tree on n vertices,then fvs( G ) = 0 and pw( G ) = Θ(log n ) . On the other hand, if G is a collection of n/ disjoint triangles,then fvs( G ) = n/ and pw( G ) = 2 . Cutwidth.
Let π = ( v , . . . , v n ) be a linear ordering of vertices of G , we will call it a linear layout of G or a linear arrangement of G . A cut of π is a partition of V ( G ) into two subsets: { v , . . . , v p } and { v p +1 , . . . , v n } , for some p ∈ [ n ] . We say that an edge v i v j , where i < j , crosses the cut ( { v , . . . , v p } , { v p +1 , . . . , v n } ) ,if i p and j > p . The width of the linear layout π is the maximum number of edges that cross any cut of π . Finally, we define the cutwidth ctw( G ) of G as the minimum width over all linear layouts of G .It is known that pw( G ) ctw( G ) . Furthermore, given a linear layout of G with width k , we can inpolynomial time construct a path decomposition of G with width at most k [5]. On the other hand, forevery graph G it holds that ctw( G ) pw( G ) · ∆( G ) [11]. As we also have that ctw( G ) > ∆( G ) / , wecan intuitively think that ctw( G ) is bounded if and only if both ∆( G ) and pw( G ) are bounded. LHom ( H ) In this section we briefly discuss the structure of graphs H , for which the LHom ( H ) problem is NP-complete. Those graphs will be our focus in this paper. Bipartite graphs H . First let us discuss the case if H is bipartite. Recall that Feder, Hell, and Huang [21]proved that in this case the LHom ( H ) problem is polynomial-time solvable if H is a complement of acircular-arc graph and NP-complete otherwise. Moreover, they provided a characterization of this classof graphs in terms of forbidden subgraphs: a bipartite graph H is not the complement of a circular-arcgraph if and only if H contains an induced cycle of length at least 6 or a structure called a special edgeasteroid . We omit the definition of a special edge asteroid, as it is quite technical and not relevant to ourpaper. Instead, we will rely on the following structural result, obtained by Okrasa et al. [45, 46].7 emma 10 (Okrasa et al. [45, 46]). Let H be a bipartite graph, whose complement is not a circular-arcgraph. Let X be one of bipartition classes in H . Then there exists a triple ( α, β, γ ) of vertices in X such that:1. there exist α ′ , β ′ ∈ V ( H ) , such that the edges αα ′ , ββ ′ induce a matching in H ,2. vertices α, β, γ are pairwise incomparable,3. there exist walks X , X ′ : α → β and Y , Y ′ : β → α , such that X avoids Y and Y ′ avoids X ′ ,4. at least one of the following holds:a) H contains an induced C with consecutive vertices w , . . . , w and α = w , β = w , γ = w ,b) H contains an induced C with consecutive vertices w , . . . , w and α = w , β = w , γ = w ,c) the set { α, β, γ } is strongly incomparable and for any a, b, c , such that { a, b, c } = { α, β, γ } , thereexist walks X c : α → a and Y c : α → b, and Z c : β → c , such that X c , Y c avoid Z c and Z c avoids X c , Y c . Furthermore, Okrasa et al. [45, 46] observed that in order to understand the complexity of
LHom ( H ),it is sufficient to focus on the so-called consistent instances . Definition 11 (Consistent instance).
Let H be a bipartite graph with bipartition classes X, Y and let ( G, L ) be an instance of LHom ( H ) . We say that ( G, L ) is consistent if the following conditions hold:1. G is connected and bipartite with bipartition classes X G , Y G ,2. L ( X G ) ⊆ X, L ( Y G ) ⊆ Y ,3. for every v ∈ V ( G ) , the set L ( v ) is incomparable.Indeed, if G is not connected, then we can solve the problem for each connected component of G independently. If G is not bipartite, then we can immediately report a no-instance. If some list containstwo vertices x, y , such that N ( x ) ⊆ N ( y ) , then we can safely remove x from the list. Finally, note that inevery homomorphism from G to H , either X G is mapped to vertices of X , and Y G is mapped to vertices of Y , or X G is mapped to vertices of Y , and Y G is mapped to vertices of X . We can consider these two casesseparately, reducing the problem to solving two consistent instances, without changing the asymptoticcomplexity of the algorithm. General graphs H . Recall that for general graphs H , Feder, Hell, and Huang [22] showed that the LHom ( H ) problem is polynomial-time solvable if H is a bi-arc graph, and NP-complete otherwise. Theydefined the class of bi-arc graphs in terms of some geometric representation, but for us it will be moreconvenient to show an equivalent definition.For a graph H , the associated bipartite graph H ∗ is the graph with vertex set V ( H ∗ ) = { v ′ , v ′′ | v ∈ V ( H ) } , whose edge set contains those pairs u ′ v ′′ , for which uv ∈ E ( H ) . Note that if H is bipartite, then H ∗ consists of two disjoint copies of H .Feder, Hell, and Huang [22] observed that H is a bi-arc graph if and only if H ∗ is the complementof a circular-arc graph. Furthermore, an irreflexive graph is bi-arc if and only if it is bipartite and itscomplement is a circular-arc graph. Thus “hard” cases of LHom ( H ) correspond to the “hard” cases of LHom ( H ∗ ) . This observation yields the following, useful proposition. Proposition 12 ([45, 46]).
Let H be a graph and let ( G, L ) be a consistent instance of LHom ( H ∗ ). Define L ′ : V ( G ) → V ( H ) as L ′ ( x ) := { u : { u ′ , u ′′ } ∩ L ( x ) = ∅} . Then ( G, L ) → H ∗ if and only if ( G, L ′ ) → H . NR Figure 1: Bipartite decomposition ( D, N, R ) . Circles denote indepenent sets. A black line denotes thatthere are all possible edges between sets, an orange one that there might be some edges, and the lack of aline denotes that there are no edges between sets. In this section we introduce the main invariants, i ∗ ( H ) and mim ∗ ( H ) . First, let us define parameters i ( H ) and mim( H ) . Definition 13 ( i ( H ) and mim ( H ) ). Let H be a bipartite graph. By i ( H ) (resp. mim ( H ) ) we denote themaximum size of an incomparable set (resp. strongly incomparable set) in H , which is fully contained inone bipartition class.Let S be a strongly incomparable set, contained in one bipartition class, and let S ′ be the set of privateneighbors of vertices of S . We observe that the set S ∪ S ′ induces a matching in H of size | S | . On theother hand, if M is an induced matching, then the endpoints of edges from M contained in one bipartitionclass form a strongly incomparable set of size | M | . Thus mim ( H ) can be equivalently defined as the sizeof a maximum induced matching in H .Before we define i ∗ ( H ) and mim ∗ ( H ) , we need one more definition. Definition 14 (Bipartite decomposition).
Let H be a bipartite graph with bipartition classes X, Y . Apartition of V ( H ) into an ordered triple of sets ( D, N, R ) is a bipartite decomposition if the followingconditions are satisfied (see Figure 1)1. N is non-empty and separates D and R ,2. | D ∩ X | > or | D ∩ Y | > ,3. N induces a biclique in H ,4. ( D ∩ X ) ∪ ( N ∩ Y ) and ( D ∩ Y ) ∪ ( N ∩ X ) induce bicliques in H .If H does not admit a bipartite decomposition, then H is undecomposable .Let us point out that if H is not the complement of a circular-arc graph, then it contains an inducedsubgraph, which is not the complement of a circular-arc graph and is undecomposable, see e.g. [45, Theo-rem 46]. Now we are ready to define the following. 9 efinition 15 ( i ∗ ( H ) and mim ∗ ( H ) for bipartite H ). Let H be a connected bipartite graph, whose com-plement is not a circular-arc graph. Define i ∗ ( H ) := max { i ( H ′ ) : H ′ is an undecomposable, connected, inducedsubgraph of H, whose complement is not a circular-arc graph } ,mim ∗ ( H ) := max { mim ( H ′ ) : H ′ is an undecomposable, connected, inducedsubgraph of H, whose complement is not a circular-arc graph } . It remains to extend the definitions of i ∗ ( H ) and mim ∗ ( H ) to general graphs H . Recall that if H isbipartite, then H ∗ consists of two disjoint copies of H . Thus for bipartite H it holds that i ∗ ( H ∗ ) = i ∗ ( H ) and mim ∗ ( H ∗ ) = mim ∗ ( H ) . In the other case, if H is non-bipartite and additionally connected, then H ∗ is connected. This motivates the following extension of the definition of i ∗ and mim ∗ to non-bipartite H . Definition 16 ( i ∗ ( H ) and mim ∗ ( H ) ). Let H be a non-bi-arc graph. Define: i ∗ ( H ) := i ∗ ( H ∗ ) ,mim ∗ ( H ) := mim ∗ ( H ∗ ) . Parameter: the size of a minimum feedback vertex set
First, we will prove the bipartite version of Theorem 2 b), i.e., the case that H is bipartite. Theorem 17.
Let H be a connected, bipartite graph, whose complement is not a circular-arc graph. Even if H is fixed, there is no algorithm that solves every instance ( G, L ) of LHom ( H ) in time ( i ∗ ( H ) − ε ) fvs( G ) ·| V ( G ) | O (1) for any ε > , unless the SETH fails. In order to prove Theorem 17 it is sufficient to prove the following.
Theorem 18.
Let H be a connected, bipartite, undecomposable graph, whose complement is not a circular-arc graph. Even if H is fixed, there is no algorithm that solves every instance ( G, L ) of LHom ( H ) in time ( i ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails. Let us show that Theorem 17 and Theorem 18 are equivalent. (Theorem 17 → Theorem 18)
Assume the SETH and suppose that Theorem 17 holds and Theorem 18fails. Then there exists a connected, bipartite, udecomposable graph H , whose complement is not a circular-arc graph and an algorithm that solves LHom ( H ) for every instance ( G, L ) in time ( i ( H ) − ε ) fvs( G ) ·| V ( G ) | O (1) for some ε > . The properties of H imply that i ∗ ( H ) = i ( H ) . Thus LHom ( H ) can be solvedfor every instance ( G, L ) in time ( i ∗ ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) . Observe that H satisfies the assumptionsof Theorem 17. Therefore, by Theorem 17, we get a contradiction with the SETH. (Theorem 18 → Theorem 17)
Assume the SETH and suppose that Theorem 18 holds and Theorem 17fails. Then there exist a connected, bipartite graph H , whose complement is not a circular-arc graph, andan algorithm that solves LHom ( H ) for every instance ( G, L ) in time ( i ∗ ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) forsome ε > . Let H ′ be an induced subgraph of H such that H ′ is connected, undecomposable, is not acomplement of a circular-arc graph, and i ( H ′ ) = i ∗ ( H ) . Observe that any instance ( G, L ) of LHom ( H ′ ) can be seen as an instance of LHom ( H ) such that only vertices of H ′ appear on lists L . Thus we can solveany instance ( G, L ) of LHom ( H ′ ) in time ( i ∗ ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) = ( i ( H ′ ) − ε ) fvs( G ) · | V ( G ) | O (1) ,which by Theorem 18 contradicts the SETH. Gadgets needed for hardness reduction.
From now on we assume that H is a bipartite graph, whosecomplement is not a circular-arc graph and ( α, β, γ ) is the triple given by Lemma 10. In order to proveTheorem 18 we will need two gadgets. The first one is a graph called an assignment gadget and has twospecial vertices. Its main goal is to ensure that a certain coloring of one special vertex forces a certaincoloring of the other special vertex. Definition 19 (Assignment gadget).
Let S be an incomparable set in H contained in the same biparti-tion class as α, β, γ and let v ∈ S . An assignment gadget is a graph A v with H -lists L and with specialvertices x, y , such that:(A1.) L ( x ) = S and L ( y ) = { α, β, γ } ,(A2.) for every u ∈ S and for every a ∈ { α, β } there exists a list homomorphism ϕ : ( A v , L ) → H suchthat ϕ ( x ) = u and ϕ ( y ) = a ,(A3.) there exists a list homomorphism ϕ : ( A v , L ) → H such that ϕ ( x ) = v and ϕ ( y ) = γ ,11A4.) for every list homomorphism ϕ : ( A v , L ) → H it holds that if ϕ ( y ) = γ , then ϕ ( x ) = v ,(A5.) A v − { x } is a tree,(A6.) deg( x ) = ( | S | − and deg( y ) = | S | − ,(A7.) the degree of every vertex of A v , possibly except x and y , is at most .The second gadget is called a switching gadget . It is a path T with a special internal vertex q , whoselist is { α, β, γ } , and endvertices with the same list { α, β } . Coloring both endvertices of T with the samecolor, i.e., coloring both with α or both with β , allows us to color q with one of α, β , but “switching sides”from α to β forces coloring q with γ . Definition 20 (Switching gadget). A switching gadget is a path T of even length with H -lists L , end-vertices p, r , called respectively the input and the output vertex, and one special internal vertex q , called a q -vertex , in the same bipartition class as p, r , such that:(S1.) L ( p ) = L ( r ) = { α, β } and L ( q ) = { α, β, γ } ,(S2.) for every a ∈ { α, β } there exists a list homomorphism ϕ : ( T, L ) → H , such that ϕ ( p ) = ϕ ( r ) = a and ϕ ( q ) = γ ,(S3.) there exists a list homomorphism ϕ : ( T, L ) → H , such that ϕ ( p ) = α , ϕ ( r ) = β , and ϕ ( q ) = γ ,(S4.) for every list homomorphism ϕ : ( T, L ) → H , if ϕ ( p ) = α and ϕ ( r ) = β , then ϕ ( q ) = γ .Note that in a switching gadget we do not care about homomorphisms that map p to β and r to α .Later, when discussing assignment and switching gadgets, we will use the notions of x -, y -, p -, q -, and r -vertices to refer to the appropriate vertices introduced in the definitions of the gadgets.The following two lemmas show that both, the assignment gadget and the switching gadget, even withsome additional restrictions, can be constructed. Since their proofs are quite technical, they are postponedto Section 5. Lemma 21 (Construction of the assignment gadget).
Let H be an undecomposable, connected, bipar-tite graph, whose complement is not a circular-arc graph. Let ( α, β, γ ) be the triple from Lemma 10. Let S be an incomparable set in H contained in the same bipartition class as α, β, γ , such that k := | S | > . Let g ∈ N . Then for every v ∈ S there exists an assignment gadget A v such that girth( A v ) > g and for anydistinct vertices a, b in A v of degree at least it holds that dist( a, b ) > g , dist( a, x ) > g , dist( a, y ) > g , and dist( x, y ) > g . Lemma 22 (Construction of the switching gadget).
Let H be an undecomposable, connected, bipartitegraph, whose complement is not a circular-arc graph. Let ( α, β, γ ) be the triple from Lemma 10 and let g ∈ N .Then there exists a switching gadget T with special vertices p, q, r such that dist( p, q ) > g and dist( r, q ) > g . eduction. Suppose that we can construct both, the assignment gadget and the switching gadget. Letus show that this is sufficent to prove Theorem 18. The proof is an extension of the construction of Lok-shtanov, Marx, and Saurabh for the special case if H is a complete graph, i.e., the List k - Coloring prob-lem [43].
Proof of Theorem 18.
Let φ be an instance of CNF-Sat with n variables and m clauses. Let ε > and k = i ( H ) . Let S be a maximum incomparable set contained in one bipartition class of H , i.e., | S | = k .Let α, β, γ be the vertices of H , in the same bipartition class as S , given by Lemma 10. Let α ′ , β ′ be thevertices such that edges αα ′ , ββ ′ induce a matching in H , they exist by Lemma 10. Observe that k > ,since vertices α, β, γ are pairwise incomparable. Moreover, we define λ := log k ( k − ε ) . Observe that λ < . We choose an integer p sufficiently large so that λ pp − < and define t := l n ⌊ log k p ⌋ m = l n ⌊ p · log k ⌋ m .We will construct a graph G with H -lists L such that:1. there exists a list homomorphism ϕ : ( G, L ) → H if and only if φ is satisfiable,2. the size of a minimum feedback vertex set in G is at most t · p ,3. | V ( G ) | = ( n + m ) O (1) .We partition the variables of φ into t sets F , . . . , F t called groups , such that | F i | ⌊ log k p ⌋ . Foreach i ∈ [ t ] we introduce p vertices x i , . . . , x ip and for every s ∈ [ p ] we set L ( x is ) := S . Each coloringof these vertices will be interpreted as a truth assignment of variables in F i . Note that there are at most ⌊ log k p ⌋ k p possible truth assigments of variables in F i and there are k p possible colorings of x i , . . . , x ip ,respecting lists L . Thus we can define an injective mapping that assigns a distinct coloring of vertices x i , . . . , x ip to each truth assignment of the variables in F i , note that some colorings may remain unassigned.For every clause C of φ we introduce a path P C constructed as follows. Consider a group F i that con-tains at least one variable from C , and a truth assignment of F i that satisfies C . Recall that this assignmentcorresponds to a coloring f of vertices x i , . . . , x ip . We introduce a switching gadget T i,fC , whose q -vertexis denoted by q i,fC . We fix an arbitrary ordering of all switching gadgets introduced for the clause C . Forevery switching gadget but the last one, we identify its output vertex with the input vertex of the succesor.We add vertices x C with L ( x C ) = { α ′ } and y C with L ( y C ) = { β ′ } . We add an edge between x C andthe input of the first switching gadget, and between y C and the output of the last switching gadget. Thiscompletes the construction of P C .Now consider a switching gadget T i,fC introduced in the previous step. Recall that C is a clause of φ ,and f is a coloring of x i , . . . , x ip corresponding to a truth assignment of variables in F i , which satisfies C .Let us define v s := f ( x is ) for s ∈ [ p ] . For every s ∈ [ p ] , we call Lemma 21 to construct the assignmentgadget A v s . Here we do not care about the girth of this gadget, so g can be chosen arbitrarily. We identifythe x -vertex of A v s with x is and the y -vertex with q i,fC . This completes the construction of ( G, L ) (seeFigure 2), note that the construction is performed in time ( n + m ) O (1) .Let us show that ( G, L ) satisfies the desired properties. Claim 18.1. φ is satisfiable if and only if ( G, L ) → H .Proof of Claim. First assume that there exists a list homomorphism ϕ : ( G, L ) → H . For each i ∈ [ t ] consider the coloring ϕ restricted to vertices x i , . . . , x ip . If this coloring does not correspond to any truthassignment of the variables in F i , we set all these variables to false. Otherwise, we set the values of variablesin F i according to the truth assignment corresponding to ϕ | { x i ,...,x ip } . Let us prove that the obtained truthassignment satisfies φ . 13 C y C x x x p x i x i x ip x t x t x tp x x x p x i x i x ip x t x t x tp x x x p x i x i x ip x t x t x tp T ,f C T ,f C T i,f j C T t,f ℓ C A f ( x ) A f j ( x ip ) A f ℓ ( x t ) A f ℓ ( x tp ) Figure 2: The path P C for a clause C and vertices x is for i ∈ [ t ] , s ∈ [ p ] .Consider any clause C of φ . Since ϕ is a list homomorphism, we know that ϕ ( x C ) = α ′ and ϕ ( y C ) = β ′ .Thus ϕ maps the input vertex of the first switching gadget on P C , i.e., the unique vertex adjacent to x C ,to α . Indeed, the list of this vertex is { α, β } , and β is non-adjacent to α ′ in H . Similarly, the output vertexof the last switching gadget on P C , i.e., the only vertex that is adjacent to y C , must be mapped to β . Thatimplies that on P C there is at least one switching gadget T i,fC , whose input is mapped to α and the outputis mapped to β . By the property (S4.) in Definition 20 (of a switching gadget), it holds that ϕ ( q i,fC ) = γ .Recall that in the construction of ( G, L ) we added T i,fC for a truth assignment of variables in F i , whichsatisfies C , and f is a coloring of x i , . . . , x ip corresponding to that assignment. Moreover, the q -vertex of T i,fC , i.e., q i,fC , was identified with y -vertices of assignment gadgets A v s , where v s = f ( x is ) for s ∈ [ p ] . Onthe other hand, the x -vertex of A v s is x is . By the definition of an assignment gadget (property (A4.) inDefinition 19), if the y -vertex of A v s is mapped to γ , then the x -vertex must be mapped to v s . Thus forevery s ∈ [ p ] it holds that ϕ ( x is ) = v s = f ( x is ) . Since the values of the variables in F i were assignedaccording to the homomorphism ϕ and f corresponds to an assignment that satisfies C , the clause C issatisfied.Now assume that there exists a satisfying assignment w of φ . Recall that for every i ∈ [ t ] , the as-signment w restricted to F i corresponds to some coloring f i of the vertices x i , . . . , x ip . So we can define ϕ ( x is ) := f i ( x is ) for every s ∈ [ p ] and i ∈ [ t ] . Now for every clause C we choose one group F i thatcontains a variable satisfying φ in the assignment w , it exists since every clause is satisfied by w . Since w restricted to F i satisfies C , we observe that there is a switching gadget T i,f i C introduced for the triple ( C, i, f i ) and the q -vertex of this gadget is q i,f i C . We set ϕ ( q i,f i C ) := γ and extend ϕ on P C in a way that:a) ϕ ( x C ) := α ′ ,b) all input and output vertices of switching gadgets between x C and T i,f i C on P C are mapped to α ,c) the input vertex of T i,f i C is mapped to α and the output vertex is mapped to β (recall that q i,f i C is alreadymapped to γ )d) inputs and outputs of all remaining switching gadgets on P C are mapped to β ,e) ϕ ( y C ) := β ′ .We extend ϕ to all remaining vertices of switching gadgets mentioned in b) and d). We do it in a way, thatevery q -vertex is mapped to α or β (it is possible by property (S2.) in Definition 20). Next, we can extend ϕ to remaining vertices of T i,f i C . Note that this is possible by property (S3.) in Definition 20.14t only remains to extend ϕ to the vertices from assignment gadgets. Observe that if for some assign-ment gadget A v s for s ∈ [ p ] its y -vertex is mapped to one of { α, β } and x -vertex is mapped to u ∈ S , thenwe can always extend ϕ to all remaining vertices of A v s by property (A2.) in Definition 19. So assume thatthe y -vertex of A v s is mapped to γ . Recall that the only q -vertex on P C that was mapped to γ is q i,f i C , where f i corresponds to the assignment w restricted to F i . Thus if the y -vertex of the assignment gadget A v s ismapped to γ , then that y -vertex is exactly q i,f i C and by the construction of ( G, L ) it holds that v s = f i ( x is ) .Moreover, for every s ∈ [ p ] , the y -vertex of the assignment gadget A f i ( x is ) is q i,f i C , again it follows fromthe construction of ( G, L ) . Thus all assignment gadgets whose y -vertex is mapped by ϕ to γ are exactly A f i ( x is ) for s ∈ [ p ] . Since x -vertices of these gadgets, i.e., x i , . . . , x ip , are already mapped according to f i ,we can also extend ϕ to all vertices of the gadgets by the property (A3.) in Definition 19. (cid:4) Claim 18.2.
The set S ti =1 { x i , . . . , x ip } is a feedback vertex set in G .Proof of Claim. First observe that G consists of: pairwise disjoint paths P C , the independent set S ti =1 { x i , . . . , x ip } ,and assignment gadgets A v . Moreover, every assignment gadget A v has exactly one common vertex withexactly one path P C , and x -vertices of all assignment gadgets are contained in S ti =1 { x i , . . . , x ip } . Bythe definition of an assignment gadget, every cycle entirely contained in A v contains the x -vertex of A v (property (A5.) in Definition 19). Thus, every cycle in G contains a vertex from S ti =1 { x i , . . . , x ip } . (cid:4) Suppose that the instance ( G, L ) of LHom ( H ) can be solved in time ( k − ε ) fvs( G ) · | V ( G ) | O (1) . ByClaim 18.2 there is a feedback vertex set in G of size t · p and thus fvs( G ) t · p . Moreover, | V ( G ) | =( n + m ) O (1) . Hence, ( k − ε ) fvs( G ) · | V ( G ) | O (1) ( k − ε ) t · p · ( n + m ) O (1) . By Claim 18.1 solving theinstance φ of CNF-Sat is equivalent to solving the instance ( G, L ) of LHom ( H ) and thus CNF-Sat can besolved in time: ( k − ε ) t · p · ( n + m ) O (1) = k log k ( k − ε ) · p · t · ( n + m ) O (1) = k λ · p · t · ( n + m ) O (1) = k λ · p · (cid:6) n ⌊ p · log k ⌋ (cid:7) · ( n + m ) O (1) . (1)Let us analyze the exponent more carefully: λ · p · l n ⌊ p · log k ⌋ m λ · p · n ⌊ p · log k ⌋ +1 ! λ · p · np · log k − ! λ · p · n ( p − · log k +1 ! . (2)By the choice of p it holds that: λ · p · n ( p − · log k + 1 ! = λ · pp − · n log k + λ · p δ ′ · n log k + λ · p, (3)where δ ′ < . Recall that p and λ do not depend on n and m . Thus the instance φ of CNF-Sat can besolved in time: k δ ′ · n log k + λ · p · ( n + m ) O (1) = k δ ′ · n log k · ( n + m ) O (1) = 2 δ ′ · n · ( n + m ) O (1) = (2 − δ ) n · ( n + m ) O (1) (4)for some δ > , which contradicts the SETH.Let us point out that the pathwidth of the graph constructed in the proof of Theorem 18 is boundedby t · p + f ( H ) , for some function f of H (see also [43]). Furthermore, we note that the constructedinstance satisfies conditions 1. and 2. of Definition 11. Moreover, in any instance of LHom ( H ) , if a list L ( v ) contains vertices x, y such that N ( x ) ⊆ N ( y ) , then we can safely remove x from the list. Thus weactually proved the following. 15 emark 23. Theorem 17 and Theorem 18 hold, even if we assume that the instance ( G, L ) is consistent. In this section we extend our results from Theorem 17 to the general case, i.e., we do not assume that thegraph H is bipartite. In particular, we allow loops in H . Recall that by H ∗ we denote a graph whose vertexset is V ( H ∗ ) = { v ′ , v ′′ | v ∈ V ( H ) } and there is an edge v ′ u ′′ in H ∗ if and only if vu ∈ E ( H ) . Theorem 2 b).
Let H be a connected non-bi-arc graph. Even if H is fixed, there is no algorithm that solvesevery instance ( G, L ) of LHom ( H ) in time ( i ∗ ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) for any ε > , unless the SETHfails.Proof. For contradiction, suppose that there exists a connected non-bi-arc graph H , a constant ε > , andan algorithm A that solves LHom ( H ) for every instance ( G, L ) in time ( i ∗ ( H ) − ε ) fvs( G ) · | V ( G ) | O (1) . Wecan assume that H is non-bipartite, otherwise by Theorem 17 we get a contradiction with the SETH.Consider a consistent instance ( G, L ) of LHom ( H ∗ ) . Let ( G, L ′ ) be an instance of LHom ( H ) obtainedas in Proposition 12, clearly it can be constructed in polynomial time. Recall that if H is a non-bipartite,connected, non-bi-arc graph, then H ∗ is connected bipartite graph, whose complement is not a circular-arcgraph and thus H ∗ satifies the assumptions of Theorem 17. Moreover, i ∗ ( H ) = i ∗ ( H ∗ ) .We can use the algorithm A to solve the instance ( G, L ′ ) of LHom ( H ) in time ( i ∗ ( H ) − ε ) fvs( G ) ·| V ( G ) | O (1) , which, by Proposition 12, is equivalent to solving the instance ( G, L ) of LHom ( H ∗ ) in time ( i ∗ ( H ∗ ) − ε ) fvs( G ) · | V ( G ) | O (1) . By Theorem 17 and Remark 23 it is a contradiction with the SETH.16 Parameter: cutwidth
LHom ( H ), bipartite target graphs Similarly as for feedback vertex set let us first prove Theorem 3 in bipartite case. Recall that for a positiveinteger g , by C g we denote the class of all graphs G that are bipartite, with maximum degree 3, girth atleast g , and all vertices of degree in G are pairwise distance at least g . Theorem 24.
Let H be the class of connected, bipartite graphs, whose complement is not a circular-arc graph,and let g ∈ N .a) For every H ∈ H , there is no algorithm that solves every instance ( G, L ) of LHom ( H ) , where G ∈ C g , intime ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails.b) There exists a universal constant < δ < , such that for every H ∈ H , there is no algorithm that solvesevery instance ( G, L ) of LHom ( H ) , where G ∈ C g , in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless theETH fails. Similarly to the case of Theorem 17, it is sufficient to show the following.
Theorem 25.
Let H ′ be the class of connected, undecomposable, bipartite graphs, whose complement is nota circular-arc graph, and let g ∈ N .a) For every H ∈ H ′ , there is no algorithm that solves every instance ( G, L ) of LHom ( H ) , where G ∈ C g , intime ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails.b) There exists a universal constant < δ < , such that for every H ∈ H ′ , there is no algorithm that solvesevery instance ( G, L ) of LHom ( H ) , where G ∈ C g , in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless theETH fails. It can be shown that Theorem 24 a) is equivalent to Theorem 25 a) and that Theorem 24 b) is equivalentto Theorem 25 b). Since the proofs of the equivalence are analogous, let us show only one of them. (Theorem 24 a) → Theorem 25 a))
Assume the SETH and suppose that Theorem 24 a) holds and Theorem 25 a)fails. Then there exist a connected, bipartite, udecomposable graph H , whose complement is not a circular-arc graph, g ∈ N , ε > , and an algorithm A that solves every instance ( G, L ) of LHom ( H ) such that G ∈ C g in time ( mim ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) . The properties of H imply that mim ∗ ( H ) = mim ( H ) .Thus every instance ( G, L ) of LHom ( H ) such that G ∈ C g can be solved in time ( mim ∗ ( H ) − ε ) ctw( G ) ·| V ( G ) | O (1) . By Theorem 24 a) we get a contradiction with the SETH. (Theorem 25 a) → Theorem 24 a))
Assume the SETH and suppose that Theorem 25 a) holds and Theorem 24 a)fails. Then there exist a connected, bipartite graph H , whose complement is not a circular-arc graph, g ∈ N , ε > , and an algorithm A that solves every instance ( G, L ) of LHom ( H ) such that G ∈ C g intime ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) . Let H ′ be an induced subgraph of H such that H ′ is connected,undecomposable, is not a complement of a circular-arc graph, and mim ( H ′ ) = mim ∗ ( H ) . Observe thatany instance ( G, L ) of LHom ( H ′ ) can be seen as an instance of LHom ( H ) such that only vertices of H ′ appear on lists L . Thus we can use the algorithm A to solve any instance ( G, L ) of LHom ( H ′ ) with G ∈ C g in time ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) = ( mim ( H ′ ) − ε ) ctw( G ) · | V ( G ) | O (1) , which, by Theorem 25 a),contradicts the SETH. 17ow we will show how to modify the reduction from Theorem 18 to prove Theorem 25. To get anintuition about what needs to be done, recall that in order to obtain a bound on the cutwidth, we needto bound the pathwidth and the maximum degree. Also, as we already observed, the pathwidth of theinstance constructed in Theorem 18 is upper-bounded by the correct value, so we need to take care ofvertices of large degree. Lemma 26.
Let g ∈ N and let H be a connected, bipartite, undecomposable graph, whose complement is nota circular-arc graph. Let k := mim ( H ) . Let φ be an instance of CNF-Sat with n variables and m clauses.Let p be a positive integer and let t := l n ⌊ p · log k ⌋ m . Then there exists an instance ( e G, e L ) of LHom ( H ) whichsatisfies the following properties.(1.) ( e G, e L ) → H if and only if φ is satisfiable,(2.) ctw( e G ) t · p + f ( g, H ) , where f is some function of g and H ,(3.) e G ∈ C g ,(4.) | V ( e G ) | = ( n + m ) O (1) .Moreover, ( e G, e L ) can be constructed in polynomial time in ( n + m ) .Proof. Let S be a strongly incomparable set in H of size k = mim ( H ) , contained in one bipartition class.Let S ′ be a set such that S ∪ S ′ induces a matching of size k in H , and let ( α, β, γ ) be the triple givenby Lemma 10, such that α, β, γ are in the same bipartition class as S . We repeat the construction of theinstance ( G, L ) of LHom ( H ) , such that ( G, L ) → H if and only if φ is satisfiable, from the proof ofTheorem 18. This is possible since S is in particular incomparable. Furthermore, in the construction of ( G, L ) we did not use the fact that S was maximum, we only needed that | S | > , which is the case as { α, β } is strongly incomparable. Although in the proof of Theorem 18 we did not care about girth of thegadgets and distances between vertices of degree , now in the construction of ( G, L ) , while introducinggadgets from Lemma 21 and Lemma 22, we introduce such assignment gadgets in which:• the girth is at least g ,• the distance of vertices of degree at least is at least g ,• the distance between the x -vertex and the y -vertex is at least g ,• every vertex of degree at least is at distance at least g from the x -vertex and the y -vertex.Similarly, we introduce such switching gadgets with special vertices p, q, r , in which dist( p, q ) > g and dist( r, q ) > g . We are going to modify the instance ( G, L ) into the instance ( e G, e L ) with the propertieslisted in the statement of the lemma.However, before we do that, let us fix an arbitrary ordering of clauses C , . . . , C m in φ , which impliesthe ordering of paths P C in G . Then we can fix an ordering of all q -vertices in G , so that a q -vertex q precedes a q -vertex q , if:• q belongs to the path P C i and q belongs to the path P C j , such that i < j , or• q and q belong to the same path P C , and q precedes q on P C (the order of the vertices of eachpath P C is such that x C is the first vertex and y C is the last vertex).18 { α, β, γ } p { α, β } r { α, β } x i x ip TA f ( x i ) A f ( x ip ) p { α, β } r { α, β } q { α, β, γ } q k − { α, β, γ } q p · ( k − { α, β, γ } x i x ip A f ( x i ) A f ( x ip ) Figure 3: The switching gadget T and the group of vertices x is for s ∈ [ p ] before the step of splitting q -vertices (left) and after the step in the case that { α, β, γ } is a strongly incomparable set (right).Finally, let us fix an ordering of the assignment gadgets in G as follows. Recall that every q -vertex q i,fC is a y -vertex of p assignment gadgets whose x -vertices are, respectively, x i , . . . , x ip . We fix an ordering ofthe assignment gadgets so that the assignment gadget A precedes the assignment gadget A if:• the y -vertex of A precedes the y -vertex of A in the fixed order of the q -vertices, or• A and A have the same y -vertex q i,fC and x -vertices of A and A are, respectively, x ij and x is , with j < s .Now we are ready to modify the instance ( G, L ) . It turns out that we only need to take care of q -vertices and x -vertices, as their large degree forces large cutwidth. The construction of ( e G, e L ) will be thusperformed in two steps. Step 1. Splitting q -vertices. Recall that every q -vertex of a switching gadget is a y -vertex of p assign-ment gadgets and the degree of each y -vertex in the assignment gadget is k − . For every q -vertex q ,in order to reduce its degree, we will split q into p · ( k − vertices q , . . . , q p · ( k − . In this step, theconstruction depends on the structure of H . Let us consider two cases. Case I. The set { α, β, γ } is strongly incomparable. Let α, β, γ be vertices such that edges αα, ββ, γγ induce a matching in H . We split every q -vertex q from a path P C into p · ( k − vertices q , . . . , q p · ( k − ,each for every neighbor of q inside assignment gadgets. After this operation we remove q from the graph.For every j ∈ [ p · ( k − − we introduce a path Q j of even length which is at least g , with lists ofconsecutive vertices { α, β, γ } , { α, β, γ } , . . . , { α, β, γ } , and we identify its endvertices with q j and q j +1 .In the same way, we introduce paths Q and Q p · ( k − and we identify endvertices of Q with q and thevertex preceding q on P C , and we identify endvertices of Q p · ( k − with q p · ( k − and the vertex following q on P C (see Figure 3). Finally, let us fix an ordering a , a , . . . , a p · ( k − of neighbors of q in assignmentgadgets such that for j ∈ [ p − vertices of the assignment gadget with the x -vertex x ij precede verticesof the assignment gadget with the x -vertex x ij +1 . The order of the neighbors from the same assignmentgadget is arbitrary. For every j ∈ [ p · ( k − we add an edge between q j and a j (see Figure 3). Thiscompletes the step of splitting q -vertices in this case.19 { w , w , w } { w , w } { w , w } q { w , w } q { w , w } { w , w } { w , w } q p · ( k − { w , w } Q Q q { w , w , w } { w , w , w } { w , w } { w , w } { w , w } q { w , w } q { w , w } q p · ( k − { w , w } Q Q (a) The construction of the path Q in case that H contains an induced C with consecutive vertices w , . . . , w and α = w , β = w , γ = w (above) and in case that H contains an induced C with consecutive vertices w , . . . , w and α = w , β = w , γ = w (below). { w , w } { w , w } { w , w } { w , w } { w , w } { w , w } Q j = (b) The construction of each subpath Q j , for j = 0 , . . . p · ( k − , used in the construction of Q . The length of each Q j is at least g . Figure 4: The construction of the path Q from the step of splitting q -vertices, case 2. The new q -verticesare marked gray. q { α, β, γ } p { α, β } r { α, β } x i x ip TA f ( x i ) A f ( x ip ) p { α, β } r { α, β } q q { β, γ } q k − { β, γ } q p · ( k − { β, γ } Q x i x ip A f ( x i ) A f ( x ip ) Figure 5: The switching gadget T and the group of vertices x is for s ∈ [ p ] before the step of splitting q -vertices (left) and after introducing the path Q in the case that { α, β, γ } is not strongly incomparable(right). 20 ase II: The set { α, β, γ } is not strongly incomparable. By Lemma 10 this means that H containsan induced C with consecutive vertices w , . . . , w and α = w , β = w , γ = w , or an induced C withconsecutive vertices w , . . . , w and α = w , β = w , γ = w .In this case we leave each q -vertex q in the graph, but we introduce a path Q with H -lists L , with q asone of endvertices, p · ( k − special vertices q j for j ∈ [ p · ( k − , with list L ( q j ) = { β, γ } and suchthat:• for every list homomorphism ϕ : ( Q, L ) → H , if q is mapped to γ , then for every j ∈ [ p · ( k − the vertex q j is mapped to γ .• there exists a list homomorphism ϕ : ( Q, L ) → H such that ϕ ( q ) = γ and ϕ ( q j ) = γ for every j ∈ [ p · ( k − .• for every c ∈ { α, β } there exists a list homomorphism ϕ : ( Q, L ) → H such that q is mapped to c and for every j ∈ [ p · ( k − the vertex q j is mapped to β ,• for every distinct j, s ∈ [ p · ( k − , the distance between the vertices q j and q s is at least g . Moreover,the distance between q j and q is at least g .The construction of the path Q is shown on Figure 4. Again, for each neighbor a j of q (the neighbors of q i,fC are ordered as in the previous case) we add an edge q j a j and remove the edge qa j (see Figure 5).This completes the Step 1. In both cases we will refer to the newly introduced vertices q j as q -vertices. Step 2. Splitting x -vertices. The only vertices that might still have degree larger than are verticesfrom { x ij | i ∈ [ t ] , j ∈ [ p ] } . More precisely, the degree of the x -vertex in an assignment gadget is ( k − ,and thus the degree of an x -vertex x is d = d ( x ) · ( k − , where d ( x ) is the number of the assignmentgadgets, whose x -vertex is x . We split the vertex x into d vertices x , . . . , x d , each with list S . We remove x from the graph. For every s ∈ [ d − we introduce a path X s of even length at least g , lists of consecutivevertices S, S ′ , . . . , S , and we identify its endvertices with x s and x s +1 , respectively. We fix an ordering b , . . . , b d of neighbors of x , such that if b i and b j belong, respectively, to assignment gadgets A i and A j ,and A i precedes A j in the fixed order of the assignment gadgets, then b i precedes b j . The order of theneighbors from the same assignment gadget is arbitrary. For every s ∈ [ d ] we add an edge b s x s . We willrefer to the new vertices x j introduced in this step also as x -vertices. This completes the construction of ( e G, e L ) .Now let us verify that ( e G, e L ) satisfies desired properties. First, let us show the property (1.). Claim 26.1. ( e G, e L ) → H if and only if φ is satisfiable.Proof of Claim. Recall that ( G, L ) → H if and only if φ is satisfiable. Thus it is sufficient to show that ( e G, e L ) → H if and only if ( G, L ) → H . So suppose first that there exists a list homomorphism ϕ :( G, L ) → H . We consider two cases, depending on which case in Step 1. was applied.If the first case in Step 1. was applied, we define e ϕ : ( e G, e L ) → H as follows. For every vertex v of G that is not a q -vertex or an x -vertex (note that these vertices are also vertices of e G ), we set e ϕ ( v ) = ϕ ( v ) .For every x -vertex x j that was introduced in Step 2. for some x -vertex x in G , we set e ϕ ( x j ) := ϕ ( x ) and we extend e ϕ on the path X j : we map odd vertices from X j to ϕ ( x ) and even vertices to the privateneighbor of ϕ ( x ) from S ′ . Similarly, we extend e ϕ on the new q -vertices: for every q -vertex q j that wasintroduced for a q -vertex q in G , we set e ϕ ( q j ) := ϕ ( q ) and we extend e ϕ to the other vertices of Q j . Thiscompletes the definition of e ϕ in this case. 21f the second case in Step 1. was applied, we define e ϕ ( v ) := ϕ ( v ) for every vertex v of G that is a vertexof a path P C , again, these vertices are also vertices of e G . Then for every q -vertex q , if ϕ ( q ) ∈ { α, β } , weextend e ϕ to the vertices of the path Q introduced for q in Step 1., so that every q -vertex q j on Q is mappedto β . Otherwise, if q is mapped to γ , then we extend e ϕ to Q so that every q -vertex q j is mapped to γ . Thenwe define e ϕ ( x j ) := ϕ ( x ) for every vertex x j that was introduced for an x -vertex x in Step 2. and weextend e ϕ to the vertices of the paths X j . Finally, we extend e ϕ to the remaining vertices of the assignmentgadgets. Note that this is possible by the way of defining e ϕ on the x -vertices and q -vertices, and by theproperties (A2.) and (A3.) from Definition 19. This completes the definition of e ϕ . It is straightforward toverify that in both cases e ϕ is a list homomorphism from ( e G, e L ) to H .Suppose now that there exists a list homomorphism e ϕ : ( e G, e L ) → H . Again we consider two cases.If the first case in Step 1. was applied, we construct a list homomorphism ϕ : ( G, L ) → H as follows.For every v from G that is not a q -vertex, or an x -vertex, we set ϕ ( v ) := e ϕ ( v ) . Observe now that for every x -vertex x from the graph G , all the new x -vertices x j that were introduced for x must be mapped by e ϕ to the same vertex of H . That follows from the construction of the paths X j , as lists of their vertices are S and S ′ , and for every s ∈ S there is exactly one s ′ ∈ S ′ adjacent to s . Similarly, the new q -vertices q j thatwere introduced for the same q -vertex q must be mapped by e ϕ to the same vertex of H . Thus for every x -vertex x in G we set ϕ ( x ) := e ϕ ( x ) , where x is the first x -vertex introduced for x in the Step 2., andfor every q -vertex q we set ϕ ( q ) := e ϕ ( q ) , where q is the q -vertex introduced for q in the Step 1. Thiscompletes the definition of ϕ in this case.If the second case in Step 1. was applied, we define ϕ ( v ) := e ϕ ( v ) for every vertex v of a path P C . Thenfor every x -vertex x from the graph G we set ϕ ( x ) := e ϕ ( x ) , where x is the first x -vertex introduced for x in Step 2. Finally, we extend ϕ to all remaining vertices of the assignment gadgets. Note that in this case all q -vertices q j introduced for the same q -vertex q are mapped by e ϕ to the same vertex. Moreover, if e ϕ ( q ) = γ ,then e ϕ ( q j ) = γ for every q j , and if e ϕ ( q ) ∈ { α, β } , then e ϕ ( q j ) = β for every q j , and ϕ ( x ) = e ϕ ( x j ) forevery x j introduced for x . Therefore, extending ϕ to the remaining vertices of the assignment gadgets ispossible. It is straightforward to verify that in both cases ϕ is a list homomorphism from ( G, L ) to H . (cid:4) Now let us verify the property (2.).
Claim 26.2.
The cutwidth of e G is at most t · p + f ( g, H ) , where f is some function of g and H .Proof of Claim. We construct a linear layout of e G as follows. First we order the original paths P C (thosefrom graph G ) according to the fixed order of clauses. Then we order vertices of those paths in a way thatvertices from P C j precede vertices of P C j +1 , and vertices on each path P C are ordered in a natural way(the vertex x C is the first one and the vertex y C is the last one). Then, depending on the case applied inStep 1., we either replace each q -vertex q with vertices q j and vertices of paths Q j in the following order: Q , q , Q , . . . , q p · ( k − , Q p · ( k − (if Case 1. was applied), or we insert the vertices from the path Q justafter q , in the natural order with q being the first one.It only remains to place the new x -vertices (i.e., vertices introduced in Step 2.), and the vertices fromthe assignment gadgets. Consider an arbitrary assignment gadget, whose x -vertex before Step 2. was x and the y -vertex before Step 1. was q . Observe that in e G the vertices adjacent to the vertices of the gadgetare x ℓ , . . . , x ℓ ′ and q s , . . . , q s ′ , for some ℓ and s , and where ℓ ′ = ℓ + ( k − − and s ′ = s + k − .The vertices q s , . . . , q s ′ are consecutive q -vertices introduced for q in Step 1. and the vertices x ℓ , . . . , x ℓ ′ are consecutive x -vertices introduced for x in Step 2. We insert the vertices from the gadget, x -vertices x ℓ , . . . , x ℓ ′ and the paths X ℓ , . . . , X ℓ ′ (also introduced in Step 2. for x ), just before the group of q -vertices q s , . . . , q s ′ . The order of the vertices from the gadget is abitrary. The x -vertices are ordered x ℓ , . . . , x ℓ ′ X ℓ , . . . , X ℓ ′ are in the order of appearing on the path, with x j being thefirst one from X j . This completes the construction of the linear layout of e G .Consider an arbitrary cut of the layout. The edges that can possibly cross this cut are:• at most one edge from a path P C ,• at most one edge from a path Q ,• edges from at most one assignment gadget (together with ( k − edges from the new x -verticesand k − edges from the new q -vertices to that gadget)• for each i ∈ [ t ] , j ∈ [ p ] at most one edge from the path X ℓ that was introduced for the x -vertex x ij .Thus for each cut the number of edges crossing this cut is at most a constant depending on g and H , letus denote it by f ( g, H ) , and at most t · p edges from the paths X ℓ . (cid:4) Now let us verify that e G ∈ C g . Note that the fact that e G is bipartite follows directly from the construc-tion. It remains to show the remaining conditions of the class C g . Claim 26.3.
The maximum degree of e G is .Proof of Claim. Observe that the only vertices of G that might have degree larger than are q -vertices andvertices x ij for i ∈ [ t ] , j ∈ [ p ] – that follows from the definitions of the gadgets and the construction of G . In the first step we reduce the degrees of q -vertices by splitting them into vertices of degree at most .In the second step we repeat this for vertices x ij for i ∈ [ t ] , j ∈ [ p ] . Thus the maximum degree of e G is atmost . (cid:4) Claim 26.4.
Vertices of degree in e G are pairwise at distance at least g .Proof of Claim. First observe that in all introduced gadgets the distance between the vertices of degree atleast is at least g , and the applied steps did not change it. Moreover, the q -vertices in e G are at distanceat least g , and the x -vertices are at distance at least g . Finally, internal vertices of degree from distinctgadgets are at distance at least g , since they are at distance at least g from the special vertices of thosegadgets and only special vertices of the gadgets are adjacent to any vertices outside the gadgets. (cid:4) Claim 26.5.
The girth of e G is at least g .Proof of Claim. Recall that a switching gadget is a path, so it cannot contain a cycle. Furthermore, everyassignment gadget that we introduced in the construction of e G has girth at least g . Every other cycle in e G ,which is not fully contained in an assignment gadget, must contain at least two distinct x -vertices, or atleast two distinct q -vertices, or at least one q -vertex and at least one x -vertex. All x -vertices and q -verticesare pairwise at distance at least g , so the claim follows. (cid:4) By previous observations and Claim 26.3, Claim 26.4, and Claim 26.5, the property (3.) is satisfied. Theproperty (4.) follows directly from the construction of ( e G, e L ) . Obviously, ( e G, e L ) can be constructed inpolynomial time.Now we will use the construction introduced in Lemma 26 to prove Theorem 25. The proof is split intotwo parts – first we will prove the statement a), and then the statement b).23 roof of Theorem 25 a). Let ε > , let H be an undecomposable, bipartite graph, whose complement isnot a circular-arc graph, and let g ∈ N . Suppose now that LHom ( H ) can be solved in time ( mim ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for every instance ( G, L ) such that G ∈ C g . Let φ be an instance of CNF-Sat with n variables and m clauses. Let k := mim ( H ) , observe that since H is not a complement of a circular-arcgraph, by Lemma 10 1., it holds that k > . Let λ := log k ( k − ε ) , note that λ < , and let p be sufficentlylarge so that λ · pp − < . Let t := l n ⌊ p · log k ⌋ m .We call Lemma 26 for H , g , φ , and p to construct in polynomial time the instance ( e G, e L ) of LHom ( H ) .By Lemma 26 (1.) solving the instance ( e G, e L ) of LHom ( H ) is equivalent to solving the instance φ of CNF-Sat . Moreover, by Lemma 26 (4.) it holds that | V ( e G ) | = ( n + m ) O (1) . Thus we can solve the instance φ in time: ( k − ε ) ctw( e G ) · | V ( e G ) | O (1) = ( k − ε ) ctw( e G ) · ( n + m ) O (1) ( k − ε ) t · p + f ( g,H ) · ( n + m ) O (1) =( k − ε ) t · p · ( k − ε ) f ( g,H ) · ( n + m ) O (1) = ( k − ε ) t · p · ( n + m ) O (1) , where the first inequality follows from Lemma 26 (2.) and the last equality follows from the fact that g and | H | are constant. Similarly to equations (1), (2), (3), and (4) we can deduce that the above implies that CNF-Sat can be solved in time (2 − δ ) n · ( n + m ) O (1) for some δ > , which contradicts the SETH. Proof of Theorem 25 b).
Assume the ETH and let < δ ′ < be such that 3- Sat cannot be solved in time δ ′ · n · n O (1) for every instance φ with n variables and m clauses. Define δ := δ ′ . Suppose that there is anundecomposable, bipartite graph H , whose complement is not a circular-arc graph, and an algorithm A that solves LHom ( H ) for every instance ( G, L ) with G ∈ C g in time mim ( H ) δ · ctw( G ) · | V ( G ) | O (1) . Let φ be an instance of 3- Sat with n variables and m clauses. Let k := mim ( H ) , again note that k > . Define ε ′ > such that ε ′ < k δ ′ − k δ and ε := k − k δ ′ + ε ′ . Observe that λ := log k ( k − ε ) < δ ′ . We choose p sufficently large so that λ · pp − δ ′ and define t := l n ⌊ p · log k ⌋ m . As - Sat is a special case of
CNF-Sat ,we can call Lemma 26 for H , g , p , and φ to obtain an instance ( e G, e L ) of LHom ( H ) . Moreover, for anyinstance of - Sat with n variables and m clauses, we can assume that m = n O (1) . By Lemma 26, solvingthe instance ( e G, e L ) is equivalent to solving the instance φ of - Sat . Thus φ can be solved in time: k δ · ctw( e G ) · | V ( e G ) | O (1) = k δ · ctw( e G ) · n O (1) < ( k δ ′ − ε ′ ) ctw( e G ) · n O (1) = ( k − ε ) ctw( e G ) · n O (1) . By Lemma 26 (2.) the running time is at most ( k − ε ) t · p · n O (1) . We can provide similar computationsas in equations (1), (2) and (3); recall that λ · pp − δ ′ so (3) applies. So we can solve any instance of - Sat with n variables in time: k δ ′ · n log k + λ · p · n O (1) = k δ ′ · n log k · k λ · p · n O (1) = k δ ′ · n log k · n O (1) = 2 δ ′ · n · n O (1) , which, by the choice of δ ′ , contradicts the ETH.Observe that the instance ( e G, e L ) constructed in Lemma 26 satisfies conditions 1. and 2. of Definition 11.Similarly as in Remark 23, we conclude the following. Remark 27.
Theorem 24 and Theorem 25 hold, even if we assume that the instance ( G, L ) is consistent. .2 Lower bounds for LHom ( H ), general target graphs Now, similarly as in the proof of Theorem 2 b), we will show that Theorem 24 implies Theorem 3.
Theorem 3.
Let H be the class of connected non-bi-arc graphs. For g ∈ N , let C g be the class of subcubicbipartite graphs G with girth at least g , such that vertices of degree in G are at distance at least g .a) For every H ∈ H , there is no algorithm that solves every instance ( G, L ) of LHom ( H ) , where G ∈ C g , intime ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails,b) There exists a constant < δ < , such that for every H ∈ H , there is no algorithm that solves everyinstance ( G, L ) of LHom ( H ) , where G ∈ C g , in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless the ETH fails.Proof. First, assume the SETH and suppose that Theorem 3 a) fails. Then there exists a connected, non-bi-arc graph H , a constant ε > , g ∈ N , and an algorithm A that solves LHom ( H ) for every instance ( G, L ) ,such that G ∈ C g , in time ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) . We can assume that H is non-bipartite,as otherwise the result follows immediately from Theorem 24. Consider a consistent instance ( G, L ) of LHom ( H ∗ ) such that G ∈ C g . Let ( G, L ′ ) be an instance of LHom ( H ) obtained as in Proposition 12,clearly it can be constructed in polynomial time. Recall that if H is a non-bipartite, connected, non-bi-arcgraph, then H ∗ is connected, bipartite graph, whose complement is not a circular-arc graph and thus H ∗ satifies the assumptions of Theorem 24. Moreover, mim ∗ ( H ) = mim ∗ ( H ∗ ) .We can use A to solve the instance ( G, L ′ ) of LHom ( H ) in time ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) ,which by Proposition 12 is equivalent to solving the instance ( G, L ) of LHom ( H ∗ ) in time ( mim ∗ ( H ∗ ) − ε ) ctw( G ) · | V ( G ) | O (1) , which, by Theorem 24 and Remark 27, contradicts the SETH. That completes theproof of the statement a).Now assume the ETH and let δ be the constant from Theorem 24 b). Suppose there exists a connectednon-bi-arc graph H and an algorithm A that solves LHom ( H ) for any instance ( G, L ) , such that G ∈ C g ,in time ( mim ∗ ( H )) δ · ctw( G ) · | V ( G ) | O (1) . Again, we can assume that H is non-bipartite. Let ( G, L ) be aconsistent instance of LHom ( H ∗ ) such that G ∈ C g and let ( G, L ′ ) be the instance of LHom ( H ) givenby Proposition 12. As mim ∗ ( H ) = mim ∗ ( H ∗ ) , we can use the algorithm A to solve the instance ( G, L ′ ) of LHom ( H ) , and thus the instance ( G, L ) of LHom ( H ∗ ) in time mim ∗ ( H ∗ ) δ · ctw( G ) · | V ( G ) | O (1) . ByTheorem 24 and Remark 27, this contradicts the ETH. That completes the proof of the statement b).Finally, let us point that that in the proofs of Theorem 25 and Theorem 3, we did not claim that thelinear layout we constructed is an optimal one, we only cared that its width is upper-bounded by a correctvalue. Thus the proof actually yields the following, slightly stronger statement. Theorem 28.
Let H be the class of connected non-bi-arc graphs. For g ∈ N , let C g be the class of subcubicbipartite graphs G with girth at least g , such that vertices of degree in G are at distance at least g .a) For every H ∈ H , there is no algorithm that solves every instance ( G, L ) of LHom ( H ) , where G ∈ C g ,given with a linear layout of width w , in time ( mim ∗ ( H ) − ε ) w · | V ( G ) | O (1) for any ε > , unless theSETH fails.b) There exists a constant < δ < , such that for every H ∈ H , there is no algorithm that solves everyinstance ( G, L ) of LHom ( H ) , where G ∈ C g , given with a linear layout of width w , in time mim ∗ ( H ) δ · w ·| V ( G ) | O (1) , unless the ETH fails. .3 Lower bounds for Hom ( H ) In this section we extend Theorem 3 to the non-list case, i.e., we prove Theorem 5.
Theorem 5.
Let H be the class of connected non-bipartite projective cores with at least three vertices.a) For every H ∈ H , there is no algorithm that solves every instance G of Hom ( H ) in time ( mim ∗ ( H ) − ε ) ctw( G ) · | V ( G ) | O (1) for any ε > , unless the SETH fails,b) There exists a universal constant < δ < , such that for every H ∈ H , there is no algorithm that solvesevery instance G of Hom ( H ) in time mim ∗ ( H ) δ · ctw( G ) · | V ( G ) | O (1) , unless the ETH fails. First, let us define the graph class mentioned in the statement. Recall that by the result of Hell andNešetřil [29], the
Hom ( H ) problem is NP-hard if H nonbipartite and has no loops. In particular, this impliesthat H has at least three vertices. We say that a graph H is a core if every homomorphism ϕ : H → H is an automorphism, i.e., is injective and surjective. It is well-known that in order to understand thecomplexity of Hom ( H ), it is sufficient to consider the case if H is a core [27, 28]. The following observationis straightforward. Observation 29.
Let H be a core. Then every two distinct vertices of H are incomparable. The class considered in Theorem 5 are the so-called projective graphs . The definition of these graphsis technical, so we will skip it (see e.g. Hell, Nešetřil [28, Section 2.7]). The following equivalent character-ization is much more relevant to our paper, see also [47].
Theorem 30 (Larose, Tardif [42]).
Let H be graph with at least three vertices. The following are equiva-lent:1. H is projective.2. For every L ⊆ V ( H ) there exist a tuple ( x , . . . , x ℓ ) of vertices in H and a graph F L with a tuple of itsvertices ( y , y , . . . , y ℓ ) such that L = { ϕ ( y ) | ϕ : F L → H, such that ϕ ( y ) = x , . . . , ϕ ( y ℓ ) = x ℓ } . Now we are ready to prove Theorem 5.
Proof of Theorem 5.
Let H be a non-bipartite projective core without loops. Note that H contains an in-duced odd cycle C s for s > and thus H ∗ contains an induced cycle of length s > , so H ∗ is not acomplement of a circular-arc graph, and therefore H is not a bi-arc graph.We will reduce from LHom ( H ), whose hardness was proven in Theorem 3. Actually, we will use thestronger version stated in Theorem 28. Let ( G, L ) be an instance of LHom ( H ) , and let π = ( v , . . . , v | V ( G ) | ) be a linear layout of G of width w . Consider an instance e G of Hom ( H ) constructed as follows. For every v i ∈ V ( G ) we call Theorem 30 to obtain the tuple ( x ( i )1 , . . . , x ( i ) ℓ i ) of vertices in H and a graph F L ( v i ) withspecial vertices y ( i )0 , . . . , y ( i ) ℓ i . For every v i we introduce a copy H ( i ) of the graph H and identify vertices y ( i )1 , . . . , y ( i ) ℓ i , respectively with x ( i )1 , . . . , x ( i ) ℓ i in the copy H ( i ) . Moreover, we identify y ( i )0 with v i . Finally,for every i ∈ [ | V ( G ) | − we add edges between the copies H ( i ) and H ( i +1) as follows. For every vertex z ( i ) in H ( i ) and its corresponding copy z ( i +1) in H ( i +1) we add all edges between z ( i ) and N H ( i +1) ( z ( i +1) ) .This completes the construction of e G .Let us show the following properties of e G : 261) ( G, L ) → H if and only if e G → H ,(2) ctw( e G ) w + g ( H ) , where g is some function of H ,(3) | V ( e G ) | = | V ( G ) | O (1) ,(4) e G can be constructed in polynomial time.To see property (1), consider a list homomorphism ϕ : ( G, L ) → H . We define e ϕ : e G → H forevery v i ∈ V ( G ) as e ϕ ( v i ) := ϕ ( v i ) . Since ϕ is a list homomorphism, for every v i ∈ V ( G ) it holds ϕ ( v i ) ∈ L ( v i ) . Observe that by Theorem 30 we can extend e ϕ to the rest vertices of F L ( v i ) so that e ϕ ( y ( i )1 ) = x ( i )1 , . . . , e ϕ ( y ( i ) ℓ i ) = x ( i ) ℓ i . Then we can extend e ϕ to every copy H ( i ) as the identity function. Observe thatthe edges between distinct copies of H are preserved by e ϕ and thus e ϕ is a homomorphism from e G to H .So suppose now that there exists a homomorphism e ϕ : e G → H . We define ϕ := e ϕ | V ( G ) . Recallthat since H is a core, the mapping e ϕ restricted to each copy of H is an automorphism. By Theorem 30,in order to show that ϕ respects lists L , it is sufficent to show that every copy of H is colored by e ϕ according to the same automorphism. Consider copies H ( i ) and H ( i +1) for some i ∈ [ | V ( G ) | − . Let z ( i ) be an arbitrary vertex of H ( i ) and let z ( i +1) be its corresponding vertex in H ( i +1) , and suppose that for s := e ϕ ( z ( i ) ) and u := e ϕ ( z ( i +1) ) we have s = u . Since H is a core, e ϕ is an automorphism on H ( i +1) andthus the image of N H ( i +1) ( z ( i +1) ) is precisely the set N H ( u ) . Moreover, as z ( i ) is adjacent to every vertexin N H ( i +1) ( z ( i +1) ) , we observe that all vertices of the image of N H ( i +1) ( z ( i +1) ) must be adjacent to s in H .This means N H ( u ) ⊆ N H ( s ) , which, by Observation 29, contradicts that H is a core.Now let us show the property (2). We modify the linear layout π of G to obtain a linear layout e π of e G as follows. For every v i ∈ V ( G ) we insert the vertices of F L ( v i ) and the copy H ( i ) just after v (the orderof these vertices is arbitrary). Consider an arbitrary cut of e π . The edges crossing the cut might be:• at most w edges from G ,• edges from at most one gadget F L ( v ) and at most two copies of H (including edges between copiesand between the gadget and a copy).Recall that the size of F L ( v ) for v ∈ V ( G ) depends only on H and there might be at most | H | differentlists L ( v ) . Thus there is some function of H bounding the size of each gadget F L ( v ) . Thus we concludethat ctw( e G ) w + g ( H ) , where g is some function of H .Properties (3) and (4) follow directly from the construction of e G .Now suppose that Hom ( H ) can be solved for every instance G ′ in time ( mim ∗ ( H ) − ε ) ctw( G ′ ) ·| V ( G ′ ) | O (1) for some ε > . Then, for an instance ( G, L ) of LHom ( H ) with a linear layout π of width w , we can construct in polynomial time the instance e G of Hom ( H ) as above. We solve the instance e G intime: ( mim ∗ ( H ) − ε ) ctw( e G ) · | V ( e G ) | O (1) ( mim ∗ ( H ) − ε ) w + g ( H ) · | V ( G ) | O (1) =( mim ∗ ( H ) − ε ) w · ( mim ∗ ( H ) − ε ) g ( H ) · | V ( G ) | O (1) = ( mim ∗ ( H ) − ε ) w · | V ( G ) | O (1) , which is equivalent to solving the instance ( G, L ) with a linear layout π of width w in time ( mim ∗ ( H ) − ε ) w · | V ( G ) | O (1) . By Theorem 28 a) it contradicts the SETH, so the statement a) follows.Now let δ be the constant from Theorem 3 (note that δ does not depend on H ) and suppose that Hom ( H ) can be solved for every instance G ′ in time ( mim ∗ ( H )) δ · ctw( G ′ ) · | V ( G ′ ) | O (1) . Again, in order27o solve an instance ( G, L ) of LHom ( H ) with a linear layout π of width w , we can solve the constructedinstance e G of Hom ( H ) in time: ( mim ∗ ( H )) δ · ctw( e G ) · | V ( e G ) | O (1) ( mim ∗ ( H )) δ · ( w + g ( H )) · | V ( G ) | O (1) =( mim ∗ ( H )) δ · w · ( mim ∗ ( H )) δ · g ( H ) · | V ( G ) | O (1) = ( mim ∗ ( H )) δ · w · | V ( G ) | O (1) , which is equivalent to solving the instance ( G, L ) with π in time ( mim ∗ ( H )) δ · w · | V ( G ) | O (1) . ByTheorem 28 b) it contradicts the ETH, so the statement b) follows.28 Construction of the gadgets
In this section we show how to construct the gadgets that we used in our hardness reductions. First, letus show how we use walks for building gadgets. For a set D = {D i } ki =1 of walks of equal length ℓ > ,let P ( D ) be the path with ℓ + 1 vertices p , . . . , p ℓ +1 , equipped with H -lists, such that the list of p i is theset of i -th vertices of walks in D . The vertex p will be called the input vertex and p ℓ +1 will be called the output vertex . Lemma 31 ([45, 46]).
Let D = {D i } ki =1 be a set of walks D i : s i → t i of equal length ℓ > . Let A, B be a partition of D into two non-empty sets. Moreover, for C ∈ { A, B } , define S ( C ) = { s i : D i ∈ C } and T ( C ) = { t i : D i ∈ C } . Suppose that S ( A ) ∩ S ( B ) = ∅ and T ( A ) ∩ T ( B ) = ∅ , and every walk in A avoids every walk in B . Then P ( D ) with the input vertex x , the output vertex y , and lists L , has the followingproperties:(a) L ( x ) = S ( A ) ∪ S ( B ) and L ( y ) = T ( A ) ∪ T ( B ) ,(b) for every i ∈ [ k ] there is a list homomorphism f i : P ( D ) → H , such that f i ( x ) = s i and f i ( y ) = t i ,(c) for every list homomorphism f : P ( D ) → H , if f ( x ) ∈ S ( A ) , then f ( y ) / ∈ T ( B ) .Furthermore, if every walk in B avoids every walk in A , we additionally have(d) for every list homomorphism f : P ( D ) → H , if f ( x ) ∈ S ( B ) , then f ( y ) / ∈ T ( A ) . Let P , P be gadgets defined as above, such that lists of the output vertex of P and the input vertexof P are equal. We define a composition of P and P as the graph P obtained by identifying the outputvertex of P and the input vertex of P . The input and output of P are respectively the input of P and theoutput of P .Let H be a graph and let R ⊆ V ( H ) k be a k -ary relation on V ( H ) . We define an R -gadget as a graph F with H -lists L and k special vertices x , . . . , x k , called interface vertices, such that: R = { ( f ( x ) , . . . , f ( x k )) | f : ( F, L ) → H } . Let H be a bipartite graph, whose complement is not a circular-arc graph and let ( α, β, γ ) be the tripleof vertices in H given by Lemma 10. We will consider two special k -ary relations: OR k = { α, β } k \ { α } k and NAND k = { α, β } k \ { β } k . The intuition behind the names is that we think of α as false and of β astrue. We will use the OR k - and the NAND -gadgets to construct the assignment gadget.The existence of the OR k - and NAND -gadgets was proved in [45, 46]. However, we will show asligthly different proof to obtain certain structure of the gadgets. Lemma 32 ([45, 46]).
Let H be a bipartite graph, whose complement is not a circular-arc graph, let ( α, β, γ ) be defined as in Lemma 10, and let g ∈ N . For every k > there exists an OR k -gadget, and an NAND -gadget such that:(1.) The NAND -gadget is a path of length at least g with endvertices as interface vertices.(2.) The OR k -gadget is a tree and every interface vertex of the OR k -gadget is a leaf.(3.) The maximum degree of the OR k -gadget is at most . x x k − y z x k − x k NAND OR k − OR Figure 6: Construction of the OR k -gadget with interface vertices x , x , . . . , x k − , x k − , x k . (4.) For any distinct vertices a, b in the OR k -gadget such that deg( a ) = deg( b ) = 3 it holds dist( a, b ) > g .Proof. First, note that an OR -gadget with interface vertices x , x can be obtained from an OR -gadgetwith interface vertices x , x , x by removing β from the list of x . Moreover, observe that if we areable to construct an OR k − -, an OR -, and a NAND -gadgets for some k > , then we can obtain an OR k -gadget. Indeed, consider an OR k − -gadget with interface vertices x , x , . . . , x k − , y , a NAND -gadget with interface vertices y ′ , z ′ , and an OR -gadget with interface vertices z, x k − , x k . We obtain the OR k -gadget by identifying vertices: y with y ′ and z with z ′ . The interface vertices of the constructed OR -gadget are x , . . . , x k (see Figure 6).Moreover, if the OR k − -gadget and the OR -gadget are both trees and the NAND -gadget is a path,then the OR k -gadget is a tree, since we only join two trees with a path (see Figure 6). The interface vertices x , . . . , x k of the OR k -gadget are leaves as they were in the OR k − - and OR -gadgets. The maximumdegree of the OR k is at most since the only vertices whose degree increased by are y, z which wereleaves and thus in the OR k -gadget their degree is . Finally, if (4.) is satisfied for both, the OR -gadgetand the OR k − -gadget, and the NAND -gadget is a path of length at least g , then for any distinct vertices a, b in the OR k -gadget with degree it holds dist( a, b ) > g . So it is sufficent to construct a NAND - andan OR -gadget. Construction of a
NAND -gadget. First, we show how to construct the
NAND -gadget. Observethat if we are able to construct the NAND -gadget as a path of length ℓ < g , then we can easily obtainthe NAND -gadget of length at least g . Indeed, we can introduce a path with H -lists L , of even length ℓ ′ > g − ℓ , with consecutive vertices p , . . . , p ℓ and lists L ( p i ) = { α, β } for odd i and L ( p i ) = { α ′ , β ′ } foreven i , where α ′ , β ′ are taken from Lemma 10. We identify one endvertex of the NAND -gadget with oneendvertex of the path to obtain another NAND -gadget of length at least g . Since edges αα ′ , ββ ′ inducea matching in H , in any list homomorphism both endvertices must be mapped to the same vertex, either α or β , and thus the properties of a NAND -gadget are preserved by that operation.Now let show how to construct the NAND -gadget. If there is an induced C in H with consec-utive vertices w , . . . , w such that α = w , β = w , γ = w , then the NAND -gadget is a path oflength with lists of consecutive vertices: { w , w } , { w , w } , { w , w } , { w , w } , { w , w } . Similarly, ifthere is an induced C in H with consecutive vertices w , . . . , w such that α = w , β = w , γ = w ,then the NAND -gadget is a path of length with lists of consecutive vertices: { w , w } , { w , w , w } , { w , w , w } , { w , w } , { w , w } . It is straightforward to verify that in both cases the constructed graphis indeed a NAND -gadget. So now assume that H does not contain an induced C or an induced C with α = w , β = w , γ = w . Then by Lemma 10 we obtain walks:• X γ : α → α, Y γ : α → β, Z γ : β → γ such that X γ , Y γ avoid Z γ and Z γ avoids X γ , Y γ ,30 α, β } { α, β, γ } { α, β } αβ αβγ βααβγ P ( {X γ , Y γ , Z γ } ) P ( {X α , Y α , Z α } ) Figure 7: The
NAND gadget as the composition of P ( {X γ , Y γ , Z γ } ) and P ( {X α , Y α , Z α } ) . Blue linesinside the gadgets denote possible mappings of the input and the output vertex. Interface vertices aremarked gray.• X α : α → β, Y α : α → γ, Z α : β → α such that X α , Y α avoid Z α and Z α avoids X α , Y α .As the NAND -gadget we take the composition of P ( {X γ , Y γ , Z γ } ) and P ( {X α , Y α , Z α } ) (see Figure 7).Note that the constructed graph is a path. It follows from properties of the walks and Lemma 31 that it isindeed a NAND -gadget. Construction of an OR -gadget. Now it remains to construct the OR -gadget. In order to do that, forevery c ∈ { α, β, γ } we construct an R c -gadget, where R c = (cid:0) { α, β } × { α, β, γ } (cid:1) \ { ( α, c ) } . Moreover,the R c -gadget will be a path with endvertices x, y such that L ( x ) = { α, β } and L ( y ) = { α, β, γ } asinterface vertices. Observe that if we identify y -vertices of the R α -, R β -, and R γ -gadget, then we obtainthe OR -gadget with x -vertices of the gadgets as interface vertices. Furthermore, in the OR -gadget thereis only one vertex of degree and all other vertices are of degree smaller than .So we only need to construct the R c -gadget for every c ∈ { α, β, γ } . If there is an induced C in H with consecutive vertices w , . . . , w such that α = w , β = w , γ = w , then for example the R β -gadget is a path of length with consecutive lists { w , w } , { w , w } , { w , w } , { w , w } , { w , w , w } .The construction of the other R c -gadgets and the case of C is similar (see Figure 8 where y -vertices ofthe gadgets are already identified). Now let { a, b, c } = { α, β, γ } and assume that H does not contain aninduced C or an induced C with α = w , β = w and γ = w . Then by Lemma 10 there exist thefollowing walks:• X : α → β, Y : β → α , such that X avoids Y ,• X a : α → b, Y a : α → c, Z a : β → a , such that X a , Y a avoid Z a and Z a avoids X a , Y a ,• X c : α → a, Y c : α → b, Z c : β → c , such that X c , Y c avoid Z c and Z c avoids X c , Y c .Now we set the R c -gadget as the composition of the gadgets: P ( {X , Y} ) , P ( {X a , Y a , Z a } ) , P ( {X c , Y c , Z c } ) ,and P ( {X c , Y c , Z c } ) (see Figure 9). It follows from the definition of those walks and Lemma 31 that theconstructed graph is indeed an R c -gadget. This completes the proof.The next gadget we will use to construct the assignment gadget is called distiguisher and was con-structed in [45, 46]. It is a graph D a/b , for distinct vertices a , b in H , with H -lists L and two specialvertices x , y . The lists of the special vertices are L ( x ) = S , for an incomparable set S such that a, b ∈ S ,and L ( y ) = { α, β } . In D a/b we can distingiush a and b by mapping y to β , i.e., if x is mapped to a , then y must be mapped to α and it is possible to map x to b and y to β .31 w , w }{ w , w }{ w , w }{ w , w } { w , w }{ w , w }{ w , w , w } { w , w }{ w , w }{ w , w }{ w , w } { w , w }{ w , w }{ w , w }{ w , w , w }{ w , w }{ w , w }{ w , w }{ w , w } { w , w , w }{ w , w }{ w , w }{ w , w }{ w , w }{ w , w }{ w , w } Figure 8: The OR -gadget in case that H contains an induced C (left) and an induced C (right). Recallthat the consecutive vertices of those cycles are denoted by ( w , w , . . . ) . The sets next to vertices indicatelists. Interface vertices are marked gray. The figure is taken from [45, 46]. { α, β } { α, β } { a, b, c } { α, β } { a, b, c } αβ αβ αβ abc abc αβ αβ abc P ( {X , Y} ) P ( {X a , Y a , Z a } ) P ( {X c , Y c , Z c } ) P ( {X c , Y c , Z c } ) Figure 9: Construction of the R c -gadget. Blue lines inside the gadgets denote possible mappings of theinput and the output vertex. The dashed line indicates a mapping that might exist but not necessarily.32 emma 33 (Construction of the distinguisher gadget [45, 46]). Let H be a connected, bipatrite, unde-composable graph whose complement is not a circular-arc graph. Let α, β be defined as in Lemma 10. Let S bean incomparable set in H , such that | S | > and { α, β } ∪ S is contained in one bipartition class of H . Let a, b be distinct vertices of S . Then there exists a distinguisher gadget which is a path D a/b with two endvertices x (called input ) and y (called output ), and H -lists L such that:(D1.) L ( x ) = S and L ( y ) = { α, β } ,(D2.) there is a list homomorphism ϕ a : ( D a/b , L ) → H , such that ϕ a ( x ) = a and ϕ a ( y ) = α ,(D3.) there is a list homomorphism ϕ b : ( D a/b , L ) → H , such that ϕ b ( x ) = b and ϕ b ( y ) = β ,(D4.) for any c ∈ S \ { a, b } there is ϕ c : ( D a/b , L ) → H , such that ϕ c ( x ) = c and ϕ c ( y ) ∈ { α, β } ,(D5.) there is no list homomorphism ϕ : ( D a/b , L ) → H , such that ϕ ( x ) = a and ϕ ( y ) = β . Now we introduce a detector gadget which will be useful in the construction of an assignment gadget.It is a graph e F u with H -lists L and two special vertices x u , c u . It will be used to detect if x u is colored with u as then c u must be colored with β , and for every other coloring of x u , the vertex c u can be colored with α . Definition 34 (Detector gadget).
Let H be a bipartite graph, whose complement is not a circular-arcgraph. Let α, β be defined as in Lemma 10. Let S be a set of vertices in H contained in one bipartitionclass, let k := | S | > , and let u ∈ S . A detector gagdet is a graph e F u with special vertices x u and c u , with H -lists L , such that:( e F L ( x u ) = S and L ( c u ) = { α, β } ,( e F s ∈ S there exists a list homomorphism ϕ : ( e F u , L ) → H such that ϕ ( x u ) = s and ϕ ( c u ) = β ,( e F s ∈ S \ { u } there exists a list homomorphism ϕ : ( e F u , L ) → H such that ϕ ( x u ) = s and ϕ ( c u ) = α ,( e F ϕ : ( e F u , L ) → H , if ϕ ( x u ) = u , then ϕ ( c u ) = β ,( e F e F u − { x u } is a tree,( e F deg( x u ) = k − and deg( c u ) = 1 ,( e F e F u , possibly except x u , is at most .The gadget was first constructed in [45] (the first step in the proof of Lemma 4), but we repeat theconstruction to obtain a certain structure of the gadget. Lemma 35 (Construction of the detector gadget [45]).
Let H be a connected, bipatrite, undecompos-able graph whose complement is not a circular-arc graph. Let α, β be defined as in Lemma 10. Let S be anincomparable set in H , such that | S | > and { α, β } ∪ S is contained in one bipartition class of H . Let g ∈ N and let u ∈ S . Then there exists a detector gadget e F u , such that girth( e F u ) > g and for any distinct a, b in e F u of degree at least it holds that dist( a, b ) > g and dist( a, x u ) > g . u c u OR k D u/v D u/v i − D u/v i +1 D u/v k Figure 10: The graph e F u for S = { v , . . . , v k } and u = v i . Proof.
For every w ∈ S \ { u } we call Lemma 33 for S, u, w to obtain a distinguisher gadget D u/w withinput x u,w and output y u,w . We can assume that every distinguisher D u/w is a path of length at least g . Otherwise, if there is any distinguisher D u/w that is a path of length ℓ < g , then similarly as in theproof of Lemma 32 (construction of the NAND -gadget) we can append to the vertex y u,w a path of evenlength ℓ ′ > g − ℓ with lists of consecutive vertices { α, β } , { α ′ , β ′ } , . . . , { α, β } , where α ′ , β ′ are taken fromLemma 10, and the properties of the distinguisher gadget are preserved. We identify all input vertices intoone vertex x u . Then we call Lemma 32 to construct an OR k gadget and identify k − of its k interfacevertices with the output vertices of distinguishers. Let us call the remaining k -th interface vertex of the OR k gadget c u and the constructed graph e F u (see Figure 10).Now let us verify, that the constructed graph is indeed a detector gadget. Property ( e F e F u . To show ( e F ϕ such that ϕ ( x u ) = s and ϕ ( y u,w ) ∈ { α, β } for every w ∈ S \ { u } . It exists by the definition of a distinguisher (properties(D2.), (D3.), and (D4.)). We set ϕ ( c u ) := β and then we can extend ϕ to all vertices of the OR k -gadget.Property ( e F ϕ : ( D u/s , L ) → H suchthat ϕ ( y u,s ) = β (property (D3.)). By (D4.) we can extend ϕ to D u/w for every w ∈ S \ { u, s } so that ϕ ( y u,w ) ∈ { α, β } . We can set ϕ ( c u ) = α and extend ϕ to remaining vertices of the OR k -gadget. To show( e F ϕ : ( e F u , L ) → H , such that ϕ ( x u ) = u . Then by (D5.) it holds that ϕ ( y u,w ) = α for every w ∈ S \ { u } . Since at least one of interface vertices of the OR k -gadget must bemapped to β , we conclude that ϕ ( c u ) = β . Property ( e F x u . Moreover, the OR k -gadgetis a tree and every distinguisher has one common vertex (endvertex) with the OR k -gadget. Thus if weremove x u from e F u , then we obtain a tree (the OR k -gadget) and pairwise disjoint paths added to that treeby identifying single vertices, so e F u − { x u } is a tree (see Figure 10). Properties ( e F e F e F u . First we join k − paths by identifying their endvertices into onevertex x u and thus deg( x u ) = k − . Then we introduce an OR k -gadget whose maximum degree is at most and we identify its interface vertices, whose degrees are all , with the other endvertices of the paths,so the degree of each vertex, possibly except x u , is at most . Moreover, we do not modify the interfacevertex c u of the OR k -gadget, so its degree remains . Thus e F u is indeed a detector gadget. So it remainsto show that the girth of e F u is at least g , the vertices of degree at least are pairwise at distance at least g and at distance at least g from x u (note that we consider x u separately, since for | S | the degree of x u
34s less than ). First observe that the only vertices of degree at least might be x u and some vertices of the OR k -gadget, and in the OR k -gadget any two distinct vertices of degree at least are at distance at least g .Moreover, x u is at distance at least g from any vertex of the OR k -gadget since every distinguisher gadgethas length at least g . Therefore, vertices of degree at least in e F u are at distance at least g and at distanceat least g from x u . Finally, girth( e F u ) > g since every cycle in e F u contains x u , whose every adjacent edgebelongs to one of k − induced paths, each of length at least g .Now we are ready to show how to construct the assignment gadget, but first let us remind the definition. Definition 19 (Assignment gadget).
Let S be an incomparable set in H contained in the same biparti-tion class as α, β, γ and let v ∈ S . An assignment gadget is a graph A v with H -lists L and with specialvertices x, y , such that:(A1.) L ( x ) = S and L ( y ) = { α, β, γ } ,(A2.) for every u ∈ S and for every a ∈ { α, β } there exists a list homomorphism ϕ : ( A v , L ) → H suchthat ϕ ( x ) = u and ϕ ( y ) = a ,(A3.) there exists a list homomorphism ϕ : ( A v , L ) → H such that ϕ ( x ) = v and ϕ ( y ) = γ ,(A4.) for every list homomorphism ϕ : ( A v , L ) → H it holds that if ϕ ( y ) = γ , then ϕ ( x ) = v ,(A5.) A v − { x } is a tree,(A6.) deg( x ) = ( | S | − and deg( y ) = | S | − ,(A7.) the degree of every vertex of A v , possibly except x and y , is at most . Lemma 21 (Construction of the assignment gadget).
Let H be an undecomposable, connected, bipar-tite graph, whose complement is not a circular-arc graph. Let ( α, β, γ ) be the triple from Lemma 10. Let S be an incomparable set in H contained in the same bipartition class as α, β, γ , such that k := | S | > . Let g ∈ N . Then for every v ∈ S there exists an assignment gadget A v such that girth( A v ) > g and for anydistinct vertices a, b in A v of degree at least it holds that dist( a, b ) > g , dist( a, x ) > g , dist( a, y ) > g , and dist( x, y ) > g .Proof. The construction of the assignment gadget A v will be done in three steps. Step I.
The first step is the construction of a path P u with H -lists L , and endvertices c, y with L ( c ) = { α, β } , L ( y ) = { α, β, γ } , satisfying the following properties:(P1.) for every a ∈ { α, β } and for every b ∈ { α, β } there exists a list homomorphism ϕ : ( P u , L ) → H such that ϕ ( c ) = a and ϕ ( y ) = b ,(P2.) there exists a list homomorphism ϕ : ( P u , L ) → H such that ϕ ( c ) = α and ϕ ( y ) = γ ,(P3.) there is no list homomorphism ϕ : ( P u , L ) → H such that ϕ ( c ) = β and ϕ ( y ) = γ .(P4.) the length of P u is at least g . 35 α, β } { α, β, γ } { α, β } { α, β, γ } αβ αβγ αβαβγ βα αβγ P ( {X α , Y α , Z α } ) P ( {X γ , Y γ , Z γ } ) P ( {X γ , Y γ , Z γ } ) c y Figure 11: The path P u . Blue lines inside each gadget denote possible mappings of the input and the outputvertex of the gadget.First observe that we can assume that the last property holds. Otherwise, as in the previous constructionswe can append a path of appropriate length with consecutive lists { α, β } , { α ′ , β ′ } , . . . , { α, β } to the path P u by identifying one endvertex with c . Since αα ′ and ββ ′ induce a matching in H , adding such a pathpreserves the other desired properties of the path P u .So let us show how to construct P u , which satisfies properties (P1.), (P2.), and (P3.). First, consider thecase that H contains C as an induced subgraph with consecutive vertices w , . . . , w and α = w , β = w , γ = w . Then we set as P u a path of length with lists of consecutive vertices { w , w } , { w , w } , { w , w , w } .If H contains an induced C with consecutive vertices w , . . . , w and α = w , β = w , γ = w , then weset as P u a path of length with lists of consecutive vertices { w , w } , { w , w } , { w , w , w } , { w , w , w , w } , { w , w , w } .It is straightforward to verify that in both cases P u satisfies the required properties. If H does not contain C or C as an induced subgraph with α = w , β = w , and γ = w , then by Lemma 10, the followingwalks exist in H :• X α : α → β, Y α : α → γ, Z α : β → α , such that X α , Y α avoid Z α and Z α avoids X α , Y α ,• X γ : α → α, Y γ : α → β, Z γ : β → γ , such that X γ , Y γ avoid Z γ and Z γ avoids X γ , Y γ .As the path P u we take the composition of gadgets: P ( {X α , Y α , Z α } ) , P ( {X γ , Y γ , Z γ } ) , P ( {X γ , Y γ , Z γ } ) (see Figure 11). Step II.
The next step is the construction of a graph F u . For every u ∈ S \ { v } we call Lemma 35 for H, S, u, g to construct a detector gadget e F u . Then, for every u ∈ S \ { v } , we join the path P u with thegraph e F u by identifying vertices c and c u . Let us call the constructed graph F u and the vertex y from thepath P u let us call y u .Observe that the graph F u satisfies the following properties:(F1.) L ( x u ) = S and L ( y u ) = { α, β, γ } .(F2.) For every s ∈ S and every a ∈ { α, β } there exists a list homomorphism ϕ : ( F u , L ) → H such that ϕ ( x u ) = s and ϕ ( y u ) = a .(F3.) For every s ∈ S \ { u } there exists a list homomorphism ϕ : ( F u , L ) → H such that ϕ ( x u ) = s and ϕ ( y u ) = γ .(F4.) There is no list homomorphism ϕ : ( F u , L ) → H such that ϕ ( x u ) = u and ϕ ( y u ) = γ .(F5.) F u − { x u } is a tree. 36F6.) deg( x u ) = k − and deg( y u ) = 1 .(F7.) The degree of every vertex except x u in F u is at most .(F8.) Vertices of degree at least are at distance at least g .(F9.) girth( F u ) > g .(F10.) y u and x u are at distance at least g from each other and from any vertex of degree at least .Property (F1.) follows directly from the construction of F u . Property (F2.) follows from property ( e F e F u and property (P1.) of P u . Property (F3.) follows from properties ( e F ϕ : ( F u , L ) → H such that ϕ ( x u ) = u . By the property ( e F ϕ ( c u ) = β , which by the property (P3.) implies that ϕ ( y u ) = γ . Property (F5.) follows directly from ( e F e F u with a path by identyfing their single vertices. Properties (F6.) and (F7.) followfrom properties ( e F e F e F u by identifying an endvertexwith a vertex of degree . Properties (F8.) and (F9.) follow from the fact that by Lemma 35, every e F u hasgirth at least g and the vertices of degree at least are at distance at least g . Property (F10.) follows fromproperty (P4.) of P u and the fact that we constructed e F u such that x u is at distance at least g from anyvertex of degree at least . Step III.
Finally, we are able to construct an assignment gadget A v . For every u ∈ S \ { v } we introducethe gadget F u with special vertices x u , y u and we identify all x u ’s into a single vertex x and all y u ’s intoa single vertex y . That completes the construction of A v . It only remains to show that A v is indeed anassignment gadget with girth at least g and vertices of degree at least pairwise at distance at least g .Properties (A1.), (A2.), and (A3.) from the Definition 19 follow directly from, respectively, properties (F1.),(F2.) and (F3.) of F u . To show (A4.) consider a list homomorphism ϕ : ( A v , L ) → H such that ϕ ( y ) = γ .By the property (F4.), for every u ∈ S \ { v } , it holds that ϕ ( x ) = u , so the only possible mapping of x is ϕ ( x ) = v . Property (A5.) follows from the property (F5.) of F u and the fact that we joined F u ’sby identifying x u ’s into one vertex x and y u ’s into one vertex y . Properties (A6.) and (A7.) follow fromproperties (F6.) and (F7.) of F u since we joined k − graphs F u (one for every u ∈ S \ { v } ) by identifyingvertices x u , each of degree k − , into one vertex x of degree ( k − and identifying vertices y u , each ofdegree , into one vertex y of degree k − . Degrees of the other vertices did not change. Finally, let usshow that girth( A v ) > g , the vertices of degree at least are pairwise at distance at least g , at distanceat least g from x , y , and dist( x, y ) > g . By property (F9.) we have girth( F u ) > g and by property (F10.)the vertex y u is at distance at least g from x u . Thus by identifying x u ’s and y u ’s we obtain a graph withgirth at least g . Moreover, by the property (F8.), in every F u any two vertices of degree at least are atdistance at least g and by the property (F10.), we have dist( x u , y u ) > g and x u , y u are at distance at least g from any vertex of degree at least . Therefore, for any distinct a, b in A v of degree at least , it holdsthat dist( a, b ) > g , dist( a, x ) > g , and dist( a, y ) > g . That completes the proof.Now we will show the construction of a switching gadget. Let us remind its definition first. Definition 20 (Switching gadget). A switching gadget is a path T of even length with H -lists L , end-vertices p, r , called respectively the input and the output vertex, and one special internal vertex q , called a q -vertex , in the same bipartition class as p, r , such that:(S1.) L ( p ) = L ( r ) = { α, β } and L ( q ) = { α, β, γ } , 37 α, β } { α, β, γ } { α, β } { α, β } p q rβα αγβ βααγβ αβ αβ P ( {X β , Y β , Z β } ) P ( {X α , Y α , Z α } ) P ( {X ′ , Y ′ } ) Figure 12: The switching gadget T . Blue lines inside each gadget denote possible mappings of the input andthe output vertex of the gadget. The dashed line denotes a mapping that might exists but not necessarily.(S2.) for every a ∈ { α, β } there exists a list homomorphism ϕ : ( T, L ) → H , such that ϕ ( p ) = ϕ ( r ) = a and ϕ ( q ) = γ ,(S3.) there exists a list homomorphism ϕ : ( T, L ) → H , such that ϕ ( p ) = α , ϕ ( r ) = β , and ϕ ( q ) = γ ,(S4.) for every list homomorphism ϕ : ( T, L ) → H , if ϕ ( p ) = α and ϕ ( r ) = β , then ϕ ( q ) = γ .Finally, let us proceed to the proof. Lemma 22 (Construction of the switching gadget).
Let H be an undecomposable, connected, bipartitegraph, whose complement is not a circular-arc graph. Let ( α, β, γ ) be the triple from Lemma 10 and let g ∈ N .Then there exists a switching gadget T with special vertices p, q, r such that dist( p, q ) > g and dist( r, q ) > g .Proof. First, consider the case that there is an induced C with consecutive vertices w , . . . , w or aninduced C with consecutive vertices w , . . . , w in H such that α = w , β = w , and γ = w . Define T as a path of length 4 with consecutive vertices x , x , x , x , x and lists { w , w } , { w , w } , { w , w , w } , { w , w } , { w , w } . It is straightforward to verify that in both cases T with p := x , q := x , and r := x is a switching gadget.So now we assume that H does not contain an induced C or an induced C with α = w , β = w ,and γ = w . Then by Lemma 10 there exist the following walks:• X ′ : α → β, Y ′ : β → α such that Y ′ avoids X ′ ,• X α : α → β, Y α : α → γ and Z α : β → α , such that X α , Y α avoid Z α and Z α avoids X α , Y α ,• X β : α → α, Y β : α → γ and Z β : β → β , such that X β , Y β avoid Z β and Z β avoids X β , Y β .We set as T the composition of gadgets: P ( {X β , Y β , Z β ) , P ( {X α , Y α , Z α } ) , and P ( {X ′ , Y ′ } ) (seeFigure 12). Let p , . . . , p ℓ be consecutive vertices of T and let p := p , q := p s , r := p ℓ , where s is thenumber of vertices of X β . By the definition, L ( p ) = L ( r ) = { α, β } and L ( q ) = { α, β, γ } . Remainingproperties of the switching gadget are satisfied by the properties of used walks (see Figure 12).Finally, observe that we can always assume that in every switching gadget it holds that dist( p, q ) > g and dist( r, q ) > g . Otherwise, as in the proofs of Lemma 32 and Lemma 21 we can introduce paths ofappropriate even lengths with lists of consecutive vertices { α, β } , { α ′ , β ′ } , . . . { α, β } , where α ′ , β ′ aretaken from Lemma 10. We append each path to one of endvertices of the switching gadget. Since theedges αα ′ , ββ ′ induce a matching in H , adding those paths to the gadget preserves its properties. Thatcompletes the proof. 38 Algorithm for
LHom ( H ) parameterized by cutwidth In this section we will show how to generalize the algorithm for k - Coloring by Jansen and Nederlof [38],so that it works for all target graphs H . Actually, we will present a more general result, i.e., the algorithmthat solves the so-called Binary Constraint Satisfiaction Problem.Let us start with some definitions. In the Binary Constraint Satisfaction Problem (BCSP) we are givena triple I = ( V, D, C ) such that V is the set of variables, D is family of domains ( D v ) v ∈ V and C is theset of binary constraints. Each constraint c is a tuple ( u, v, S c ) , where u, v ∈ V are distinct variables and S c ⊆ D u × D v . We will identify the constraints ( u, v, S c ) and ( v, u, S ′ c ) , where S ′ c = { ( b, a ) | ( a, b ) ∈ S c } ,and treat them as the same constraint. Thus we can assume that for every pair u, v there is at most oneconstraint c ∈ C , which contains variables u, v . We have to decide whether there exists a mapping w that assigns a value from D v to every v ∈ V so that for each constraint c = ( u, v, S c ) ∈ C it holds that ( w ( u ) , w ( v )) ∈ S c . We will always assume that each domain D v is a finite subset of N + , and by D max wewill denote the size of a maximum set D v ∈ D .For an instance I = ( V, D, C ) of BCSP a primal graph P is a graph with vertex set V and there isan edge uv in P if there exists a constraint c ∈ C containing both variables u and v . We also define the instance graph G ( I ) as a graph with vertex set { ( v, d ) | v ∈ V, d ∈ D v } and there is an edge ( v, d v )( u, d u ) if there is a constraint c = ( u, v, S c ) with ( d u , d v ) ∈ S c . Observe that solving an instance I of BCSP isequivalent to finding a copy of the primal graph P in G ( I ) , such that each u ∈ V ( P ) = V is chosen fromthe set { ( u, d u ) | d u ∈ D u } .Note that an instance ( G, L ) of LHom ( H ) can be seen as an instance I = ( V, D, C ) of BCSP, wherethe set of variables V = V ( G ) , the domain D v = L ( v ) for every v ∈ V ( G ) and the set of constraints C isthe set of all triples ( u, v, S c ) such that uv ∈ E ( G ) and ( a, b ) ∈ S c if and only if a ∈ L ( u ) , b ∈ L ( v ) , and ab ∈ E ( H ) . The primal graph of this instance is exactly G .For an instance I = ( V, D, C ) of BCSP we define: K ( I ) := max uv ∈ E ( P ) max a ∈ D v |{ b ∈ D u | ∃ ( u,v,S c ) ∈ C ( b, a ) / ∈ S c }| . We aim to show the following theorem, recall that ω < . is the matrix multiplication exponent. Theorem 36.
Let I = ( V, D, C ) be an instance of BCSP and let P be its primal graph, given with the linearordering π = ( v , . . . , v n ) of V of width k . Then the instance I can be solved in time ω · K ( I ) · k · ( D max · n ) O (1) . Let I = ( V, D, C ) be an instance of BCSP. Let P be its primal graph and let K := K ( I ) . For every edge uv ∈ E ( P ) we define K mappings σ ( i ) uv : D v → D u ∪ { } , for i ∈ [ K ] , such that for every a ∈ D v it holdsthat (cid:0) σ ( i ) uv ( a ) , a (cid:1) / ∈ S c , where c = ( u, v, S c ) ∈ C .Observe that by the definition of K ( I ) it is possible that every forbidden pair of values of u, v appearsin at least one mapping. Moreover, if for any uv and a value a ∈ D v there is no forbidden value for u ,then we can always set σ ( i ) uv ( a ) := 0 . Note that for every uv ∈ E ( P ) , if we assign to u, v , respectively thevalues x u ∈ D u , y v ∈ D v , the constraint c = ( u, v, S c ) ∈ C is satisfied if and only if for every i ∈ [ K ] itholds that x u = σ ( i ) uv ( y v ) .Let us fix disjoint sets of variables X, Y ⊆ V . We define X to be the the set of all tuples x = ( x u ) u ∈ X ,where x u ∈ D u for every u ∈ X . Similarly, Y is the set of all tuples y = ( y v ) v ∈ Y , where y v ∈ D v forevery v ∈ Y . Let E ⊆ E ( P ) be the set of edges with one endpoint in X and the other in Y . We will treat39hese edges as directed from X to Y , i.e., whenever we write uv ∈ E , we mean that u ∈ X and v ∈ Y .Let us define a matrix M , whose rows are indexed by tuples x ∈ X , columns are indexed by tuples y ∈ Y ,and the values are: M [ x , y ] := Y uv ∈ E K Y i =1 (cid:0) x u − σ ( i ) uv ( y v ) (cid:1) = K Y i =1 Y uv ∈ E (cid:0) x u − σ ( i ) uv ( y v ) (cid:1) . (5)Observe that M [ x , y ] = 0 if and only if assigning the value x u to every u ∈ X and y v to every v ∈ Y satisfies every constraint that contains one variable from X and one variable from Y . We will call such apair of tuples ( x , y ) a good pair.Fix i ∈ [ K ] and let us analyze the factors that appear in equation (5). To simplify the notation, for avertex u and a set of edges Z , by deg Z ( u ) we denote the number of edges in Z that contain u . Y uv ∈ E ( x u − σ ( i ) uv ( y v )) = X Z ⊆ E (cid:16) Y u ∈ X ( x u ) deg Z ( u ) (cid:17) · (cid:16) Y uv ∈ E \ Z (cid:0) − σ ( i ) uv ( y v ) (cid:1)(cid:17) == X ( d u ∈{ ,..., deg E ( u ) } ) u ∈ X Y u ∈ X x d u u ! · X Z ⊆ E ∀ u ∈ X deg Z ( u )= d u Y uv ∈ E \ Z (cid:0) − σ ( i ) uv ( y v ) (cid:1)! . (6)To simplify the notation, by D we will denote the set of all tuples d = ( d u ) u ∈ X , such that for every u ∈ X it holds that d u ∈ { , . . . , deg E ( u ) } . For d ∈ D , x ∈ X , y ∈ Y , and i ∈ K , let us denote: f ( d , x ) := Y u ∈ X x d u u ,g ( i, d , y ) := X Z ⊆ E ∀ u ∈ X deg Z ( u )= d u Y uv ∈ E \ Z (cid:0) − σ ( i ) uv ( y v ) (cid:1) . (7)For d ∈ D K , where d = ( d (1) , . . . , d ( K ) ) , let us define the matrices L and R : L [ x , d ] := K Y i =1 f ( d ( i ) , x ) ,R [ d , y ] := K Y i =1 g ( i, d ( i ) , y ) . (8)The rows of L are indexed by all tuples x ∈ X and the columns are indexed by all tuples d ∈ D K , and therows of R are indexed by all tuples d ∈ D K and columns by all tuples y ∈ Y . Note that the number ofcolumns of L (and thus the number of rows of R ) is equal to (cid:12)(cid:12) D K (cid:12)(cid:12) = | D | K = (cid:16) Q u ∈ X (deg E ( u ) + 1) (cid:17) K .40y applying (6), (7), and (8) to (5), we can write M [ x , y ] as: M [ x , y ] = K Y i =1 X d ( i ) ∈ D f ( d ( i ) , x ) · g ( i, d ( i ) , y ) == X d (1) ∈ D (cid:0) f ( d (1) , x ) · g (1 , d (1) , y ) (cid:1)! · . . . · X d ( K ) ∈ D f ( d ( K ) , x ) · g ( K, d ( K ) , y ) ! == X d (1) ∈ D . . . X d ( K ) ∈ D K Y i =1 f ( d ( i ) , x ) · g ( i, d ( i ) , y ) ! == X d (1) ∈ D . . . X d ( K ) ∈ D K Y i =1 f ( d ( i ) , x ) ! · K Y i =1 g ( i, d ( i ) , y ) ! == X d ∈ D K K Y i =1 f ( d ( i ) , x ) ! · K Y i =1 g ( i, d ( i ) , y ) ! = X d ∈ D K L [ x , d ] · R [ d , y ] . (9)Observe that now M is expressed as the product of matrices L and R defined in (8).Now we extend the definition of representing sets, introduced by Jansen and Nederlof [38]. Definition 37.
Let S be a subset of X and let S ′ ⊆ S . We say that S ′ is an ( X - Y )-representative of S (or ( X - Y )-represents S ) if for every tuple y ∈ Y it holds that:There exists x ∈ S such that ( x , y ) is good if and only if there exists x ′ ∈ S ′ such that ( x ′ , y ) is good.In the following lemma we show that for a given S ⊆ X we can compute a small set S ′ ⊆ S , which( X - Y )-represents S . Lemma 38.
There is an algorithm that for a set S ⊆ X outputs in time Y u ∈ X (deg E ( u ) + 1) ! K · ( ω − · | S | · (cid:16) K · (cid:0) | X | + | Y | (cid:1)(cid:17) O (1) a set S ′ ⊆ S such that | S ′ | (cid:0) Q u ∈ X (deg E ( u ) + 1) (cid:1) K and S ′ is an ( X - Y )-representative of S .Proof. We compute L [ S, • ] , i.e., the submatrix of L consisting of the rows of the matrix L , whose indicesbelong to the set S . The submatrix L [ S, • ] can be computed in time | S | · | D | K · (cid:0) K · ( | X | + | Y | ) (cid:1) O (1) . Wefind a row basis of L [ S, • ] , what can be done in time O ( | S | · | D | K · ( ω − ) [7, 33]. Let S ′ = { x (1) , . . . , x ( ℓ ) } be the set of indices of the rows from the basis. Since the number of columns of L is | D | K , the rank of L is at most | D | K and hence | S ′ | | D | K = (cid:0) Q u ∈ X (deg E ( u ) + 1) (cid:1) K .So let us verify that S ′ is an ( X - Y )-representative of S . Let y ∈ Y and let x ∈ S . Since S ′ is the setof indices of the rows from the basis, we can express the row L [ x , • ] as a linear combination of the rowsindexed by elements of S ′ : L [ x , • ] = | S ′ | X i =1 λ i · L [ x ( i ) , • ] , λ , . . . , λ | S ′ | ∈ R . Thus M [ x , y ] can be expressed as follows: M [ x , y ] = | S ′ | X i =1 λ i · L [ x ( i ) , • ] ! · R [ • , y ] = | S ′ | X i =1 λ i · (cid:16) L [ x ( i ) , • ] · R [ • , y ] (cid:17) = | S ′ | X i =1 λ i · M [ x ( i ) , y ] . Now if ( x , y ) is good, then M [ x , y ] is non-zero and thus there must be x ( i ) ∈ S ′ such that M [ x ( i ) , y ] isnon-zero. That means that for every y ∈ Y , if there is x ∈ S such that ( x , y ) is good, then there exists x ( i ) ∈ S ′ , such that ( x ( i ) , y ) is good. Therefore, S ′ is an ( X - Y )-representative of S . Let I = ( V, D, C ) be an instance of BCSP and let P be its primal graph. Fix an ordering v , . . . , v n of thevariables in V . For every i ∈ [ n ] , let us define: V i := { v , . . . , v i } ,X i := { u ∈ V i | ∃ v ∈ V \ V i uv ∈ E ( P ) } ,Y i := { v ∈ V \ V i | ∃ u ∈ V i uv ∈ E ( P ) } . (10)We also set V , X , and Y as empty sets. Note that for every i ∈ [ n ] it holds that if j < i and v j ∈ X i ,then v j ∈ X i − , so X i ⊆ X i − ∪ { v i } . Similarly, Y i − ⊆ Y i ∪ { v i } .Let V ′ ⊆ V . We say that a tuple ( x u ) u ∈ V ′ is good (on V ′ ) if x u ∈ D u for every u ∈ V ′ and for everyconstraint ( u , u , S c ) ∈ C , where u , u ∈ V ′ , it holds that ( x u , x u ) ∈ S c . For V ′′ ⊆ V ′ and a tuple x = ( x u ) u ∈ V ′ , by x | V ′′ we denote the tuple x ′ = ( x ′ u ) u ∈ V ′′ such that x ′ u = x u for every u ∈ V ′′ . By X i wedenote the set of all tuples ( x u ) u ∈ X i such that x u ∈ D u for every u ∈ X i and by Y i we denote the set ofall tuples ( y v ) v ∈ Y i such that y v ∈ D v for every v ∈ Y i . For every i ∈ [ n ] ∪ { } , by T [ i ] we denote the set ofall tuples x = ( x u ) u ∈ X i , which can be extended to a good tuple on V i . In particular, T [0] = {∅} , where ∅ denotes the -tuple. In the following lemma we show how to construct for every i ∈ [ n ] a set T ′ [ i ] ⊆ T [ i ] ,which is an ( X i - Y i )-representative of T [ i ] . Lemma 39.
Let i ∈ [ n ] and let T ′ [ i − ⊆ T [ i − be an ( X i − - Y i − )-representative of T [ i − . We define: T ′ [ i ] := n x ∈ X i | ∃ x ′ ∈ T ′ [ i − ∃ a ∈ D vi (cid:16)(cid:0) x | X i − ∩ X i = x ′ | X i − ∩ X i (cid:1) ∧ (cid:0) ∀ ( v j ,v i ,S c ) ∈ C : v j ∈ X i − ( x ′ v j , a ) ∈ S c (cid:1) ∧ (cid:0) v i ∈ X i ⇒ x v i = a (cid:1)(cid:17)o . Then T ′ [ i ] ⊆ T [ i ] and it is an ( X i - Y i )-representative of T [ i ] . Moreover, T ′ [ i ] can be computed in time | T ′ [ i − | · | D v i | · n O (1) .Proof. First, let us show that T ′ [ i ] is a subset of T [ i ] . Let x = ( x u ) u ∈ X i be a tuple from T ′ [ i ] . Let x ′ =( x ′ u ) u ∈ X i − ∈ T ′ [ i − and a ∈ D v i be the values that justify that x ∈ T ′ [ i ] , i.e., they satisfy:a) x | X i − ∩ X i = x ′ | X i − ∩ X i ,b) for every constraint ( v j , v i , S c ) ∈ C with v j ∈ X i − , it holds that ( x ′ v j , a ) ∈ S c ,c) if v i ∈ X i , then x v i = a . 42ince T ′ [ i − ⊆ T [ i − , the tuple x ′ can be extended to a good tuple z ′ on V i − . Recall that X i \ { v i } ⊆ X i − . Moreover, for every v j ∈ X i − such that ( v j , v i , S c ) ∈ C it holds that ( x ′ v j , a ) ∈ S c . Thus x can beextended to a good tuple z = ( z u ) u ∈ V i , such that z u := z ′ u for every u ∈ V i − and z v i = a , and therefore x ∈ T [ i ] .Now it remains to show that T ′ [ i ] is an ( X i - Y i )-representative of T [ i ] . Let y = ( y v ) v ∈ Y i be a tuplein Y i and suppose that there exists a tuple x = ( x u ) u ∈ X i ∈ T [ i ] , such that the pair ( x , y ) is good. Let z = ( z u ) u ∈ V i be a good tuple that extends x on V i . Note that the pair ( z , y ) is good. Let us define y ′ = ( y ′ v ) v ∈ Y i − such that y ′ | Y i − ∩ Y i = y | Y i − ∩ Y i and if v i ∈ Y i − , then y ′ v i := z v i . Note that y ′ is well-defined, as Y i − ⊆ Y i ∪ { v i } . Define z ′ := z | X i − . Now observe that the pair ( z ′ , y ′ ) is good. Moreover, bythe definition, the tuple z ′ can be extended to a good tuple on V i − , so z ′ ∈ T [ i − .Recall that T ′ [ i − is an ( X i − - Y i − )-representative of T [ i − . Thus there exists a tuple x ′′ =( x ′′ u ) u ∈ X i − ∈ T ′ [ i − , such that the pair ( x ′′ , y ′ ) is good. Define x ′ = ( x ′ u ) u ∈ X i such that x ′ | X i − ∩ X i := x ′′ | X i − ∩ X i and if v i ∈ X i , then we set x ′ v i := z v i . By the definition of T ′ [ i ] it holds that x ′ ∈ T ′ [ i ] .Moreover, the pair ( x ′ , y ) is good. Therefore, T ′ [ i ] is an ( X i - Y i )-representative of T [ i ] , which completesthe proof.Now we are ready to prove Theorem 36. Proof of Theorem 36.
Let I = ( V, D, C ) be an instance of BCSP, let P be its primal graph and let K := K ( I ) . Let π = ( v , . . . , v n ) be a linear layout of vertices of P of width k . For every i ∈ [ n ] , by E i wedenote the set of edges in P with one endpoint in X i and the other in Y i .For every i ∈ [ n ] , we will construct a set T ′ [ i ] that is an ( X i - Y i )-representative of T [ i ] . Note that thesets X n and Y n are empty. Thus T [ n ] , which is the set of all tuples ( x u ) u ∈ X n that can be extended to agood tuple ( x u ) u ∈ V n , is either empty or contains a -tuple ∅ . The latter one holds if and only if there existsan assignment of values to all variables in V that satisfies every constraint in C . Therefore, the instance ( V, D, C ) is a yes-instance of BCSP if and only if T [ n ] is non-empty. Moreover, the set T [ n ] is non-emptyif and only if its representing set T ′ [ n ] is non-empty. So in order to solve the instance ( V, D, C ) , it issufficent to compute a set T ′ [ n ] that is an ( X n - Y n )-representative of T [ n ] .Recall that T [0] = {∅} and thus we set T ′ [0] := {∅} . For every i ∈ [ n ] we proceed as follows. Sincewe have already computed a set T ′ [ i − , which is an ( X i − - Y i − )-representative of T [ i − , we cancall Lemma 39 to construct a set T ′ [ i ] , that is an ( X i - Y i )-representative of T [ i ] . Then we call Lemma 38for S = T ′ [ i ] to obtain another set, T ′′ [ i ] , that is an ( X i - Y i )-representative of T ′ [ i ] and its size is at most (cid:0) Q u ∈ X i (deg E i ( u )+1) (cid:1) K . Since the relation of representing is transitive, T ′′ [ i ] is an ( X i - Y i )-representativeof T [ i ] . We replace T ′ [ i ] with T ′′ [ i ] and proceed to the next value of i .Let Λ := max i ∈ [ n ] (cid:0) Q u ∈ X i (deg E i ( u ) + 1) (cid:1) . Observe that if the width of π = ( v , . . . , v n ) is k , thenfor every i ∈ [ n ] , it holds that Q u ∈ X i (deg E i ( u ) + 1) k by the AM-GM inequality. Therefore, Λ k .Computing K ( I ) can be done in time ( D max · n ) O (1) . Every T ′ [ i ] from Lemma 39 can be computed intime | T ′′ [ i − | · | D v i | · n O (1) . Since every set T ′′ [ i ] was obtained by Lemma 38, | T ′′ [ i − | Λ K and theset T ′ [ i ] from Lemma 39 can be computed in time Λ K · D max · n O (1) . The time of applying Lemma 38 toevery T ′ [ i ] is at most Λ K · ( ω − · Λ K · D max · ( K · n ) O (1) = Λ K · ω · ( D max · n ) O (1) . So the total time is atmost Λ K · ω · ( D max · n ) O (1) k · K · ω · ( D max · n ) O (1) . That completes the proof. Let us start with a formal definition of the DP-coloring problem. A cover a of graph G is a pair H = ( L, H ) ,where H is a graph and L : V ( G ) → V ( H ) is a function, satisfying the following:431) the family { L ( v ) | v ∈ V ( G ) } is a partition of V ( H ) ,(2) for every v ∈ V ( G ) , the graph H [ L ( v )] is complete,(3) for every uv ∈ E ( G ) , the set of edges joining the sets L ( u ) and L ( v ) in H is a matching,(4) for every uv / ∈ E ( G ) , there are no edges in H with one endpoint in L ( u ) and the other in L ( v ) .We are interested in determining the existence of an H -coloring of G , which is an independent set in H ofsize | V ( G ) | . Note that this independent set corresponds to choosing for each v ∈ V ( G ) one vertex (color)in L ( v ) , so that no two adjacent vertices are mapped to the neighbors in H .Let us show that this problem is a special case of BCSP. Indeed, for an instance ( G, H = ( L, H )) ofDP-coloring, let us define an instance I = ( V, D, C ) as follows. Let V = V ( G ) . For each v ∈ V , we set D v := L ( v ) . For every uv ∈ E ( G ) , we add a constraint ( u, v, S c ) , where S c = { ( a, b ) ∈ L ( u ) × L ( v ) | ab / ∈ E ( H ) } . It is straightforward to verify that G admits an H -coloring if and only if I is a yes-instance of BCSP.Furthermore, the primal graph P of the instance I is exactly the graph G , and K ( I ) = 1 , by condition (3)in the definition of a cover. Thus Theorem 36 immediately yields the following corollary. Corollary 40.
Let G be a graph given with a linear ordering of vertices of width k . Every instance ( G, H =( L, H )) of DP-coloring can be solved in time ω · k · ( | V ( H ) | · | V ( G ) | ) O (1) . LHom ( H ) Recall that every instance ( G, L ) of LHom ( H ) can be seen as an instance I = ( V, D, C ) of BCSP, where V = V ( G ) , for each v ∈ V ( G ) we have D v = L ( v ) , and C consists of all tuples ( u, v, S c ) , where uv ∈ E ( G ) , and S c = { ( a, b ) ∈ L ( u ) × L ( v ) | ab ∈ E ( H ) } . The primal graph of I is precisely G .Our algorithm is based on the following result of Okrasa et al. [45]. Theorem 41 (Okrasa et al. [45]).
Let H be a graph. In time | V ( H ) | O (1) we can construct a family H of O ( | V ( H ) | ) connected graphs such that:(1) H is a bi-arc graph if and only if every H ′ ∈ H is a bi-arc graph,(2) if H is bipartite, then each H ′ ∈ H is an induced subgraph of H , and is either the complement of acircular-arc graphs or is undecomposable,(3) otherwise, for each H ′ ∈ H , the graph H ′∗ is an induced subgraph of H ∗ and at least one of the followingholds:(a) H ′ is a bi-arc graph, or(b) the vertex set of H ′ can be partitioned into two sets P, B , such that P induces a reflexive clique and B is independent , or(c) ( H ′ ) ∗ is undecomposable,(4) for every instance ( G, L ) of LHom ( H ) with n vertices, the following implication holds: The statement of this condition in [45] is more involved, but the simpler version we present here is sufficient for our appli-cation. f there exists a non-decreasing, convex function f H : N → R , such that for every H ′ ∈ H , for everyinduced subgraph G ′ of G , and for every H ′ -lists L ′ on G ′ , we can decide whether ( G ′ , L ′ ) → H ′ in time f H ( | V ( G ′ ) | ) , then we can solve the instance ( G, L ) in time O (cid:16) | V ( H ) | f H ( n ) + n · | V ( H ) | (cid:17) . The graphs in the family H are called factors of H . So in order to solve the LHom ( H ) problem, it issufficient to give an algorithm for LHom ( H ′ ) for every factor H ′ of H .Before we proceed to the proof, let us discuss first a special case when H is bipartite. Then we will liftthis result to all target graphs. Bipartite target graphs.
Let H be bipartite and let H be the family of its factors. Let ( G, L ) be aninstance of LHom ( H ), where G is given with a linear layout of width k . Consider H ′ ∈ H . If H ′ is thecomplement of a circular-arc graph, then we can solve the LHom ( H ′ ) problem in polynomial time. Other-wise, by Theorem 41 (2), we know that H ′ is a connected induced subgraph of H , and it is undecomposable.Consider an instance ( G ′ , L ′ ) of LHom ( H ′ ), where G ′ is an induced subgraph of G . Clearly, a linearlayout of G with width k induces a linear layout of G ′ with width at most k . Let I be the instance of BCSPcorresponding to ( G ′ , L ′ ) . By Theorem 36 we can solve it in time K ( I ) · ω · k · ( | V ( G ′ ) | · | V ( H ′ ) | ) O (1) .Let us estimate the value of K ( I ) . Recall that without loss of generality we can assume that ( G ′ , L ′ ) isconsistent. Furthermore, for every edge uv of G ′ and every a ∈ L ′ ( u ) , we may assume that a is adjacentin H ′ to some vertex in L ′ ( v ) , as otherwise we can safely remove a from L ′ ( u ) . Thus K ( I ) is upper-bounded by γ ( H ′ ) , which is defined as the maximum over pairs of incomparable sets S , S ⊆ V ( H ′ ) ,each contained in a different bipartition class of H ′ , such that for every x ∈ S there is y ∈ S ∩ N H ′ ( x ) ,and for every y ∈ S there is x ∈ S ∩ N H ′ ( y ) , of the value max x ∈ S |{ y | xy / ∈ E ( H ′ ) }| . So we conclude that every instance ( G ′ , L ′ ) of LHom ( H ′ ), where G ′ is an induced subgraph of G , canbe solved in time γ ( H ′ ) · ω · k · ( | V ( G ′ ) | · | V ( H ′ ) | ) O (1) .Now let us define a new parameter γ ∗ ( H ) . If the complement of H is not a circular-arc graph, wedefine γ ∗ ( H ) as the maximum value of γ ( H ′ ) over all connected undecomposable induced subgraphs H ′ of H , which are not the complement of a circular-arc graph. If H is the complement of a circular-arc graph,we define γ ∗ ( H ) = γ ( H ) := 1 .Now observe that for every H ′ ∈ H , every instance ( G, L ′ ) of LHom ( H ′ ), where G ′ is an inducedsubgraph of G , can be solved in time γ ∗ ( H ) · ω · k · ( | V ( G ′ ) | · | V ( H ′ ) | ) O (1) . As this function is convex andnon-decreasing, Theorem 41 yields the following. Corollary 42.
Let H be a bipartite graph and let ( G, L ) be an instance of LHom ( H ) , where G is given witha linear layout of width k . Then ( G, L ) can be solved in time γ ∗ ( H ) · ω · k · ( | V ( G ) | · | V ( H ) | ) O (1) . General target graphs.
Let H be a non-bi-arc graph. As usual, we extend the definition of γ ∗ to allgraphs by setting γ ∗ ( H ) := γ ∗ ( H ∗ ) .Let H be the family of factors of H and let ( G, L ) be an instance of LHom ( H ), where G is given witha linear layout with width k . Again, we need to solve LHom ( H ′ ) for every H ′ ∈ H on instances ( G ′ , L ′ ) ,where G ′ is an induced subgraph of G . Recall that the linear layout for G with width k induces a linearlayout σ for G ′ with width at most k . Let us discuss the complexity of solving ( G ′ , L ′ ) . Consider threecases corresponding to the options in Theorem 41 (3).45a) If H ′ ∈ H is a bi-arc graph, then every instance of LHom ( H ′ ) can be solved in polynomial time.(b) If the vertex set of H ′ can be partitioned into a reflexive clique P and an independent set B , we followthe argument by Okrasa et al. [46]. Let e H be the bipartite graph obtained from H ′ by removing alledges with both endpoints in P (including loops). We note that e H is an induced subgraph of ( H ′ ) ∗ ,and thus also an induced subgraph of H ∗ , so γ ∗ ( e H ) γ ∗ ( H ) .Observe that for every p ∈ P and b ∈ B it holds that N H ′ ( b ) ⊆ N H ′ ( p ) . Since we may assumethat each list is a non-empty incomparable set, we can partition the vertex set of G ′ into two subsets: P ′ := { v | L ′ ( v ) ∩ P = ∅} and Q ′ := { v | L ′ ( v ) ∩ Q = ∅} . Observe that if Q ′ is not independent, thenwe can immediately report that ( G ′ , L ′ ) is a no-instance. So let G ′′ be the graph obtained from G ′ byremoving all edges with both endpoints in P ′ . Clearly G ′′ is bipartite, and, as observed by Okrasa etal. [46], ( G ′ , L ′ ) is a yes-instance of LHom ( H ′ ) if and only if ( G ′′ , L ′ ) is a yes-instance of LHom ( e H ) .Finally, as that G ′′ was obtained from G ′ by deleting edges, σ is a linear layout for G ′′ width width atmost k . So applying Corollary 42 to ( G ′′ , L ′ ) , we conclude that the instance ( G ′ , L ′ ) can be solved intime γ ∗ ( e H ) · ω · k · ( | V ( G ′′ ) | · | V ( e H ) | ) O (1) γ ∗ ( H ) · ω · k · ( | V ( G ′ ) | · | V ( H ′ ) | ) O (1) . (c) Finally, suppose that H ′ is a connected non-bi-arc graph and ( H ′ ) ∗ is an undecomposable inducedsubgraph of H ∗ . Observe that if H ′ is bipartite, then we are done by Corollary 42. So let us assumeotherwise, so in particular H ′∗ is connected. Then γ ∗ ( H ′ ) = γ ∗ (( H ′ ) ∗ ) = γ (( H ′ ) ∗ ) γ ∗ ( H ∗ ) = γ ∗ ( H ) .Consider an instance ( G ′ , L ′ ) of LHom ( H ′ ) . Following Feder et al. [22], we define an associated instance ( G ′∗ , L ′∗ ) of LHom ( H ′∗ ) , so that for v ∈ V ( G ′ ) and x ∈ V ( H ′ ) it holds that x ∈ L ′ ( v ) if and only if x ′ ∈ L ′∗ ( v ′ ) if and only if x ′′ ∈ L ′∗ ( v ′′ ) . A list homomorphism ϕ : ( G ′∗ , L ′∗ ) → H ′∗ is clean if forevery v ∈ V ( G ′ ) and x ∈ V ( H ′ ) , it holds that ϕ ( v ′ ) = x ′ if and only if ϕ ( v ′′ ) = x ′′ . As observed byOkrasa et al. [46] (although the original idea comes from Feder et al. [22]), it holds that ( G ′ , L ′ ) → H ′ if and only if ( G ′∗ , L ′∗ ) admits a clean homomorphism to H ∗ .So let us solve the instance ( G ′ , L ′ ) of LHom ( H ′ ) by looking for a clean homomorphism from ( G ′∗ , L ′∗ ) to H ′∗ . We need to adapt the algorithm given in Section 6.2. As the adaptation is rather straightforwardand technical, we will just point out the differences to the version presented above.First, observe that if G ′ is given with a linear layout σ = ( v , . . . , v | G ′ | ) of width at most k , then inpolynomial time we can construct the linear layout σ ∗ = ( v ′ , v ′′ , . . . , v ′| G ′ | , v ′′| G ′ | ) of G ′∗ with widthat most k . We compute the sets T ′ [ i ] similarly as in the proof of Theorem 36, but this time by V i wedenote the set { v ′ , v ′′ , . . . , v ′ i , v ′′ i } , i.e., we either include both v ′ i , v ′′ i , or none of them. The definitionsof the other sets, i.e., X i , Y i , T [ i ] , and T ′ [ i ] , are updated in an analogous way.Moreover, as we are looking for clean homomorphisms, we will only consider the colorings of tuples x and y , such that vertices v ′ j , v ′′ j are mapped, respectively, to x ′ and x ′′ for some x ∈ V ( H ) . Thus thesize of the set obtained by Lemma 39 does not increase. Finally, when we apply Lemma 38 to T ′ [ i ] , andthus to some set of colorings of X i , it is enough to construct a matrix M [ x , y ] , so that x is a coloringof vertices in X i ∩ { v ′ | v ∈ V ( G ′ } and y is a coloring of vertices in Y i ∩ { v ′′ | v ∈ V ( G ′ ) } , as theyimply the colorings of all vertices in X i and Y i . Therefore, although the upper bound for the widthof the linear layout σ ∗ is k , we only consider half of the edges crossing a cut. We conclude that thetime of finding a clean homomorphism from ( G ′∗ , L ′∗ ) to H ′∗ , and thus solving the instance ( G ′ , L ′ ) of LHom ( H ′ ) , is at most k · γ ( H ′∗ ) · ω · ( | V ( H ′∗ ) | · | V ( G ′∗ ) | ) O (1) k · γ ∗ ( H ) · ω · ( | V ( H ′ ) | · | V ( G ′ ) | ) O (1) .46imilarly to the case that H is bipartite, by Theorem 41 we obtain the following corollary. Corollary 7.
Let H be a graph with possible loops and let ( G, L ) be an instance of LHom ( H ) , where G isgiven with a linear layout of width k . Then ( G, L ) can be solved in time γ ∗ ( H ) · ω · k · ( | V ( G ) | · | V ( H ) | ) O (1) . Conclusion
In this section we will compare parameters mim ∗ ( H ) , i ∗ ( H ) , and γ ∗ ( H ) . We will only consider con-nected, bipartite, undecomposable graphs H , whose complement is not a circular-arc graph, and thus onlythe parameters mim ( H ) , i ( H ) , γ ( H ) , as any inequalities for i ( H ) , mim ( H ) , and γ ( H ) imply the sameinequalities for i ∗ , mim ∗ , and γ ∗ for general target graphs.First let us show that mim ( H ) − γ ( H ) i ( H ) − . To see the first inequality, consider astrongly incomparable set S ⊆ V ( H ) , contained in one bipartition class, such that | S | = mim ( H ) . Let S ⊆ V ( H ) be a set of private neighbors of S , i.e., the set S ∪ S induces a matching in H . Let s ∈ S . Thenumber of vertices in S non-adjacent to s is | S | − mim ( H ) − . Since S , S are both incomparablesets, each contained in different bipartition class of H , for every s ∈ S it holds that N ( s ) ∩ S = ∅ ,and for every s ∈ S it holds that N ( s ) ∩ S = ∅ , we conclude that γ ( H ) > mim ( H ) − . The secondinequality follows from the fact that the sets S , S from the definition of γ ( H ) are incomparable and forevery s ∈ S (resp. S ) at least one vertex in S (resp. S ) is adjacent to s .Now let us show that the differences between mim ( H ) and γ ( H ) , and between γ ( H ) and i ( H ) can bearbitrarily large. First, consider H which is a biclique K r,r with a perfect matching removed. Note that if r > , then H contains an induced C and thus H is not a complement of a circular-arc graph. Moreover, H is undecomposable and every bipartition class of H is an incomparable set. Therefore i ( H ) = r . On theother hand, for every v ∈ V ( H ) there is only one vertex in the other bipartition class that is non-adjacentto v , and hence γ ( H ) = 1 .To show that γ ( H ) might be arbitrarily larger than mim ( H ) , we start with a biclique K r +1 ,r +1 andagain we remove from the graph a perfect matching. Let u , u be non-adjacent vertices from differentbipartition classes. We add to the graph two new vertices, v , v , and we add edges u v , v v , and v u .That completes the construction of H . It can be verified that H is undecomposable and if r + 1 > , then H is not a complement of a circular-arc graph. Moreover, both bipartition classes of H are incomparablesets, and the number of vertices in the other bipartition class than v that are non-adjacent to v is r . Thus γ ( H ) > r . The size of any induced matching in H is at most three, since there could be at most two edgesfrom the biclique and at most one of three added edges u v , v v , v u .Finally, let us point out that although we have the inequality γ ( H ) i ( H ) − and the differencebetween γ ( H ) and i ( H ) can be arbitrarily large, for some H it holds that i ( H ) ω · γ ( H ) . Indeed, in thesecond example of H we have i ( H ) = r + 2 and γ ( H ) > r , so for r > , it holds that i ( H ) < ω · γ ( H ) .Therefore, our algorithm solving LHom ( H ) in time ω · γ ( H ) · ctw( G ) · n O (1) and the algorithm from [46] thatsolves LHom ( H ) in time i ( H ) tw( G ) · n O (1) i ( H ) ctw( G ) · n O (1) are incomparable. As a main problem of the paper, we were investigating the fine-grained complexity of the
LHom ( H ) prob-lem, parameterized by the cutwidth of the instance graph. We provided a lower bound and two upperbounds, incomparable to each other. A natural open question is to close the gap between lower and upperbounds, and provide a full complexity classification.As a concrete problem, we believe that a good starting point is to understand the complexity of LHom ( C k ) , where k > . Recall that we have a lower bound ( mim ∗ ( C k )) ctw( G ) · | V ( G ) | O (1) and anupper bound ( i ∗ ( C k )) ctw( G ) · | V ( G ) | O (1) (the bound from Corollary 7 is worse in this case). The value of mim ∗ ( C k ) is ⌊ k/ ⌋ if k is even, and ⌊ k/ ⌋ is k is odd. On the other hand, i ∗ ( C k ) is k/ is k is even, and48 if k is odd. Where does the truth lie? To be even more specific, what is the complexity of LHom ( C ) ?Another research direction that we find exciting is to study the complexity of Hom ( H ) and LHom ( H ),depending on different parameters of the instance graph. In particular, Lampis [40] showed that k - Coloring on a graph G can be solved in time (2 k − cw ( G ) ·| V ( G ) | O (1) , where cw ( G ) is the clique-width of G . Further-more, an algorithm with a running time (2 k − − ε ) cw ( G ) · | V ( G ) | O (1) , for any ε > , would contradict theSETH. We believe it is exciting to investigate how these results generalize to non-complete target graphs H . 49 eferences [1] Noga Alon and Joel H. Spencer. The Probabilistic Method, Third Edition . Wiley-Interscience series indiscrete mathematics and optimization. Wiley, 2008.[2] Stefan Arnborg and Andrzej Proskurowski. Linear time algorithms for NP-hard problems restrictedto partial k -trees. Discret. Appl. Math. , 23(1):11–24, 1989.[3] Anton Bernshteyn, Alexandr V. Kostochka, and Xuding Zhu. DP-colorings of graphs with high chro-matic number.
Eur. J. Comb. , 65:122–129, 2017.[4] Andreas Björklund, Thore Husfeldt, and Mikko Koivisto. Set partitioning via inclusion-exclusion.
SIAM J. Comput. , 39(2):546–563, 2009.[5] H. L. Bodlaender. Classes of graphs with bounded tree-width.
Bulletin of EATCS , pages 116–128, 1988.[6] Hans L. Bodlaender and Arie M. C. A. Koster. Combinatorial optimization on graphs of boundedtreewidth.
Comput. J. , 51(3):255–269, May 2008.[7] James R. Bunch and John E. Hopcroft. Triangular factorization and inversion by fast matrix multipli-cation.
Mathematics of Computation , 28(125):231–236, 1974.[8] Hubie Chen, Radu Curticapean, and Holger Dell. The exponential-time complexity of counting (quan-tum) graph homomorphisms. In Ignasi Sau and Dimitrios M. Thilikos, editors,
Graph-Theoretic Con-cepts in Computer Science - 45th International Workshop, WG 2019, Vall de Núria, Spain, June 19-21,2019, Revised Papers , volume 11789 of
Lecture Notes in Computer Science , pages 364–378. Springer,2019.[9] Rajesh Chitnis, László Egri, and Dániel Marx. List H -coloring a graph by removing few vertices. Algorithmica , 78(1):110–146, 2017.[10] Maria Chudnovsky, Shenwei Huang, Paweł Rzążewski, Sophie Spirkl, and Mingxian Zhong. Complex-ity of C k -coloring in hereditary classes of graphs. In Michael A. Bender, Ola Svensson, and GrzegorzHerman, editors, , volume 144 of LIPIcs , pages 31:1–31:15. Schloss Dagstuhl - Leibniz-Zentrumfür Informatik, 2019.[11] Fan R. K. Chung and Paul D. Seymour. Graphs with small bandwidth and cutwidth.
Discret. Math. ,75(1-3):113–119, 1989.[12] Don Coppersmith and Shmuel Winograd. Matrix multiplication via arithmetic progressions.
J. Symb.Comput. , 9(3):251–280, 1990.[13] Marek Cygan, Fedor V. Fomin, Alexander Golovnev, Alexander S. Kulikov, Ivan Mihajlin, Jakub Pa-chocki, and Arkadiusz Socala. Tight lower bounds on graph embedding problems.
J. ACM , 64(3):18:1–18:22, 2017.[14] Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk,Michał Pilipczuk, and Saket Saurabh.
Parameterized Algorithms . Springer, 2015.5015] Víctor Dalmau, László Egri, Pavol Hell, Benoît Larose, and Arash Rafiey. Descriptive complexity oflist H -coloring problems in logspace: A refined dichotomy. In , pages 487–498. IEEE ComputerSociety, 2015.[16] Zdenek Dvořák and Luke Postle. Correspondence coloring and its application to list-coloring planargraphs without cycles of lengths 4 to 8. J. Comb. Theory, Ser. B , 129:38–54, 2018.[17] László Egri, Pavol Hell, Benoit Larose, and Arash Rafiey. Space complexity of list H -colouring: a di-chotomy. In Chandra Chekuri, editor, Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposiumon Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014 , pages 349–365. SIAM,2014.[18] László Egri, Andrei A. Krokhin, Benoît Larose, and Pascal Tesson. The complexity of the list homo-morphism problem for graphs.
Theory Comput. Syst. , 51(2):143–178, 2012.[19] László Egri, Dániel Marx, and Paweł Rzążewski. Finding list homomorphisms from bounded-treewidth graphs to reflexive graphs: a complete complexity characterization. In Rolf Niedermeierand Brigitte Vallée, editors, , volume 96 of
LIPIcs , pages 27:1–27:15. Schloss Dagstuhl -Leibniz-Zentrum fuer Informatik, 2018.[20] Tomás Feder and Pavol Hell. List homomorphisms to reflexive graphs.
Journal of CombinatorialTheory, Series B , 72(2):236 – 250, 1998.[21] Tomás Feder, Pavol Hell, and Jing Huang. List homomorphisms and circular arc graphs.
Combinator-ica , 19(4):487–505, 1999.[22] Tomás Feder, Pavol Hell, and Jing Huang. Bi-arc graphs and the complexity of list homomorphisms.
Journal of Graph Theory , 42(1):61–80, 2003.[23] Jirí Fiala and Jan Kratochvíl. Locally injective graph homomorphism: Lists guarantee dichotomy. InFedor V. Fomin, editor,
Graph-Theoretic Concepts in Computer Science, 32nd International Workshop,WG 2006, Bergen, Norway, June 22-24, 2006, Revised Papers , volume 4271 of
Lecture Notes in ComputerScience , pages 15–26. Springer, 2006.[24] Fedor V. Fomin, Pinar Heggernes, and Dieter Kratsch. Exact algorithms for graph homomorphisms.
Theory Comput. Syst. , 41(2):381–393, 2007.[25] M.R. Garey, D.S. Johnson, and L. Stockmeyer. Some simplified NP-complete graph problems.
Theo-retical Computer Science , 1(3):237 – 267, 1976.[26] Petr A. Golovach, Daniel Lokshtanov, Saket Saurabh, and Meirav Zehavi. Cliquewidth III: the oddcase of graph coloring parameterized by cliquewidth. In Artur Czumaj, editor,
Proceedings of theTwenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA,USA, January 7-10, 2018 , pages 262–273. SIAM, 2018.[27] Pavol Hell and Jaroslav Nešetřil. The core of a graph.
Discrete Mathematics , 109(1-3):117–126, 1992.[28] Pavol Hell and Jaroslav Nešetřil.
Graphs and homomorphisms . Oxford University Press, 2004.5129] Pavol Hell and Jaroslav Nešetřil. On the complexity of H -coloring. J. Comb. Theory, Ser. B , 48(1):92–110, 1990.[30] Pavol Hell and Arash Rafiey. The dichotomy of list homomorphisms for digraphs. In Dana Randall,editor,
Proceedings of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms, SODA2011, San Francisco, California, USA, January 23-25, 2011 , pages 1703–1713. SIAM, 2011.[31] Ian Holyer. The NP-completeness of edge-coloring.
SIAM J. Comput. , 10(4):718–720, 1981.[32] Shenwei Huang. Improved complexity results on k -coloring P t -free graphs. Eur. J. Comb. , 51:336–346,2016.[33] Oscar H. Ibarra, Shlomo Moran, and Roger Hui. A generalization of the fast LUP matrix decompositionalgorithm and applications.
J. Algorithms , 3(1):45–56, 1982.[34] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k -SAT. Journal of Computer andSystem Sciences , 62(2):367 – 375, 2001.[35] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponen-tial complexity?
J. Comput. Syst. Sci. , 63(4):512–530, 2001.[36] Lars Jaffke and Bart M. P. Jansen. Fine-grained parameterized complexity analysis of graph coloringproblems. In Dimitris Fotakis, Aris Pagourtzis, and Vangelis Th. Paschos, editors,
Algorithms andComplexity - 10th International Conference, CIAC 2017, Athens, Greece, May 24-26, 2017, Proceedings ,volume 10236 of
Lecture Notes in Computer Science , pages 345–356, 2017.[37] Bart M. P. Jansen. Personal communication.[38] Bart M. P. Jansen and Jesper Nederlof. Computing the chromatic number using graph decompositionsvia matrix rank.
Theor. Comput. Sci. , 795:520–539, 2019.[39] Sanjeev Khanna, Nathan Linial, and Shmuel Safra. On the hardness of approximating the chromaticnumber.
Combinatorica , 20(3):393–415, 2000.[40] Michael Lampis. Finer tight bounds for coloring on clique-width. In Ioannis Chatzigiannakis, ChristosKaklamanis, Dániel Marx, and Donald Sannella, editors, , volume 107 of
LIPIcs , pages 86:1–86:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018.[41] Benoît Larose. Families of strongly projective graphs.
Discuss. Math. Graph Theory , 22(2):271–292,2002.[42] Benoit Larose and Claude Tardif. Strongly rigid graphs and projectivity.
Multiple-Valued Logic , 7:339–361, 2001.[43] Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Known algorithms on graphs of boundedtreewidth are probably optimal.
ACM Trans. Algorithms , 14(2):13:1–13:30, 2018.[44] Tomasz Łuczak and Jaroslav Nešetřil. Note on projective graphs.
Journal of Graph Theory , 47(2):81–86,2004. 5245] Karolina Okrasa, Marta Piecyk, and Paweł Rząażewski. Full complexity classification of the list ho-momorphism problem for bounded-treewidth graphs.
CoRR , abs/2006.11155, 2020.[46] Karolina Okrasa, Marta Piecyk, and Paweł Rzążewski. Full complexity classification of the list homo-morphism problem for bounded-treewidth graphs. In Fabrizio Grandoni, Grzegorz Herman, and PeterSanders, editors, , volume 173 of
LIPIcs , pages 74:1–74:24. Schloss Dagstuhl - Leibniz-Zentrumfür Informatik, 2020.[47] Karolina Okrasa and Paweł Rzążewski. Fine-grained complexity of graph homomorphism problem forbounded-treewidth graphs. In
Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms ,pages 1578–1590, 2020.[48] Neil Robertson and Paul D. Seymour. Graph minors. II. algorithmic aspects of tree-width.
J. Algo-rithms , 7(3):309–322, 1986.[49] Paweł Rzążewski. Exact algorithm for graph homomorphism and locally injective graph homomor-phism.
Inf. Process. Lett. , 114(7):387–391, 2014.[50] Magnus Wahlström. New plain-exponential time classes for graph homomorphism.
Theory Comput.Syst. , 49(2):273–282, 2011.[51] Virginia Vassilevska Williams. Multiplying matrices faster than Coppersmith-Winograd. In Howard J.Karloff and Toniann Pitassi, editors,