Full complexity classification of the list homomorphism problem for bounded-treewidth graphs
aa r X i v : . [ c s . CC ] J un Full complexity classification of the list homomorphismproblem for bounded-treewidth graphs ∗Karolina Okrasa † Marta Piecyk ‡ Paweł Rzążewski § June 22, 2020
Abstract
A homomorphism from a graph G to a graph H is an edge-preserving mapping from V ( G ) to V ( H ) . Let H be a fixed graph with possible loops. In the list homomorphism problem, denoted by LHom ( H ), we are given a graph G , whose every vertex v is assigned with a list L ( v ) of vertices of H .We ask whether there exists a homomorphism h from G to H , which respects lists L , i.e., for every v ∈ V ( G ) it holds that h ( v ) ∈ L ( v ) .The complexity dichotomy for LHom ( H ) was proven by Feder, Hell, and Huang [JGT 2003]. Theauthors showed that the problem is polynomial-time solvable if H belongs to the class called bi-arcgraphs , and for all other graphs H it is NP-complete.We are interested in the complexity of the LHom ( H ) problem, parameterized by the treewidth ofthe input graph. This problem was investigated by Egri, Marx, and Rzążewski [STACS 2018], whoobtained tight complexity bounds for the special case of reflexive graphs H , i.e., if every vertex has aloop.In this paper we extend and generalize their results for all relevant graphs H , i.e., those, for whichthe LHom ( H ) problem is NP-hard. For every such H we find a constant k = k ( H ) , such that the LHom ( H ) problem on instances with n vertices and treewidth t • can be solved in time k t · n O (1) , provided that the input graph is given along with a tree decom-position of width t , • cannot be solved in time ( k − ε ) t · n O (1) , for any ε > , unless the SETH fails.For some graphs H the value of k ( H ) is much smaller than the trivial upper bound, i.e., | V ( H ) | .Obtaining matching upper and lower bounds shows that the set of algorithmic tools we have discov-ered cannot be extended in order to obtain faster algorithms for LHom ( H ) in bounded-treewidth graphs.Furthermore, neither the algorithm, nor the proof of the lower bound, is very specific to treewidth. Webelieve that they can be used for other variants of the LHom ( H ) problem, e.g. with different parame-terizations. ∗ The first author was supported by the ERC Starting Grant CUTACOMBS (grant agreement No. 714704). The second and thethird author were supported by the Polish National Science Centre grant no. 2018/31/D/ST6/00062. † Warsaw University of Technology, Faculty of Mathematics and Information Science and University of Warsaw, Institute ofInformatics, [email protected] ‡ 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
A p opular line of research in studying computationally hard problems is to consider restricted instances,in order to understand the boundary between easy and hard cases. For example, most of natural problemscan be efficiently solved on trees, using a bottom-up dynamic programming. This observation led to thedefinition of treewidth , which, informally speaking, measures how much a given graph resembles a tree.The notion of treewidth appears to be very natural and it was independently discovered by several authorsin different contexts [3, 9, 41, 16].For many problems, polynomial-time algorithms for graphs with bounded treewidth can be obtainedby adapting the dynamic programming algorithms for trees. Most of these straightforward algorithmsfollow the same pattern, which was captured by the seminal meta-theorem by Courcelle [14]: he provedthat each problem expressible in monadic second order logic (MSO ) can be solved in time f (tw( G )) · n O (1) on graphs G with n vertices and treewidth tw( G ) , where f is some function, depending on the MSO formula describing the particular problem. As a consequence of this meta-theorem, in order to show thatsome problem Π is fixed-parameter tractable (FPT), parameterized by the treewidth, it is sufficient to showthat Π can be described in a certain way.The main problem with using the meta-theorem as a black-box is that the function f it producesis huge (non-elementary). We also know that this bound cannot be improved, if we want to keep thefull generality of the statement [26]. Because of this, as the area of the so-called fine-grained complexity gained popularity [36], researchers turned back to studying particular problems, and asking about the bestpossible dependence on treewidth, i.e., the function f . This led to many exciting algorithmic results whichsignificantly improved the naive dynamic programming approach [45, 7, 35].There is a little caveat that applies to most of algorithms mentioned above: Usually we assume thatthe input graph is given along with its tree decomposition, and the running time is expressed in terms ofthe width of this decomposition. This might be a serious drawback, since finding an optimal tree decom-position is NP-hard [2]. However, finding a tree decomposition of given width (if one exists) can be donein FPT time [5, 8], which is often sufficient. Since we are interested in the complexity of certain problems,parameterized by the treewidth, we will not discuss the time needed to find a decomposition. Thus we willalways assume that the input graph is given along with its tree decomposition.In parallel to improving the algorithms, many lower bounds were also developed [37, 41, 16]. Let uspoint out that the main assumption from the classical complexity theory, i.e., P = NP, is too weak to provideany meaningful lower bounds in our setting. The most commonly used assumptions in the fine-grainedcomplexity world, are the
Exponential-Time Hypothesis (ETH) and the
Strong Exponential-Time Hypothesis (SETH), both introduced by Impagliazzo and Paturi [31, 32]. Informally speaking, the ETH implies that t with n variables cannot be solved in subexponential time, i.e., in time o ( n ) , and the SETH impliesthat CNF-Sat with n variables and m clauses cannot be solved in time (2 − ε ) n · m O (1) , for any ε > .For example the straightforward dynamic programming algorithm for k - Coloring works in time k tw( G ) · n O (1) . As one of the first SETH-based lower bounds for problems parameterized by the treewidth,Lokshtanov, Marx, and Saurabh [37] proved that this bound is tight. Theorem 1 (Lokshtanov, Marx, Saurabh [37]).
For any k > , there is no algorithm solving k - Coloring on a graph with n vertices and treewidth t in time ( k − ε ) t · n O (1) , unless the SETH fails. Graph homomorphisms.
In this paper we are interested in extending Theorem 1 for one of possiblegeneralization of the k - Coloring problem. For graph G and H (both with possible loops on vertices), a homomorphism from G to H is a mapping h : V ( G ) → V ( H ) , which preserves edges, i.e., for every edge1 y of G it holds that h ( x ) h ( y ) ∈ E ( H ) . The graph H is called a target . If h is a homomorphism from G to H , we denote it by writing h : G → H . We also write G → H to indicate that some homomorphismfrom G to H exists.By Hom ( H ) we denote the computational problem of deciding whether an instance graph G admitsa homomorphism to H (usually we consider H a fixed graph, but we might also treat it as a part of theinput). Observe that if H = K k , then Hom ( H ) is equivalent to the k - Coloring problem. Because of that,homomorphisms to H are often called H -colorings . We will also refer to vertices of H as colors .Let us briefly survey the some results concerning the complexity of variants of the Hom ( H ) problem.For more information, we refer the reader to the comprehensive monograph by Hell and Nešetřil [29]. Thecomplexity dichotomy for Hom ( H ) was shown by Hell and Nešetřil [30]: the problem is polynomial-time-solvable if H contains a vertex with a loop or is bipartite, and NP-complete for all other graphs H . Sincethen, many interesting results concerning the complexity of graph homomorphisms have appeared [25,46, 42, 15, 17, 13]. The fine-grained complexity of the Hom ( H ) problem, parameterized by the treewidthof the input graph, was very recently studied by Okrasa and Rzążewski [40]. They were able to find tightSETH-bounds, conditioned on two conjectures from algebraic graph theory from early 2000s. As theseconjectures remain wide open, we know no graph, for which the bounds from [40] do not apply.A natural and interesting extension of the Hom ( H ) problem is its list version. In the list homomorphismproblem , denoted by LHom ( H ), the input consists of a graph G and a H -lists L , which means that L is a function which assigns to each vertex of G a subset of vertices of H . We ask whether there is ahomomorphism h from G to H , which respects lists L , i.e., for each x ∈ V ( G ) it holds that h ( x ) ∈ L ( x ) .If h is such a list homomorphism, we denote it by h : ( G, L ) → H . We also write ( G, L ) → H to indicatethat some homomorphism h : ( G, L ) → H exists.The complexity of the LHom ( H ) problem was shown in three steps. First, Feder and Hell [19] provided aclassification for the case that H is reflexive , i.e., every vertex has a loop. They proved that if H is an intervalgraph, then the problem is polynomial-time solvable, and otherwise it is NP-complete. The next step wasshowing the complexity dichotomy for irreflexive graphs (i.e., with no loops). Feder, Hell, and Huang [20]proved that if H is bipartite and its complement is a circular-arc graph, then the problem is polynomial-timesolvable, and otherwise it is NP-complete. Interestingly, bipartite graphs whose complement is circular-arc were studied independently by Trotter and Moore [44] in the context of some poset problems. Finally,Feder, Hell, and Huang [21] provided the full classification for general graph H : the polynomial casesappear to be bi-arc graphs , which are also defined in terms of some geometric representation. Let us nowskip the exact definition of bi-arc graphs, and we will get back to it in Section 4.1.Let us point out that in all three papers mentioned above, the polynomial-time algorithms for LHom ( H )exploited the geometric representation of H . On the other hand, all hardness proofs followed the samepattern. First, for each “easy” class C (i.e., interval graphs, bipartite co-circular-arc graphs, and bi-arcgraphs), the authors provided an alternative characterization in terms of forbidden subgraphs. In otherwords, they defined a (non-necessarily finite) family F of graphs, such that H ∈ C if and only if H doesnot contain any F ∈ F as an induced subgraph. Then, for each F ∈ F , the authors showed that LHom ( F )is NP-complete. Note that this is sufficient, as every “hard” graph H contains some F ∈ F , and everyinstance of LHom ( F ) is also an instance of LHom ( H ), where no vertex from V ( H ) − V ( F ) appears in anylist.If the input graph G is given with a tree decomposition of width tw( G ) , then the straightforwarddynamic programming solves the LHom ( H ) problem in time | V ( H ) | tw( G ) · | V ( G ) | O (1) . The study of thefine-grained complexity of the LHom ( H ) problem, parameterized by the treewidth of the input graph, wasinitiated by Egri, Marx, and Rzążewski [18]. They were able to provide the full complexity classification2or the case of reflexive graphs H , i.e., corresponding to the first step of the above-mentioned complexitydichotomy.The authors defined a new and simple graph invariant, denoted by i ∗ , which is based on incomparablesets and the existence of a certain decompositions in H , and proved the following tight bounds. Theorem 2 (Egri, Marx, Rzążewski [18]).
Let H be a fixed connected reflexive non-interval graph, andlet k = i ∗ ( H ) . The LHom ( H ) problem on instances ( G, L ) with n vertices,(a) can be solved in time k tw( G ) · n O (1) , provided that an optimal tree decomposition of G is given,(b) cannot be solved in time ( k − ε ) tw( G ) · n O (1) for any ε > , unless the SETH fails. In this paper we continue this line of research and provide the full complexity classification for allgraphs H . Our results heavily extend the framework of Egri, Marx, Rzążewski [18] and generalize Theorem 2. In this paper we provide a full complexity classification of
LHom ( H ), parameterized by the treewidthof an instance graph. Our results heavily extend the ones of Egri, Marx, Rzążewski [18] and general-ize Theorem 2 to all relevant graphs H . Let us point out that instead of designing ad-hoc algorithms andreductions that are fine-tailored for a particular problem, we rather build a general framework that allowsus to provide tight bounds for a natural and important family of problems.We prove the complexity classification for LHom ( H ) in two steps. First, we consider the case that thetarget graph H is bipartite. Then we extend the results to general graphs H , with loops allowed. Bipartite graphs H . We first deal with the case that H is bipartite (in particular, irreflexive), withbipartition classes X and Y . Recall that we are interested in graphs H , for which the LHom ( H ) problemis NP-hard, i.e., graphs that are not co-circular-arc graphs. Moreover, we consider only connected graphs H (as otherwise we can reduce to this case in polynomial time).Let us present the high-level idea behind our algorithm for LHom ( H ). Consider an instance ( G, L ) ,such that G is connected, and let n = | V ( G ) | . We may assume that G is bipartite, as otherwise ( G, L ) is clearly a no-instance. Furthermore, in any homomorphism from G to H , each bipartition class of G ismapped to a different bipartition class of H . We can assume that this is already reflected in the lists (wemight have to solve two independent instances).The algorithm is based on two main ideas. First, observe that if H contains two vertices u, v , whichare in the same bipartition class, and each neighbor of u is a neighbor of v , then the only thing preventingus from using v instead u is the fact that v might not appear in some list containing u . Thus we mightalways assume that each list is an incomparable set , i.e., it does not contain two vertices u, v as above. By i ( H ) we denote the size of a largest incomparable set contained in one bipartition class.The second idea is related to a certain decomposition of H . By a bipartite decomposition we mean apartition of the vertex set of H into three subsets D, N, R , such that: • at least one of sets ( D ∩ X ) and ( D ∩ Y ) has at least 2 elements, • N is non-empty and induces a biclique in H , • the sets ( D ∩ X ) ∪ ( N ∩ Y ) and ( D ∩ Y ) ∪ ( N ∩ X ) induce bicliques in H , • N is a D - R -separator.We show that if H has a bipartite decomposition, then we can reduce solving an instance ( G, L ) of LHom ( H ) to solving several instances of LHom ( H ) and LHom ( H ), where H is the subgraph of H in-duced by D , and H is obtained from H by collapsing D ∩ X and D ∩ Y to single vertices.3his leads to the definition of i ∗ ( H ) as the maximum value of i ( H ′ ) over all connected undecompos-able induced subgraphs H ′ of H , which are not complements of a circular-arc graph (a graph is undecom-posable if it has no bipartite decomposition). As our first result, we show that the algorithm exploitingdecompositions recursively runs in time i ∗ ( H ) tw( G ) · n O (1) .One might wonder whether some additional observations could be used to improve the algorithm. Asour second result, we show that this is not possible, assuming the SETH. This means that unless somethingunexpected happens in complexity theory, our algorithmic toolbox allows to solve LHom ( H ), parameter-ized by the treewidth, as fast as possible. More formally, we show the following theorem, which fullyclassifies the complexity of LHom ( H ) for bipartite graphs H . Theorem 3.
Let H be a connected bipartite graph, whose complement is not a circular-arc graph, and let k = i ∗ ( H ) . Let G be a bipartite graph with n vertices and treewidth tw( G ) .(a) Even if H is given as an input, the LHom ( H ) problem with instance ( G, L ) can be solved in time k tw( G ) · ( n · | H | ) O (1) for any lists L , provided that G is given with an optimal tree decomposition.(b) Even if H is fixed, there is no algorithm that solves LHom ( H ) for every G and L in time ( k − ε ) tw( G ) · n O (1) for any ε > , unless the SETH fails. Note that for Theorem 3 a), if H is not considered to be a constant, n · | H | is a natural measure of thesize of an instance, as it is an upper estimate on the sum of sizes of all lists.The main tool used in the proof of Theorem 3 b) is the following technical lemma. Lemma 4 (Constructing a
NEQ( S ) -gadget). Let H be a connected, bipartite, undecomposable graph, whosecomplement is not a circular-arc graph. Let S be an incomparable set of k > vertices of H , contained in onebipartition class. Then there exists a NEQ( S ) -gadget, i.e., a graph F with H -lists L and two special vertices x, x ′ ∈ V ( F ) , such that L ( x ) = L ( x ′ ) = S and• for any list homomorphism h : ( F, L ) → H , it holds that h ( x ) = h ( x ′ ) ,• for any distinct s, s ′ ∈ S there is a list homomorphism h : ( F, L ) → H , such that h ( x ) = s and h ( x ′ ) = s ′ . Let us point out that the graph constructed in Lemma 4 can be seen as a primitive-positive definition ofthe inequality relation on S (see e.g. Bulatov [12, Section 2.1]). However, we prefer to present our resultsusing purely combinatorial terms.The proof of Lemma 4 is technically involved, but as soon as we have it, the proof of Theorem 3 b)is straightforward. Consider an instance G of k - Coloring , where k = i ∗ ( H ) . Let H ′ be a connected,undecomposable, induced subgraph of H , whose complement is not a circular-arc graph, and contains anincomparable set S of size k . We construct a graph G ∗ by replacing each edge uv of G with a copy of the NEQ( S ) -gadget, given by Lemma 4 (invoked for H ′ and S ), so that u is identified with x and v is identifiedwith x ′ . By the properties of the gadget, we observe that G ∗ has a list homomorphism to H if and onlyif G is a yes-instance of k - Coloring . Furthermore, the construction of the
NEQ( S ) -gadget depends on H only, and H is assumed fixed, so we conclude that tw( G ∗ ) = tw( G ) + O (1) . Therefore the statementof Theorem 3 b) follows from Theorem 1. General graphs H . Next, we move to the general case. We aim to reduce the problem to the bipartitecase. The main idea comes from Feder, Hell, and Huang [21] who showed a close connection betweenthe
LHom ( H ) problem and the LHom ( H ∗ ) problem, where H ∗ is the associated bipartite graph of H , i.e.,the bipartite graph with bipartition classes { v ′ : v ∈ V ( H ) } and { v ′′ : v ∈ V ( H ) } , where u ′ v ′′ ∈ E ( H ∗ )
4f and only if uv ∈ E ( H ) . Let us point out that we can equivalently define H ∗ as a categorical (direct)product of H and K [28].We extend the definition of i ∗ to non-bipartite graphs by setting i ∗ ( H ) := i ∗ ( H ∗ ) . Let us point out thatthis definition is consistent with the definition for bipartite graphs, and with the definition of i ∗ for reflexivegraphs, introduced by Egri, Marx, and Rzążewski [18]. We show the following theorem, fully classifyingthe complexity of the LHom ( H ) problem, parameterized by the treewidth of the instance graph. Theorem 5.
Let H be a connected non-bi-arc graph (with possible loops), and let k = i ∗ ( H ) . Let G be agraph with n vertices and treewidth tw( G ) .(a) Even if H is given as an input, the LHom ( H ) problem with instance ( G, L ) can be solved in time k tw( G ) · ( n · | H | ) O (1) for any lists L , provided that G is given with an optimal tree decomposition.(b) Even if H is fixed, there is no algorithm that solves LHom ( H ) for every G and L in time ( k − ε ) tw( G ) · n O (1) for any ε > , unless the SETH fails. As we mentioned before, both statements of Theorem 5 follow from the corresponding statementsin Theorem 3. For the algorithmic part, we define certain decompositions of general graphs H and showthat they coincide with bipartite decompositions H ∗ . This lets us reduce solving an instance ( G, L ) of LHom ( H ) to solving some instances of LHom ( H ∗ ).On the complexity side, the reduction is even more direct: we show that an algorithm solving the LHom ( H ) problem on instances with treewidth t in time ( i ∗ ( H ) − ε ) t · n O (1) could be used to solvethe LHom ( H ∗ ) problem on instances with treewidth t in time ( i ∗ ( H ∗ ) − ε ) t · n O (1) , thus contradictingTheorem 3 b).In the conclusion of the paper we discuss how the decompositions defined for general graphs H behavein two natural special cases: if H is either reflexive of irreflexive. Recall that they correspond to the firsttwo steps of the complexity dichotomy for LHom ( H ) [19, 20]. We also analyze the complexity for typical graphs H , and prove the following. Corollary 6.
For almost all graphs H with possible loops the following holds. Even if H is fixed, there isno algorithm that solves LHom ( H ) for every instance ( G, L ) in time O (cid:16) ( | V ( H ) | − ε ) tw( G ) · n O (1) (cid:17) for any ε > , unless the SETH fails. Finally, we show how to generalize our approach of reducing instances of
LHom ( H ) to instances of LHom ( H ′ ), where H ′ is undecomposable. We believe that this idea could be exploited to study the com-plexity of LHom ( H ) in various regimes, e.g., for different parameterizations of input instances. Let us briefly discuss similarities and differences between our work and previous, closely related resultsby Egri, Marx, and Rzążewski [18] (about the complexity of the
LHom ( H ) problem for reflexive H ), andby Okrasa and Rzążewski [40] (about the complexity of the Hom ( H ) problem).At the high level, we follow the direction used by Egri et al. [18], but since we generalize their resultto all relevant graphs H , the techniques become much more involved. The crucial idea was to reducethe problem to the bipartite case, and to define decompositions of general graphs that correspond to thedecompositions of H ∗ . On the contrary, the case of reflexive graphs H is much more straightforward.In particular, there is just one type of decomposition that could be exploited algorithmically. Also, thestructure of “hard” subgraphs is much simpler in this case, so the necessary gadgets are significantly easierto construct. 5n the other hand, in order to prove hardness for the Hom ( H ) problem, Okrasa and Rzążewski [40]used mostly algebraic tools that are able to capture the global structure of a graph. In contrast, our proofsare purely combinatorial. Furthermore, we are able to provide the full complexity classification for allgraphs H , while the results of [40] are conditioned on two twenty-year-old conjectures. Let H be a graph. By comp( G ) we denote the set of connected components of G . For a vertex v , by N ( v ) we denote the neighborhood of v , i.e., the set of vertices adjacent to v (note that v ∈ N ( v ) if and only if v has a loop). For a set U ⊆ V ( H ) , we define N ( U ) := S u ∈ U N ( u ) − U and N [ U ] := S u ∈ U N ( u ) ∪ U .If U = { u , . . . , u k } , we omit one pair of brackets and write N ( u , . . . , u k ) (respectively N [ u , . . . , u k ] )instead of N ( { u , . . . , u k } ) (respectively N [ { u , . . . , u k } ] ).We say that two vertices x, y are comparable if N ( y ) ⊆ N ( x ) or N ( x ) ⊆ N ( y ) . If two vertices are notcomparable, we say that they are incomparable . A set of vertices is incomparable if all vertices are pairwiseincomparable.We say that a set A ⊆ V ( H ) is complete to a set B if for every a ∈ A and b ∈ B the edge ab exists. Onthe other hand, A is non-adjacent to B if there are no edges with one endvertex in A and the other in B .Let H be a bipartite graph, whose bipartition classes are denoted by X and Y . For a set S ⊆ V ( H ) and Z ∈ { X, Y } , by S Z we denote S ∩ Z . For A, B ⊆ V ( H ) , we say that A is bipartite-complete to B if A X is complete to B Y and A Y is complete to B X . 6 Algorithm for bipartite target graphs
Observe that we might always assume that H is connected, as otherwise we can solve the problem foreach connected component of H separately. Furthermore, without losing the generality we may assumecertain properties of instances of LHom ( H ) that we need to solve. Observation 7.
Let ( G, L ) be an instance of LHom ( H ), where H is connected and bipartite with bipartitionclasses X, Y . Without loss of generality, we might assume the following.1. The graph G is connected and bipartite, with bipartition classes X G and Y G ,2. S x ∈ X G L ( x ) ⊆ X and S y ∈ Y G L ( y ) ⊆ Y ,3. for each x ∈ V ( G ) , the set L ( x ) is incomparable.Proof.
1. If G is not connected, we need to solve the problem separately for each connected component.If G is not bipartite, then we can immediately report a no-instance.2. Observe that in any homomorphism f : ( G, L ) → H , either f ( X G ) ⊆ X and f ( Y G ) ⊆ Y , or f ( X G ) ⊆ Y and f ( Y G ) ⊆ X . Thus in order to solve ( G, L ) , we can separately solve two instances ( G, L ′ ) and ( G, L ′′ ) of LHom ( H ), defined as follows. For each x ∈ X G we define L ′ ( x ) := L ( x ) ∩ X and L ′′ ( x ) := L ( x ) ∩ Y , and for each y ∈ Y G we define L ′ ( y ) := L ( y ) ∩ Y and L ′′ ( y ) := L ( y ) ∩ X .Then ( G, L ) is a yes-instance of LHom ( H ) if and only if at least one of ( G, L ′ ) and ( G, L ′′ ) is ayes-instance of LHom ( H ). Thus if we can solve each of instances ( G, L ′ ) and ( G, L ′′ ) in time T ( G ) ,then we can solve the instance ( G, L ) in time T ( G ) .3. If N ( u ) ⊆ N ( v ) and both u and v appear on a list of some x ∈ V ( G ) , then in any homomorphism f : ( G, L ) → H with f ( x ) = u we can always recolor x to the color v . The obtained mapping isstill a list homomorphism from ( G, L ) to H , so we can safely remove u from L ( x ) .An instance of LHom ( H ) that respects conditions in Observation 7 is called consistent . From now onwe will restrict ourselves to consistent instances. Let us introduce a graph parameter, which will play acrucial role in our investigations. Definition 1 ( i ( H ) ). For a bipartite graph H , by i ( H ) we denote the maximum size of an incomparableset in H , which is fully contained in one bipartition class.Clearly for every H we have i ( H ) | H | . Note that by Observation 7 we obtain the following. Corollary 8.
Let ( G, L ) be a consistent instance of LHom ( H ), where H is bipartite. Then max v ∈ V ( G ) | L ( v ) | i ( H ) . Throughout this section we assume that the target graph H is bipartite with bipartition classes X and Y . Inparticular, it has no loops. Our algorithm for LHom ( H ) is based on the existence of a certain decompositionof H . Definition 2 (Bipartite decomposition).
A partition of V ( H ) into an ordered triple of sets ( D, N, R ) is a bipartite decomposition if the following conditions are satisfied.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 is bipartite-complete to N . 7ince so far we only consider bipartite decompositions, we will just call them decompositions. Lateron we will introduce other types of decompositions and then the distinction will be important. If H admitsa decomposition, then it is decomposable , otherwise it is undecomposable .For a graph H with a decomposition ( D, N, R ) , the factors of the decomposition are two graphs H , H defined as follows. The graph H is the subgraph of H induced by the set D . The graph H is obtained inthe following way. For Z ∈ { X, Y } , if D Z is non-empty, then we contract it to a vertex d Z . If there is atleast one edge between the sets D X and D Y , we add the edge d X d Y .Note that both H and H are proper induced subgraphs of H . For H is follows directly from thedefinition and H can be equivalently defined as a graph obtained from H by removing all but one vertexfrom D X (if D X = ∅ ) and all but one vertex from D Y (if D Y = ∅ ). We leave the vertices that are joinedby an edge, provided that such a pair exists.Now let us demonstrate how the bipartite decomposition can be used algorithmically. Let T ( H, n, t ) denote an upper bound for the complexity of LHom ( H ) on instances with n vertices, given along a treedecomposition of width t . In the following lemma we do not assume that | H | is a constant. Lemma 9 (Bipartite decomposition lemma).
Let H be a bipartite graph with bipartition classes X and Y , whose complement is not a circular-arc graph, and suppose H has a bipartite decomposition with factors H , H . Assume that there are constants α > , c > , and d > , such that T ( H , n, t ) α · c t · ( n · | H | ) d and T ( H , n, t ) α · c t · ( n · | H | ) d . Then T ( H, n, t ) α · c t · ( n · | H | ) d , if n is sufficiently large.Proof. Consider an instance ( G, L ) of LHom ( H ), recall that without loss of generality we may assumethat it is consistent. Let the bipartition classes of G be X G and Y G and assume that S x ∈ X G L ( x ) ⊆ X and S y ∈ Y G L ( y ) ⊆ Y .Let ( D, N, R ) be a bipartite decomposition of H . We observe that for Z ∈ { X, Y } , and any twovertices v ∈ D Z , s ∈ N Z , we have N ( v ) ⊆ N ( s ) . Thus we may assume that no list contains both s and v .Let Q be the set of vertices of G which have at least one vertex from N in their lists. Claim 9.1.
If there exists a list homomorphism h : ( G, L ) → H , the image of each C ∈ comp( G − Q ) isentirely contained either in D or in R .Proof of Claim. By the definition of comp( G − Q ) , the image of C is disjoint with N . Suppose there exist a, b ∈ C , such that h ( a ) = u ∈ D and h ( b ) = r ∈ R . Since C is connected, there exists an a - b -path P in C . The image of P is an u - r -walk in H . But since N separates D and R in H , there is a vertex of P ,which is mapped to a vertex of N , a contradiction. (cid:4) Let us define lists L as L ( x ) := L ( x ) ∩ D , for every x ∈ V ( G ) − Q . For each C ∈ comp( G − Q ) , wecheck if there exists a homomorphism h C : ( C, L ) → H . Let C be the set of those C ∈ comp( G − Q ) ,for which h C exists. By Claim 9.1, we observe that if C / ∈ C , then we can safely remove all vertices from D from the lists of vertices of C .Now consider the graph H . Let Z ∈ { X, Y } and let d Z be the vertex to which the set D Z is collapsed(if it exists). Let us define an instance ( G, L ) of the LHom ( H ) problem, where the lists L are as follows.If v ∈ Z G is a vertex from some component of C , then L ( v ) := L ( v ) − D Z ∪ { d Z } (note that in this case d Z must exist). If v is a vertex from some component of comp( G − Q ) − C , then L ( v ) := L ( v ) − D Z .Finally, if v ∈ Q , then L ( v ) := L ( v ) . Note that the image of each list is contained in V ( H ) . Moreover,note that S x ∈ X G L ( x ) ⊆ R X ∪ N X ∪ { d X } and S y ∈ Y G L ( y ) ⊆ R Y ∪ N Y ∪ { d Y } . Claim 9.2.
There is a list homomorphism h : ( G, L ) → H if an only if there is a list homomorphism h ′ : ( G, L ) → H . roof of Claim. First, assume that h : ( G, L ) → H exists. Define h ′ : V ( G ) → V ( H ) in the followingway: h ′ ( v ) = d X if h ( v ) ∈ D X ,d Y if h ( v ) ∈ D Y ,h ( v ) otherwise.Clearly h ′ is a homomorphism from G to H , we need to show that it also respects lists L . Supposeotherwise and let v be a vertex of G , such that h ′ ( v ) / ∈ L ( v ) . By symmetry, assume that v ∈ X G , andthus h ′ ( v ) ∈ X . If h ′ ( v ) = d X , then h ′ ( v ) = h ( v ) ∈ ( L ( v ) − D X ) ⊆ L ( v ) . So suppose h ′ ( v ) = d X (andthus h ( v ) ∈ D X ) and d X / ∈ L ( v ) . Observe that v cannot be a vertex from Q , since h maps v to a vertex of D X and vertices from Q do not have any vertices of D in their lists. So the only case left is that v belongsto some connected component C of G − Q , which cannot be mapped to H . But then, by Claim 9.1, novertex of C is mapped to any vertex of D , so h ( v ) / ∈ D X , a contradiction.Now suppose there exists a list homomorphism h ′ : ( G, L ) → H . Define the following mapping h from V ( G ) to V ( H ) . If h ′ ( v ) / ∈ { d X , d Y } , then we set h ( v ) := h ′ ( v ) . Otherwise, if h ′ ( v ) ∈ { d X , d Y } , then v is a vertex of some connected component C ∈ C , and we define h ( v ) := h C ( v ) . Clearly h preserves lists L : if h ( v ) / ∈ D , then h ( v ) = h ′ ( v ) ∈ L ( v ) − { d X , d Y } ⊆ L ( v ) ; otherwise we use h C , which preserveslists L by the definition.Now suppose h does not preserve edges, so there are vertices u ∈ X G and v ∈ Y G , such that uv is anedge of G and h ( u ) h ( v ) is not an edge of H . If h ′ ( u ) = d X , h ′ ( v ) = d Y , or h ′ ( u ) = d X , h ′ ( v ) = d Y , then h ( u ) h ( v ) must be an edge of H , otherwise we get a contradiction by the definitions of h C (as since x and y are neighbors, they belong to the same C ) and h ′ , respectively. So, by symmetry, suppose h ′ ( u ) = d X and h ′ ( v ) = d Y . But then we observe that h ( u ) ∈ D X and h ( v ) = h ′ ( v ) ∈ N Y , since h ′ is a homomorphism.And because N Y is complete to D X , so h ( u ) h ( v ) is an edge – a contradiction. (cid:4) Computing comp( G − Q ) can be done in time O ( n · | H | + n ) = O (( n · | H | ) ) . Note that givena tree decomposition of G of width at most t , we can easily obtain a tree decomposition of each C ∈ comp( G − Q ) of width at most t . Computing h C for all C ∈ comp( G − Q ) requires time at most X C ∈ comp( G − Q ) T ( H , | C | , t ) X C ∈ comp( G − Q ) α · c t · ( | H | · | C | ) d α · c t · ( | H | · n ) d . The estimation follows from the facts that P C ∈ comp( G − Q ) | C | n , and n d is superadditive with respect to n , i.e., n d + n d ( n + n ) d . Computing lists L can be performed in time O ( | H | · n ) . Finally, computing h ′ requires time T ( H , n, t ) α · c t · ( | H | · n ) d . The total running time is therefore bounded by: O (cid:16) ( n · | H | ) (cid:17) + α · c t · ( | H | · n ) d + O ( | H | · n ) + α · c t · ( | H | · n ) d . With a careful analysis one can verify that the above expression is bounded by α · c t · ( | H | · n ) d , providedthat n is sufficiently large. LHom ( H ) for bipartite targets Let us define the main combinatorial invariant of the paper, i ∗ ( H ) : Definition 3 ( i ∗ ( H ) for bipartite H ). Let H be a connected bipartite graph, whose complement is nota 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 } . H ′ is an induced subgraph of H , then i ( H ′ ) i ( H ) and i ∗ ( H ′ ) i ∗ ( H ) , and thus i ∗ ( H ) = i ( H ) for undecomposable H . Furthermore, we always have i ∗ ( H ) i ( H ) , which in turn isupper-bounded by the size of the larger bipartition class of H , i.e., the natural bound on the size of thelists in an instance of LHom ( H ).Let us point out that using Definition 2 it is easy to create graphs H , for which i ∗ ( H ) is arbitrarilysmaller than this natural upper bound. For example, let k > and let H be obtained from K k,k byremoving a perfect matching. Then H is not the complement of a circular-arc graph, as it contains aninduced C . Now, for j > , the graph H j is obtained from H j − by introducing another copy of H andmaking all vertices from one bipartition class of H j − complete to a vertex of H . It is straightforward toverify that for every j > it holds that i ∗ ( H j ) = k + 1 , while each bipartition class of H j has j · k vertices.Now we are ready to present an algorithm solving LHom ( H ), note that again we do not assume that | H | is a constant. We present the following, slightly more general variant of Theorem 3 a), where we alsodo not assume that the tree decomposition of G is optimal. Theorem 3’ a).
Let H be a connected bipartite graph (given as an input) and let ( G, L ) be an instanceof LHom ( H ), where G has n vertices and is given along a tree decomposition of width t . Then there is analgorithm which decides whether ( G, L ) → H in time O (cid:16) i ∗ ( H ) t · ( n · | H | ) O (1) (cid:17) .Proof. Clearly we can assume that n is sufficiently large, as otherwise we can solve the problem in poly-nomial time by brute-force.Observe that with H we can associate a recursion tree R , whose nodes are labeled with induced sub-graphs of H . The root, denoted by node ( H ) corresponds to the whole graph H . If H is undecomposableor is a complement of a circular-arc graph, then the recursion tree has just one node. Otherwise H hasa decomposition with factors H and H , and then node ( H ) has two children, node ( H ) and node ( H ) ,respectively. Recall that each factor has strictly fewer vertices than H , so we can construct R recursively.Clearly, each leaf of R is either the complement of a circular-arc graph (and thus the corresponding prob-lem is polynomial-time solvable), or is an undecomposable induced subgraph of H . Note that a recursiontree may not be unique, as a graph may have more than one decomposition. However, the number of leavesis bounded by O ( | H | ) (actually, with a careful analysis we can show that it is at most | H | − ), so the totalnumber of nodes is O ( | H | ) . Furthermore, it can be shown that in time polynomial in H we can check if H is undecomposable, or find a decomposition (we will prove it in Lemma 23). Since recognizing circular-arcgraphs (and therefore of course their complements) is also polynomial-time solvable, we conclude that R can be constructed in time polynomial in | H | .If H is the complement of a circular-arc graph, then we solve the problem in polynomial time [20]. If H is undecomposable, we run a standard dynamic programming algorithm on a tree decomposition of G (see [9, 6]). For each bag of the tree decomposition, and every partial list homomorphism from the graphinduced by this bag to H we indicate whether this particular partial homomorphism can be extended toa list homomorphism of the graph induced by the subtree rooted at this bag. By Corollary 8, the sizeof each list L ( x ) for x ∈ V ( G ) is at most i ( H ) , thus the complexity of the algorithm is bounded by α · i ( H ) t · ( n · | H | ) d for some constants α, d . We can assume that d > , as otherwise we can alwaysincrease it.So suppose H is decomposable and let us show that we can solve the problem in time α · i ∗ ( H ) t · ( n ·| H | ) d . Let R be a recursion tree of H and recall that its every leaf corresponds to an induced subgraph of H with strictly fewer vertices. Therefore, for any leaf node of R , corresponding to the subgraph H ′ of H ,we can solve every instance of LHom ( H ′ ) with n vertices and a tree decomposition of width at most t in10ime α · i ( H ′ ) t · ( n · | H ′ | ) d α · i ∗ ( H ) t · ( n · | H ′ | ) d . Now, applying Lemma 9 in a bottom-up fashion, weconclude that we can solve LHom ( H ) in time α · i ∗ ( H ) t · ( n · | H | ) d = O ( i ∗ ( H ) t · ( n · | H | ) O (1) ) .11 Hardness for bipartite target graphs
In this section we consider bipartite graphs H , which are not complements of circular-arc graphs. Let usstart this section with recalling an alternative definition of this class, which was used by Feder, Hell, andHuang to obtain the complexity dichotomy for the LHom ( H ) problem, if H is irreflexive [20]. Definition 4 (Special edge asteroid).
Let k > and consider A X = { u , . . . , u k } ⊆ X and A Y = { v , . . . , v k } ⊆ Y . The pair ( A X , A Y ) is a special edge asteroid if, for each i ∈ { , . . . , k } , the vertices u i and v i are adjacent, and there exists a u i - u i +1 -path W i,i +1 (indices are computed modulo k + 1 ), suchthat(a) there are no edges between { u i , v i } and { v i + k , v i + k +1 } ∪ W i + k,i + k +1 and(b) there are no edges between { u , v } and { v , . . . , v k } ∪ S k − i =1 W i,i +1 .Feder, Hell, and Huang [20] proved the following characterization of bipartite graphs, whose comple-ments are circular-arc graphs. Theorem 10 (Feder, Hell, and Huang [20]).
A bipartite graph H is the complement of a circular-arcgraph if and only if H does not contain an induced cycle with at least 6 vertices or a special edge asteroid. We aim to prove Theorem 3 b). Actually we will show a version, which gives the lower bound pa-rameterized by the pathwidth of G . Clearly such statement will be stronger, as pw( G ) > tw( G ) . Thiscorresponds to the pathwidth variant of Theorem 1, also shown by Lokshtanov, Marx, Saurabh [37]. Theorem 1’ (Lokshtanov, Marx, Saurabh [37]).
For any k > , there is no algorithm solving k - Coloring on a graph with n vertices and pathwidth t in time ( k − ε ) t · n O (1) , unless the SETH fails. Thus we show the following strenghtening of Theorem 3 b).
Theorem 3’ b).
Let H be a fixed bipartite graph, whose complement is not a circular-arc graph. Unless theSETH fails, there is no algorithm that solves the LHom ( H ) problem on instances with n vertices and pathwidth t in time ( i ∗ ( H ) − ε ) t · n O (1) , for any ε > . In order to prove Theorem 3’ b), it is sufficient to show the following.
Theorem 11.
Let H be a fixed connected bipartite undecomposable graph, whose complement is not a circular-arc graph. Unless the SETH fails, there is no algorithm that solves the LHom ( H ) problem on instances with n vertices and pathwidth t in time ( i ( H ) − ε ) t · n O (1) , for any ε > . Let us show that Theorem 3’ b) and Theorem 11 are equivalent. (Theorem 11 → Theorem 3’ b))
Assume the SETH and suppose that Theorem 11 holds and Theorem 3’ b)fails. So there is a bipartite graph H , whose complement is not a circular-arc graph, and an algorithm A that solves LHom ( H ) in time ( i ∗ ( H ) − ε ) pw( G ) · n O (1) for every input ( G, L ) , assuming that G is givenalong with its optimal path decomposition.Let H ′ be an undecomposable connected induced subgraph of H , whose complement is not a circular-arc graph, and i ( H ′ ) = i ∗ ( H ) . Let ( G, L ′ ) be an arbitrary instance of LHom ( H ′ ). Since H ′ is an inducedsubgraph of H , the instance ( G, L ′ ) can be seen as an instance of LHom ( H ), where no vertex from V ( H ) − V ( H ′ ) appears in any list. The algorithm A solves this instance in time ( i ∗ ( H ) − ε ) pw( G ) · n O (1) =( i ( H ′ ) − ε ) pw( G ) · n O (1) , contradicting Theorem 11.12 Theorem 3’ b) → Theorem 11)
Assume the SETH and suppose Theorem 3’ b) holds and Theorem 11fails. So there is a connected bipartite undecomposable graph H , whose complement is not a circular-arcgraph, and an algorithm A that solves LHom ( H ) in time ( i ( H ) − ε ) pw( G ) · n O (1) for every input ( G, L ) . Butsince H is connected, bipartite, and undecomposable, we have i ∗ ( H ) = i ( H ) , so algorithm A contradictsTheorem 3’ b). Let us start this section with introducing some definitions and properties that will be heavily used in ourhardness proof.We call a set of edges independent if they form an induced matching. A walk P is a sequence P = p , . . . , p ℓ of vertices of H , such that p i p i +1 ∈ E ( H ) , for every i ∈ [ ℓ − . We call |P| = ℓ − the length of the walk P . By P we denote the walk P reversed, i.e., P = p ℓ , . . . , p . If |P| > , by P ⊣ and P ⊢ ,respectively, we denote the walks p , . . . , p ℓ and p , . . . , p ℓ − . If vertices a and b are, respectively, the firstand the last vertex of a walk P , we say that P is an a - b -walk and denote it by P : a → b .Now let us define the relation of walks, which will be crucial in our hardness reductions. Definition 5 (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 ) .The following observation is immediate. Observation 12. If P = p , p . . . , p ℓ avoids Q = q , q , . . . , q ℓ and ℓ > , then q ∈ N ( q ) − N ( p ) and p ℓ − ∈ N ( p ℓ ) − N ( q ℓ ) . In particular, N ( q ) N ( p ) and N ( p ℓ ) N ( q ℓ ) . (cid:3) For walks P = p , . . . , p ℓ and Q = q , . . . , q k such that p ℓ = q , we define P◦Q := p , . . . , p ℓ , q , . . . , q k (in particular, p , . . . , p ℓ ◦ p ℓ = p , . . . , p ℓ ). We observe the following. Observation 13. If P : x → y avoids Q : p → q and P ′ : y → z avoids Q ′ : q → r , then P ◦ P ′ avoids Q ◦ Q ′ . (cid:3) We say that two disjoint sets S and S are non-adjacent if there is no edge with one vertex in S andthe other in S . If it does not lead to confusion, we will sometimes identify a walk P with the set of verticesin P , so in particular we will say that walks P and Q are non-adjacent. Clearly, if two walks of the samelength are non-adjacent, they avoid each other. For a walk P = p , p . . . , p ℓ and some i j ℓ , wedefine the p i - p j -subwalk of P , denoted by P [ p i , p j ] , as P [ p i , p j ] := p i , p i +1 , . . . , p j − , p j . (Note that thevertices p i and p j might appear on P more than once, then P [ p i , p j ] can be chosen arbitrarily.) For a set P of walks of equal length, we define the set P ( i ) = { v : v is the i -th vertex of some P ∈ P } . Let us consider a special edge asteroid ( A X , A Y ) , where A X = { u , . . . , u k } ⊆ X and A Y = { v , . . . , v k } ⊆ Y . We use the notation from Definition 4.Observe that { u v , u v , u k +1 v k +1 } is an independent set of edges. Note that for i ∈ { , . . . , k } ,there might be many ways to choose W i,i +1 . We will select the actual path in the following way. First,among all possible paths that satisfy the conditions in the definition, we will only consider shortest ones(note that in particular they are induced). Second, if only possible, we will restrict our considerations to13aths containing v i . Finally, among all paths that are still in consideration, we will select one that contains v i +1 , if possible.In the following observation we show that edge asteroid is symmetric with respect to bipartition of H . Lemma 14.
Consider A X = { u , . . . , u k } ⊆ X and A Y = { v , . . . , v k } ⊆ Y , such that ( A X , A Y ) isa special edge asteroid. Let paths {W i,i +1 } ki =0 be chosen as described above. Then for each i ∈ { , . . . , k } there exists an induced v i - v i +1 -path W ′ i,i +1 , such that(a) there are no edges between { u i , v i } and { u i + k , u i + k +1 } ∪ W ′ i + k,i + k +1 ,(b) there are no edges between { u , v } and { u , . . . , u k } ∪ S k − i =1 W ′ i,i +1 .Furthermore A X ∪ A Y ∪ S ki =0 W i,i +1 = A X ∪ A Y ∪ S ki =0 W ′ i,i +1 .Proof. Let i ∈ { , . . . , k } . We obtain W ′ i,i +1 by modifying the endpoints of W i,i +1 as follows. If v i (respectively v i +1 ) already belongs to W i,i +1 , then it must be the second (resp. last but one) vertex of W i,i +1 , as this path is induced. Thus we remove u i (resp. u i +1 ). In the other case, if v i (resp. v i +1 ) doesnot appear on W i,i +1 , we append it as the first (resp. last) vertex. Clearly such constructed W ′ i,i +1 is a v i - v i +1 -path. Moreover, since W ′ i,i +1 ⊆ W i,i +1 ∪ { v i , v i +1 } , conditions (a) and (b) are satisfied by thedefinition of W i,i +1 . Moreover, note that A X ∪ A Y ∪ S ki =0 W i,i +1 = A X ∪ A Y ∪ S ki =0 W ′ i,i +1 .So we only need to argue that W ′ i,i +1 is an induced path. Clearly, if we only removed vertices u i or u i +1 from W i,i +1 , then W ′ i,i +1 is induced since W i,i +1 is. So suppose that v i does not appear on W i,i +1 ,but is adjacent to some vertex of W i,i +1 , other than u i . It is straightforward to verify that in this case wecould have chosen a shorter path W i,i +1 , or one that is equally long, but contains v i , which contradictsthe choice of W i,i +1 . The case if v i +1 does not appear in W i,i +1 is analogous.Note that Lemma 14 implies that if ( A X , A Y ) is a special edge asteroid, then so is ( A Y , A X ) . For ( A X , A Y ) and paths {W i,i +1 } ki =0 defined as above, we define the asteroidal subgraph O to be the subgraphof H induced by A X ∪ A Y ∪ S ki =0 W i,i +1 . To restore the symmetry of ( A X , A Y ) and ( A Y , A X ) , we willonly require that walks {W i,i +1 } ki =0 and {W ′ i,i +1 } ki =0 are induced. Observe that by Lemma 14, if O is theasteroidal subgraph for ( A X , A Y ) , it is also the asteroidal subgraph for ( A Y , A X ) . Therefore, wheneverwe find in H an asteroidal subgraph, we can freely choose the appropriate special edge asteroid, usuallywe will do it implicitly. Also, we will always use the notation introduced above. In an asteroidal subgraph,in natural way we will treat paths W i,i +1 and W ′ i,i +1 as walks. Moreover, for each valid i we define W i +1 ,i := W i,i +1 . An induced subgraph O of H is an obstruction if it is isomorphic to C or C , or it is an asteroidal subgraph.Note that each induced cycle with at least 10 vertices contains a special edge asteroid. Therefore we canrestate Theorem 10 in the following way, which will be more useful for us. Corollary 15.
Let H be a bipartite graph, which is not the complement of a circular-arc graph. Then H contains an obstruction as an induced subgraph. Let us show basic properties of obstructions. We denote the consecutive vertices of the cycle C k by w , w , . . . , w k (with w w k ∈ E ( C k ) ). For special edge asteroids, we use the notation from Definition 4.14 efinition 6 ( C ( O ) ). For an obstruction O , we define C ( O ) := { ( w , w ) , ( w , w ) } if O is isomorphic to C , { ( w , w ) , ( w , w ) } if O is isomorphic to C , { ( u , u ) , ( v , v ) } if O is an asteroidal subgraph . For a pair ( α, β ) ∈ C ( O ) we define ( α ′ , β ′ ) to be the other element of C ( O ) . Due to the symmetryof cycles and Lemma 14, we will be able to assume symmetry between the elements of C ( O ) , i.e., theproperties of ( α, β ) that we will require will also be satisfied for ( α ′ , β ′ ) . Thus in proofs it will usually besufficient to consider one pair in C ( O ) , as the proof for the other one will be analogous.In the following two observations we show the existence of some useful walks in O . Observation 16.
Let O be an obstruction in H and let C ( O ) = { ( α, β ) , ( α ′ , β ′ ) } . Then for every pair ofvertices x, y of O , such that x, y N [ α, α ′ ] , there exists an x - y -walk W [ x, y ] , using only vertices of O , whichis non-adjacent to { α, α ′ } .Proof. It is straightforward to observe that the graph O − N [ α, α ′ ] is still connected, so the existence ofclaimed walks follows easily. The notation is justified by interpreting these walks in the case when O isan asteroidal subgraph as subwalks of W := W , [ p, u ] ◦ u , v , u ◦ W , ◦ u , v , u ◦ W , ◦ . . . ◦ W k − , k ◦ u k , v k , u k ◦ W k, [ u k , q ] , where p and q are, respectively, the first vertex of W , , which is not in N [ u , v ] , and the last vertex of W k, , which is not in N [ u , v ] . Observation 17.
Let H be a bipartite graph with an obstruction O , let ( α, β ) ∈ C ( O ) .(a) There exist walks X , X ′ : α → β and Y , Y ′ : β → α , such that X avoids Y and Y ′ avoids X ′ .(b) If O is an asteroidal subgraph, let γ be the vertex in { u k +1 , v k +1 } in the same bipartition class as α, β ,and let c ∈ { α, β, γ } . Then for any a, b , such that { a, b, c } = { α, β, γ } , there exist 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 .All walks use only vertices of O .Proof. Let us start with proving (a) in the case if O is either isomorphic to C or to C , recall that consec-utive vertices of such a cycle are denoted by w , w , . . . . We can also assume that α = w and β = w , asthe other case is symmetric.If O ≃ C , we set X := w , w , w , w , w X ′ := w , w , w , w , w , Y := w , w , w , w , w Y ′ := w , w , w , w , w . If O ≃ C , we set X = X ′ := w , w , w , w , w , Y = Y ′ := w , w , w , w , w . It is straightforward to verify that these walks satisfy the statement (a).15o from now on let us consider the case that O is an asteroidal subgraph, and, by symmetry, assumethat α = u and β = u . Then γ = u k +1 . Before we proceed to the proof of (a), let us define three auxiliarywalks A : u → u , B : u → u k +1 , and C : u → u , as follows. A := U ◦ U ◦ U ◦ U ◦ . . . ◦ U ◦ U , B := U ◦ W , k ◦ U k ◦ W k, k − ◦ . . . ◦ U k +2 ◦ W k +2 ,k +1 , C := W [ u , u k ] ◦ U k ◦ W k,k − ◦ U k − ◦ . . . ◦ W , ◦ U , where W [ u , u k ] is obtained from Observation 16 and by U i we mean a walk u i , v i , . . . , v i , u i of the ap-propriate length. Note that here we abuse the notation slightly, as the length of each U i might be dif-ferent. By Definition 4, we have that U i and W i + k,i + k +1 are non-adjacent, and so are sets { u , v } and { v , . . . , v k } ∪ S k − i =1 W i,i +1 . So it is straightforward to observe that A , B avoid C and C avoids A , B .In order to prove (a), we define X = X ′ := B ◦ U k +1 ◦ W [ u k +1 , u ] , Y = Y ′ := C ◦ W , ◦ U , where W [ u k +1 , u ] is given by Observation 16, and U i is defined as previously. Observe that these walksavoid each other because B and C avoid each other, the walk W , is non-adjacent to { u k +1 , v k +1 } , and W [ u k +1 , u ] is non-adjacent to { u , v } by Observation 16.Now let us show (b). Consider three cases. If c = u , then by symmetry assume that a = u , b = u k +1 ,and define X c := X ◦ U , Y c := X ◦ W [ u , u k +1 ] , Z c := Y ◦ U , where walks X , Y are given by statement (a) and W [ u , u k +1 ] is given by Observation 16. Note that incase of asteroidal subgraph we have X = X ′ and Y = Y ′ , and therefore X , Y avoid each other.If c = u , then assume that a = u , b = u k +1 and can observe that our auxiliary walks A , B , C alreadysatisfy the statement of the lemma. Indeed, is it sufficient to set X c := A , Y c := B , Z c := C . Finally, for c = u k +1 and a = u , b = u , we can define X c := U ◦ U , Y c := U ◦ W , , Z c := W [ u , u k +1 ] ◦ U k +1 , where W [ u , u k +1 ] is given by Observation 16. This completes the proof. In order to prove Theorem 11 we will use several gadgets.16 .2.1 Building gadgets from walks.
First, let us show how we will use walks to create gadgets. For a set D = {D i } ki =1 of walks of equal length ℓ > , let P ( D ) be a path with ℓ + 1 vertices p , . . . , p l +1 , such that the list of p i is D ( i ) , i.e., the set of i -th vertices of walks in D . The vertex p will be called the input vertex and p ℓ +1 will be called the outputvertex . Lemma 18.
Let D = {D i } ki =1 be a set of walks of equal length ℓ > , such that D i is an s i - t i -walk. 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 avoidsevery walk in B . Then P ( D ) with the input vertex x and the output vertex y has the following properties:(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 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 f : P ( D ) → H , if f ( x ) ∈ S ( B ) , then f ( y ) / ∈ T ( A ) .Proof. For i ∈ [ k ] , let d ij denote the j -th vertex of D i , and denote consecutive vertices of P ( D ) by x = p , p , . . . , p ℓ +1 = y . The statement (a) follows directly from the definition of lists in P ( D ) . For (b),consider any i ∈ [ k ] and define f i ( p j ) := d ij for j ∈ [ ℓ + 1] . Observe that f i is indeed a list homomorphism P ( D ) → H since for every edge p j p j +1 of P ( D ) it holds that f i ( p j ) and f i ( p j +1 ) are consecutive vertices d ij and d ij +1 of the walk D i and thus they are adjacent in H . Moreover, clearly f i ( x ) = s i and f i ( y ) = t i .To show (c), suppose there exists a list homomorphism f : P ( D ) → H such that f ( p ) ∈ S ( A ) and f ( p ℓ +1 ) ∈ T ( B ) . Let i ∈ [ ℓ + 1] be the minimum integer such that there exists a walk D r in B with f ( p i ) = d ri . Note that it exists since f ( p ℓ +1 ) ∈ T ( B ) . Moreover, i > since f ( p ) ∈ S ( A ) and S ( A ) ∩ S ( B ) = ∅ . By minimality of i we have that f ( p i − ) = d si − for some D s ∈ A . Thus there is a walk D s ∈ A and a walk D r ∈ B , such that D s does not avoid D r , a contradiction. Similarly, we can show theproperty (d) by switching the roles of A and B .For two gadgets P = P ( D ) and P ′ = P ( D ′ ) , such that the list of the output vertex of P is the sameas the list of the input vertex of P ′ , the composition of P and P ′ is gadget P ′′ obtained by identifying theoutput vertex of P and the input vertex of P ′ . The input and the output vertex of P ′′ are, respectively, theinput vertex of P and the output vertex of P ′ . Let H be an undecomposable, bipartite graph with an obstruction O . We will show that the structure of O is sufficiently rich to express some basic relations.For a k -ary relation R k ⊆ V ( H ) k , by an R k -gadget we mean a graph F with H -lists L and k specifiedvertices v , v , . . . , v k , called interface , such that for every i ∈ [ k ] it holds that { f ( v ) f ( v ) . . . f ( v k ) | f : ( F, L ) → H } = R k . In other words, the set of all possible colorings of the interface vertices that can be extended to a list H -coloring of the whole gadget is precisely the relation we are expressing. In the definition of an R k -gadgetwe do not insist that interface vertices are pairwise different.Let ( α, β ) ∈ C ( O ) . To make the definitions more intuitive, let us assign logic values to vertices α, β in the following way: α will be interpreted as false, and β will be interpreted as true. First, we need to17xpress a k -ary relation OR k = { α, β } k − { α k } and a binary relation NAND = { αα, αβ, βα } . Notethat the relations OR k and NAND are symmetric with respect to interface vertices. Lemma 19.
Let H be a bipartite graph with an obstruction O and let ( α, β ) ∈ C ( O ) . For every k > thereexists an OR k -gadget, and a NAND -gadget.Proof. First, notice that for any k > , the relation OR k can be expressed using a binary relation NEQ = { αβ, βα } and ternary OR . Indeed, note that an OR k -gadget with interface vertices x , x , . . . , x k can beeasily constructed by introducing an OR k − -gadget with interface vertices x , x , . . . , x k − , y , an OR -gadget with interface vertices y ′ , x k − , x k , and a NEQ -gadget with interface vertices y, y ′ (this correspondsto the textbook NP-hardness reduction from Sat to [27, Sec. 3.1.1.]).Let X , Y , X ′ , Y ′ be the walks given by Observation 17. Let P ( {X , Y} ) be the path obtained by ap-plying Lemma 18 for A = {X } and B = {Y} , and let P ( {X ′ , Y ′ } ) be the path obtained by applyingLemma 18 for A = {Y ′ } and B = {X ′ } . It is straightforward to observe that the graph obtained by identi-fying the first vertex of P ( {X , Y} ) with the first vertex of P ( {X ′ , Y ′ } ) , and the last vertex of P ( {X , Y} ) with the last vertex of P ( {X ′ , Y ′ } ) , is a NEQ -gadget (whose interface are the identified vertices). So, inorder to prove the lemma, we need to build gadgets for binary relations OR , NAND , and the ternaryrelation OR .Observe that an OR -gadget can be obtained by identifying two of three interface vertices of an OR -gadget. Thus it is sufficient to show how to construct an OR -gadget and a NAND -gadget. Let us firstfocus on constructing OR .By symmetry of O , we can assume that α = w , β = w if O is either an induced 6-cycle or an induced8-cycle, or α = u , β = u if O is an asteroidal subgraph. Set γ = w in the former case, or γ = u k +1 inthe latter one.The high-level idea is to construct, for every triple a, b, c , such that { a, b, c } = { α, β, γ } , an R ( c ) -gadget for the relation R ( c ) = { αa, αb, βα, ββ, βγ } . This gadget will be called P c , and its interfacevertices will be x and y , where L ( x ) = { α, β } and L ( y ) = { α, β, γ } .Suppose we have constructed graphs P α , P β , and P γ . Let x , x , x , respectively, be their x -vertices.Consider a graph G obtained by identifying the y -vertices of P α , P β , and P γ to a single vertex y . Thelists of vertices remain unchanged, note that all y -vertices have the same list { α, β, γ } , so identifying thevertices does not cause any conflict here. Obviously we have L ( x ) = L ( x ) = L ( x ) = { α, β } .Observe it is not possible to map all x , x , x to α . However, every triple of colors from { α, β } −{ ααα } might appear on vertices x , x , x in some list homomorphism from G to H . Thus the graph G satisfies the definition of an OR -gadget, whose interface vertices are x , x , x . So let us show how toconstruct P c for every c ∈ { α, β, γ } .If O is isomorphic to C or C , then the construction is straightforward and it is shown on Figure 1 (thepicture shows OR -gadgets, with y -vertices of P c ’s already identified). For the case if O is an asteroidalsubgraph, the construction will be quite similar, but a bit more involved.First, let us build an auxiliary gadget. Recall walks W [ u , u k +1 ] and W [ u k +1 , u ] given by Observation 16,and consider the following walks of equal length: A := u , v , . . . , u ◦ u , v , . . . , u , B := W [ u , u k +1 ] ◦ W [ u k +1 , u ] , B := W [ u , u k +1 ] ◦ u k +1 , v k +1 , . . . , u k +1 . 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 1: An OR -gadget for O ≃ C (left) and for O ≃ C (right). Recall that the consecutive vertices of O are denoted by ( w , w , . . . ) . The sets next to vertices indicate lists. Interface vertices are marked gray. P ( {A , B , B } ) P ( {A , A , B} ) P ( {X c , Y c , Z c } ) u u u u u k +1 u u u k +1 u u u u abc { u , u } { u , u ,u k +1 } { u , u } { a, b, c } Figure 2: The R ( c ) -gadget P c as a composition of gadgets P ( {A , B , B } ) , P ( {A , A , B} ) , and P ( {X c , Y c , Z c } ) . Blue lines denote possible mappings of a pairs of colors that might appear in the inputand the output vertex of each gadget.Note that A is non-adjacent to B , B . Moreover, define A := u , v , . . . , u , ◦ u , v , . . . , u , A := W , ◦ u , v , . . . , u , B := u k +1 , v k +1 , . . . , u k +1 ◦ W [ u k +1 , u ] , and note that A , A are non-adjacent to B . Thus, by Lemma 18 we obtain that the graph F , which is acomposition of P ( {A , B , B } ) and P ( {A , A , B} ) , is a { u u , u u , u u } -gadget.Now, suppose we are given a, b, c , such that { a, b, c } = { u , u , u k +1 } . Let X c : u → a , Y c : u → b ,and Z c : u → c be the walks given by Observation 17, recall that X c , Y c avoid Z c and Z c avoids X c , Y c .Consider the graph P ( {X c , Y c , Z c } ) , obtained by applying Lemma 18 for A = {X c , Y c } and B = {Z c } and recall that it is a { u a, u b, u c } -gadget. Now it is straightforward to observe that the compositionof F and P ( {X c , Y c , Z c } ) is an R ( c ) -gadget P c (see Figure 2). This concludes the construction of the OR -gadget. 19inally, observe that NAND can be obtained by composition of a NEQ -gadget, an OR -gadget (withone interface vertex as input and the other one as output), and a NEQ -gadget.
Now let us introduce another gadget, which will be the main tool used in our hardness proof.
Definition 7 (Distinguisher).
Let S be an incomparable set in H and let ( α, β ) ∈ C ( O ) , such that { α, β } ∪ S is contained in one bipartition class of H . Let a, b ∈ S . A distinguisher gadget is a graph D a/b with two specified vertices 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 ) = β .Distinguisher gadgets will be constructed using the following lemma, whose proof is postponed toSection 3.4. Lemma 27.
Let H be a connected, bipartite, undecomposable graph, let O be an obstruction in H and let ( α, β ) ∈ C ( O ) . Let S be an incomparable set of k > vertices of H , contained in the same bipartition classas α, β . Let a and b be two distinct vertices of S . For each v ∈ S there exists a walk D v , of length at least two,satisfying the following properties:(1) for each v ∈ S , D v is a v - α -walk or a v - β -walk,(2) D a is an a - α -walk and D b is a b - β -walk,(3) for each u, v ∈ S , such that D u : u → α and D v : v → β , we have that D u avoids D v .In particular, all walks have equal length. By Lemma 18, the existence of distinguisher gadgets follows directly from Lemma 27 applied for A being the set of walks terminating at α , and B being the set of walks terminating at β . Corollary 20.
Let H be an undecomposable bipartite graph with an obstruction O and let ( α, β ) ∈ C ( O ) .Let S be an incomparable set in H contained in the same bipartition class as α, β , such that | S | > . Thenfor every pair ( a, b ) of distinct elements of S there exists a distinguisher D a/b . (cid:3) Suppose we are able to construct all gadgets mentioned above. The following lemma shows how to con-struct the main gadget, which will encode the inequality relation on an incomparable set S . Formally, by NEQ( S ) ⊆ S we denote the relation on S , such that ss ′ ∈ NEQ( S ) if and only if s = s ′ . Lemma 4 (Constructing a
NEQ( S ) -gadget). Let H be a connected, bipartite, undecomposable graph, whosecomplement is not a circular-arc graph. Let S be an incomparable set of k > vertices of H , contained in onebipartition class. Then there exists a NEQ( S ) -gadget, i.e., a graph F with H -lists L and two special vertices x, x ′ ∈ V ( F ) , such that L ( x ) = L ( x ′ ) = S and• for any list homomorphism h : ( F, L ) → H , it holds that h ( x ) = h ( x ′ ) ,• for any distinct s, s ′ ∈ S there is a list homomorphism h : ( F, L ) → H , such that h ( x ) = s and h ( x ′ ) = s ′ . i c i D v i /v D v i /v k D v i /v i − D v i /v i +1 OR k x x ′ c c ′ c k c ′ k I I ′ I I k I ′ I ′ k NAND NAND Figure 3: The graph I i with special vertices x i and c i (left) and NEQ( S ) -gadget with interface vertices x, x ′ (right). Proof.
Let O be an obstruction in H and consider ( α, β ) ∈ C ( O ) , such that α, β and the elements of S are in the same bipartition class of H . We denote the vertices of S by v , v , . . . , v k . We will construct ourgadget in three steps. Step I.
In this step we will show that for every i ∈ [ k ] we can construct a graph I i with two specialvertices x i and c i and H -lists L , satisfying the following properties. • L ( x i ) = S and L ( c i ) = { α, β } , • for every list homomorphism ϕ : ( I i , L ) → H , if ϕ ( x i ) = v i , then ϕ ( c i ) = β , • for every j = i there exists a list homomorphism ϕ j : ( I i , L ) → H such that ϕ j ( x i ) = v j and ϕ j ( c i ) = α .Let us fix any i ∈ [ k ] . For every j ∈ [ k ] − { i } we call Corollary 20 for S, ( α, β ), and a = v i , b = v j to construct a distinguisher gadget D v i /v j with the input x i,j and the output y i,j . We identify the vertices x i,j , for all feasible j , to a single vertex x i , and introduce a new vertex c i . Then we use Lemma 19 toconstruct an OR k gadget and identify its k interface vertices with distinct elements of { c i } ∪ { y i,j } j = i .This completes the construction of I i (see Figure 3, left).Recall that the properties of the OR k -gadget imply that every list homomorphism from I i to H maps atleast one of vertices in { c i } ∪ { y i,j } j = i to β . By the property (D5.) in Definition 7, for any ϕ : ( I i , L ) → H with ϕ ( x i ) = v i , and for every j = i it holds that ϕ ( y i,j ) = α . This in turn forces ϕ ( c i ) = β .On the other hand, by properties (D2.), (D3.), and (D4.), for any j = i there is a homomorphism ϕ j : ( I i , L ) → H , such that ϕ j ( x i ) = v j and ϕ ( y i,j ) = β , which allows us to set ϕ j ( c i ) = α . So I i satisfies all desired properties. Step II.
In this step we will construct a graph I with H -lists L and special vertices x, c , . . . , c k , satisfyingthe following properties. • L ( x ) = S and L ( c i ) = { α, β } for every i ∈ [ k ] , • for every list homomorphism ϕ : ( I, L ) → H , if ϕ ( x ) = v i , then ϕ ( c i ) = β . • for every i ∈ [ k ] there exists a list homomorphism ϕ i : ( I, L ) → H , such that ϕ i ( x ) = v i and ϕ i ( c i ) = β , and ϕ i ( c j ) = α for every j ∈ [ k ] − { i } .The graph I is constructed by introducing k gadgets I , . . . , I k , and identifying the vertices x , . . . , x k into a single vertex x (see Figure 3, right). The desired properties of I follow directly from properties of I i ’s. 21 tep III. Finally, we can construct a
NEQ( S ) -gadget. We introduce two copies of the gadget from theprevious step, call them I and I ′ (we will use primes to denote the appropriate vertices of I ′ ). For each i ∈ [ k ] , we introduce a NAND -gadget and identify its interface vertices with vertices c i and c ′ i (seeFigure 3, right). Let us call such constructed graph F . We claim that F is a NEQ( S ) -gadget, whoseinterface vertices are x and x ′ .Clearly, L ( x ) = L ( x ′ ) = S . Suppose that ϕ : ( F, L ) → H is a list homomorphism such that ϕ ( x ) = ϕ ( x ′ ) = v i . Then, by definition of I , we have ϕ ( c i ) = ϕ ( c ′ i ) = β , but this is impossible due to theproperties of the NAND -gadget joining c i and c ′ i .On the other hand, let us choose any distinct v i , v j ∈ S . We can color I according to the homomor-phism ϕ i , and I ′ according to the homomorphism ϕ j (both ϕ i and ϕ j are defined in Step II). In particularthis means that x is mapped to v i , x ′ is mapped to v j , c i and c ′ j are mapped to β , and all other vertices in { c , . . . , c k } ∪ { c ′ , . . . , c ′ k } are mapped to α . Since i = j , by the definition of a NAND -gadget, we canextend such defined mapping to all vertices of F . This completes the proof of the lemma.Now, equipped with Lemma 4, we can easily prove Theorem 11. Proof of Theorem 11.
Recall that H is an undecomposable bipartite graph, whose complement is not acircular-arc graph. Let S be the largest incomparable set in H , contained in one bipartition class. Let k = | S | , i.e., k = i ( H ) .Observe that since the complement of H is not a circular-arc graph, we have that k > . Indeed, recallthat H contains an obstruction, which is either an induced C , an induced C , or an asteroidal subgraph.Observe that all vertices from one bipartition class of C or C form an incomparable set of size at least3. On the other hand, recall that a special edge asteroid contains at least three independent edges, so theirappropriate endvertices form the desired incomparable set.We reduce from k - Coloring , let G be an instance. Clearly we can assume that G is connected and hasat least 3 vertices. We will construct a graph G ∗ with H -lists L and the following properties:(a) ( G ∗ , L ) → H if and only if G is k -colorable,(b) the number of vertices of G ∗ is at most g ( H ) · | E ( G ) | for some function g of H ,(c) the pathwidth of G ∗ is at most g ( H ) + pw( G ) ,(d) G ∗ can be constructed in time ( | V ( G ) | ) O (1) · g ′ ( H ) for some function g ′ .Observe that this will be sufficient to prove the theorem. Indeed, suppose that for some ε > wecan solve LHom ( H ) in time O ∗ (( k − ε ) t ) on instances of pathwidth t . Let us observe that applying thisalgorithm to G ∗ gives an algorithm solving the k - Coloring problem on G in time ( k − ε ) pw( G ∗ ) · | V ( G ∗ ) | O (1) ( k − ε ) pw( G )+ g ( H ) · ( g ( H ) · | E ( G ) | ) O (1) = ( k − ε ) pw( G ) · | V ( G ) | O (1) , where the last step follows since | H | is a constant. Recall that by Theorem 1’, the existence of such analgorithm for k - Coloring contradicts the SETH.We start the construction of G ∗ with the vertex set of G . The lists of these vertices are set to S . Then,for each edge uv of G , we introduce a copy F uv of the NEQ( S ) -gadget introduced in Lemma 4. We identifythe interface vertices of this gadget with u and v , respectively. This completes the construction of G ∗ . Letus show that it satisfies the properties (a)–(d).Note that (a) follows directly from Lemma 4. Indeed, consider an edge uv of G . On one hand, for everylist homomorphism f : ( G ∗ , L ) → H we have that f ( u ) = f ( v ) . On the other hand, mapping u and v toany distinct vertices from S can be extended to a homomorphism of the whole graph F uv .To show (b), recall that the number of vertices of each F uv depends only on H , let it be g ( H ) . Everyoriginal vertex of G belongs to some gadget in G ∗ , so G ∗ contains at most g ( H ) · | E ( G ) | vertices.22ext, consider a path decomposition T of G of width pw( G ) , let the consecutive bags be X , X , . . . , X ℓ .We extend T to a path decomposition T ∗ of G ∗ as follows: for every edge uv in G we choose one bag X i such that u, v ∈ X i , and we add a new bag X ′ i = X i ∪ V ( F ) , which becomes the immediate succes-sor of X i . We repeat this for every edge, making sure that for X i we can only choose the original bagscoming from T . Note that it might happen that we will insert several new bags in a row, if the same X i was chosen for different edges, but this is not a problem. Is it straightforward to observe that T ∗ is a pathdecomposition of G ∗ , and the width of T ∗ is at most g ( H ) + pw( G ) . This proves (c).Finally, it is straightforward to observe that the construction of G ∗ was performed in time polynomialin G (recall that we treat H as a constant-size graph). In this section we show how to construct distinguisher gadgets, which were the main technical tool usedin the proof of Theorem 11.
Intuitively, we aim to show that for any two incomparable vertices s, v , and a third vertex t , we can eitherconstruct walks from s to t and from v to v , or walks from v to t and from s to s , which satisfy certainavoiding conditions. However, due to some corner cases, the actual statement of the lemma is much morecomplicated. Lemma 21.
Let H be a bipartite graph with bipartition classes X and Y . Let s, v ∈ X be incomparablevertices and let s ′ ∈ N ( s ) − N ( v ) , v ′ ∈ N ( v ) − N ( s ) . Let S ⊆ N ( s, s ′ , v, v ′ ) be non-empty. Let U be theset of vertices reachable from { s, v } in H − S . We also assume that H has no decomposition ( D, N, R ) suchthat { s, v, s ′ , v ′ } ⊆ D and S ⊆ N . Then there is y ∈ S and x ∈ U (both in the same bipartition class) andtwo pairs of walks of length at least one:1. A , A ′ : s → y and B , B ′ : v → x , or2. A , A ′ : v → y and B , B ′ : s → x ,such that A avoids B , B ′ avoids A ′ . Moreover, for every i it holds that {A , B} ( i ) S and all four walks areentirely contained in S ∪ U .Furthermore one of the following holds:a) x ∈ { v, v ′ } in case (1.) and x ∈ { s, s ′ } in case (2.), orb) walks B , B ′ are entirely contained in U .Proof. We split the proof into three cases.
Case 1: There exists a ∈ N ( s, v ) and b ∈ S X such that ab / ∈ E ( H ) . By symmetry assume that a ∈ N ( s ) . If b ∈ N ( v ′ ) , we set x = s, y = b , and define A = A ′ = v, v ′ , b and B = s, s ′ , s, B ′ = s, a, s ,obtaining walks as in the statement (2.a). On the other hand, if b / ∈ N ( v ′ ) , then necessarily b ∈ N ( s ′ ) .Then we take x = v, y = b , and define A = A ′ = s, s ′ , b, and B = B ′ = v, v ′ , v , which satisfy statement(1.a). Case 2: There exists a ∈ S Y and b ∈ N ( s ′ , v ′ ) such that ab / ∈ E ( H ) . By symmetry assume that b ∈ N ( s ′ ) . If a ∈ N ( v ) , then we set x = s ′ , y = a , and define A = v, a , B = s, s ′ , A ′ = v, v ′ , v, a , and B ′ = s, s ′ , b, s ′ , obtaining statement (2.a). On the other hand, if a / ∈ N ( v ) , then a ∈ N ( s ) . In this case wetake x = v ′ , y = a , and define A = A ′ = s, a and B = B ′ = v, v ′ , obtaining statement (1.a).23 ase 3: S is bipartite-complete to N [ s, s ′ , v, v ′ ] . Note that this implies that H [ S ] is a biclique.Let K Y (resp. K X ) be the set of all vertices w in U Y (resp. U X ) such that there exists s w ∈ S X (resp. S Y )such that ws w / ∈ E ( H ) . Since H has no decomposition ( D, N, R ) such that s, v, s ′ , v ′ ∈ D and S ⊆ N ,we have that K := K X ∪ K Y = ∅ . Otherwise, U is bipartite-complete to S and there are no edges between U and H − ( S ∪ U ) , so (cid:0) U, S, V ( H ) − ( S ∪ U ) (cid:1) is a decomposition of H , a contradiction. Moreover, sincewe are in Case 3, we observe that K ∩ N [ s, v, s ′ , v ′ ] = ∅ . Let e S be a minimal { s, s ′ , v, v ′ } - K -separator in H [ U ] , contained in N ( s, v, s ′ , v ′ ) , and let e U be the set of vertices reachable from { s, s ′ , v, v ′ } in H [ U ] − e S .Note that e U ∪ e S is bipartite-complete to S .For contradiction, suppose that the lemma does not hold and H is a counterexample with the minimumnumber of vertices, i.e., for any graph H ′ with strictly fewer vertices and any choice of four vertices anda set, satisfying the assumptions of the lemma, the desired walks exist. Claim 21.1.
The graph H [ U ] , vertices s, s ′ , v, v ′ , and the set e S satisfy the assumptions of the lemma (wherethe role of S is played by e S ).Proof of Claim. Note that s, s ′ , v, v ′ ∈ U , which in particular implies that the vertices s, v are incomparablein H [ U ] . Also, the set e S is contained in N ( s, s ′ , v, v ′ ) ∩ U .Suppose that H [ U ] has a decomposition ( D, N, R ) , where { s, s ′ , v, v ′ } ⊆ D and e S ⊆ N . Since N isdisjoint with K , we know that N is bipartite-complete to S , implying that S ∪ N is a biclique.Hence, D is bipartite-complete to S ∪ N and there are no more vertices in H adjacent to D , so weobtained a decomposition ( D, N ∪ S, V ( H ) − ( D ∪ N ∪ S )) of H , such that s, s ′ , v, v ′ ∈ D and S ⊆ ( N ∪ S ) ,a contradiction. (cid:4) Since S = ∅ and S ⊆ V ( H ) − U , we obtain that H [ U ] has strictly fewer vertices than H . So, byminimality of H , there exist e x ∈ e U , e y ∈ e S and one of the following quadruples of walks: C , C ′ : s → e y and D , D ′ : v → e x (statement (1.)), or C , C ′ : v → e y and D , D ′ : s → e x (statement (2.)) , where C avoids D and D ′ avoids C ′ .Let us consider the first situation (statement (1.)), i.e., that we obtained walks C , C ′ : s → e y and D , D ′ : v → e x (the other one is symmetric).By minimality of e S there exists a walk P : e y → w , where w ∈ K and no vertex from P except e y is in e S . This means that no vertex from P , except for the first vertex, is adjacent to any vertex from e U , so, inparticular, w is non-adjacent to e x . Observe that since K ∩ e S = ∅ we must have |P| > . Let w • be thelast vertex of P ⊢ (recall that by P ⊢ we denote the walk P with the last vertex removed); note that we mayhave w • = e y .Let e x • be the last vertex of ( D ′ ) ⊢ . By Observation 12 applied to D ′ , C ′ we know that e x • is adjacent to e x and non-adjacent to e y . Moreover, since all vertices of D ′ are in e U ∪ e S , we note that e x • is adjacent to allvertices from the appropriate bipartition class of S .Now we will separately consider two subcases, depending whether the call for H [ U ] resulted in thestatement (1.a.) or (1.b.) Case 3 a): the call for H [ U ] resulted in the statement (1.a.). This means that e x ∈ { v, v ′ } and {C , D} ( i ) S for every i .If |P| = 1 , i.e., P = e y, w , then we set x = e y , y = s w , and define: A = D ′ ◦ e x, e x • , s w A ′ = D ◦ e x, e x • , s w B = C ′ ◦ e y, w, e y B ′ = C ◦ e y, w, e y. (1)24ote that s w ∈ S is adjacent to e x • ∈ e U ∪ e S , as in this case e y, e x, s w are in one bipartition class, while e x • isin the other one, and e U ∪ e S is bipartite-complete to S . Observe that the walks satisfy the condition in thestatement (2.b).So let us assume that |P| > , i.e., w • = e y . Define e x ′ in a way that { e x, e x ′ } = { v, v ′ } . We define walks R ′ = e x, e x • , e x ◦ e x, e x ′ , e x, . . . , e x ′′ R = e x, e x ′ , e x ◦ e x, e x ′ , e x, . . . , e x ′′ , such that |P| = |R| = |R ′ | , where e x ′′ is either e x or e x ′ (i.e., either v or v ′ ), depending on the parity of P .Note that e x ′′ is in the same bipartition class as w . We observe that P avoids R ′ : recall that e y is non-adjacentto e x • , and all other vertices of P are in U − ( e S ∪ e U ) , and thus they are non-adjacent to { v, v ′ } = { e x, e x ′ } .Moreover, the latter implies that R avoids P . We set x = w • , y = s w and: A = D ′ ◦ R ◦ e x ′′ , s w A ′ = D ◦ R ′ ◦ e x ′′ , s w B = C ′ ◦ P ◦ w, w • B ′ = C ◦ P ◦ w, w • . (2)Recall that e x ′′ ∈ { v, v ′ } ⊆ e U and as S is bipartite-complete to e U , we have that e x ′′ is adjacent to s w ∈ S .Moreover, we observe that A avoids B and B ′ avoids A ′ , as w • is in U − ( e S ∪ e U ) and thus is non-adjacentto e x ′′ ∈ e U . It is straightforward to verify that the constructed walks satisfy the statement (2.b). Case 3 b): the call for H [ U ] resulted in the statement (1.b.). If e x / ∈ { v, v ′ } , then D , D ′ are entirelycontained in e U , in particular e x, e x • ∈ e U . We define R = e x, e x • , e x, . . . , e x ′′ so that |R| = |P| , where e x ′′ iseither e x or e x • , depending on the parity of |P| . Note that P and R avoid each other, as e y is non-adjacentto e x • , and no vertex from P , except for e y , is adjacent to any vertex of e U .We set x = w • , y = s w and: A = D ′ ◦ R ◦ e x ′′ , s w , A ′ = D ◦ R ◦ e x ′′ , s w , B = C ′ ◦ P ◦ w, w • , B ′ = C ◦ P ◦ w, w • . (3)Similarly to the case of walks constructed in (2), we can observe that A avoids B and B ′ avoids A ′ . Notethat this works also for the case w • = e y , that is, if |P| = 1 . Then the walks from (3) are as follows: A = D ′ ◦ e x, e x • , s w , A ′ = D ◦ e x, e x • , s w , B = C ′ ◦ e y, w, e y, B ′ = C ◦ e y, w, e y, Finally, observe that in (3) we used only vertices from U (except s w ) and thus walks B , B ′ are entirelycontained in U , and for every i it holds that {A , B} ( i ) S . Thus we obtain the statement (2.b). of thelemma. Lemma 22.
Let H be an undecomposable, bipartite graph with bipartition classes X, Y and let s, v ∈ X beincomparable vertices. Let T ⊆ X be a nonempty set of some vertices reachable from at least one of s, v , andincomparable with both s, v . Then there exist t ∈ T and two pairs of walks:1. A , A ′ : s → t and B , B ′ : v → v , or2. A , A ′ : s → s and B , B ′ : v → t ,such that A avoids B and B ′ avoids A ′ .Proof. Since s and v are incomparable, there are v ′ ∈ N ( v ) − N ( s ) and s ′ ∈ N ( s ) − N ( v ) .25 ase 1: there exists t ∈ T and a vertex t ′ v ∈ N ( t ) − N ( v ) , which is adjacent to s . Let v ′ t ∈ N ( v ) − N ( t ) , it exists since v and t are incomparable. Then we can set: A = A ′ = s, t ′ v , t, B = v, v ′ , v and B ′ = v, v ′ t , v . It is straightforward to verify that A avoids B and B ′ avoids A ′ . The case that there is t ∈ T and t ′ s ∈ N ( t ) − N ( s ) , such that t ′ s v ∈ E ( H ) , is symmetric. Case 2: for every t ∈ T , every neighbor of t is either adjacent to both s, v or non-adjacent to both. Observe that this implies that T ∩ N ( s ′ , v ′ ) = ∅ : otherwise, if there is any t ∈ T adjacent to one of s ′ , v ′ , say s ′ , then s ′ must be adjacent to both s, v , which contradicts its definition. Let S be a minimal { s, v, s ′ , v ′ } - T -separator contained in N ( s, v, s ′ , v ′ ) and let U be the set of vertices reachable from { s, s ′ , v, v ′ } in H − S .Observe that the graph H , vertices s, s ′ , v, v ′ , and the set S satisfy the assumptions of Lemma 21. So, byLemma 21, there are y ∈ S and x ∈ U , and walks C , C ′ : s → y, D , D ′ : v → x (statement (1.)) or C , C ′ : v → y, D , D ′ : s → x (statement (2.)), such that C avoids D and D ′ avoids C ′ .Suppose that calling Lemma 21 resulted in statement (1.), i.e., the obtained walks are C , C ′ : s → y and D , D ′ : v → x (the other case is symmetric). Let x • be the last vertex on ( D ′ ) ⊢ , note that it is adjacent to x and, by Observation 12, non-adjacent to y . By minimality of S there is t ∈ T and a y - t -path P of lengthat least 1, whose every vertex, except for y , is in V ( H ) − ( S ∪ U ) . This implies that y is the only vertex of P with a neighbor in U . Let us consider two subcases. Case 2a: calling Lemma 21 resulted in statement (1.a).
This means that x ∈ { v, v ′ } . Let us define x ′ , such that { x, x ′ } = { v, v ′ } . If |P| > , we define R = x, x • , x, x ′ , x, . . . , v and R ′ = x, x ′ , . . . , v , suchthat |R| = |R ′ | = |P| . Recall that v and t are in the same bipartition class, so the last vertex of both walksis indeed v . Observe that P avoids R and R ′ avoids P , as x • is non-adjacent to y , and every vertex of P ,except y , is non-adjacent to every vertex of U , so, in particular, to { x, x ′ } = { v, v ′ } . We set: A = C ◦ P , A ′ = C ′ ◦ P , B = D ◦ R , B ′ = D ′ ◦ R ′ , which are walks as in the statement (1.). And if |P| = 1 , i.e. P = y, t , then x = v ′ since x, y are in the samebipartition class. We can define R = v ′ , x • , v ′ , v , R ′ = v ′ , v, v ′ , v and P ′ = y, t, t ′ , t , where t ′ is a vertexin N ( t ) − N ( s, v ) (note that it exists, since t is incomparable with s, v and every vertex in N ( t ) ∩ N ( s, v ) is adjacent to both s, v by the definition of Case 2). Note that R ′ avoids P ′ and P ′ avoids R . We set: A = C ◦ P ′ , A ′ = C ′ ◦ P ′ , B = D ◦ R , B ′ = D ′ ◦ R ′ , and obtain walks as in the statement (1.). Case 2b: calling Lemma 21 resulted in statement (1.b).
This means that walks D , D ′ are entirelycontained in U . Let t ′ be a neighbor of t such that t ′ / ∈ S Y , again it exists in this case (recall that S Y ⊆ N ( s, v ) ). We set: A = C ◦ P ∗ , A ′ = C ′ ◦ P ∗ , B = D ◦ D ∗ , B ′ = D ′ ◦ D ∗ , where P ∗ := P ◦ t, t ′ , . . . , t and D ∗ := D ′ ◦ v, v ′ , . . . , v are defined in a way that |P ∗ | = |D ∗ | :=max( |P| , |D ′ | ) . Basically these walks play the same role as P and D ′ , but extra padding added to one of26hem ensures they have the same length. Observe that D ∗ is entirely contained in U and thus it avoids P ∗ whose only vertex adjacent to U is the first one. Moreover P ∗ avoids D ∗ , since the first vertex of P is y and it is non-adjacent to x • , which is the second vertex on D ∗ . Thus A avoids B and B ′ avoids A ′ and wehave obtained statement (1.). Lemma 23.
Let H be a bipartite, undecomposable graph with bipartition classes X, Y , let s, v ∈ X beincomparable vertices and let t ∈ X be a vertex reachable from at least one of s, v . Then there exist a vertex q ∈ X and two pairs of walks:1. P , P ′ : s → t and Q , Q ′ : v → q , or2. P , P ′ : s → q and Q , Q ′ : v → t ,such that P avoids Q and Q ′ avoids P ′ . Moreover, if t is incomparable with at least one of s, v then q = v inthe first case and q = s in the other.Finally, given a bipartite graph H , in time polynomial in | H | we can either find the desired walks or adecomposition of H .Proof. Observe that if t is incomparable with both s, v , we can obtain the desired walks by applyingLemma 22 for s, v , and T = { t } .Now let us assume that t is incomparable with exactly one of s, v , say v (the other case is symmetric) andlet t ′ v be a vertex in N ( t ) − N ( v ) and let v ′ t be a vertex in N ( v ) − N ( t ) . Since s and v are incomparable, thereare v ′ s ∈ N ( v ) − N ( s ) and s ′ v ∈ N ( s ) − N ( v ) . Since t is comparable with s , we either have N ( t ) ⊆ N ( s ) or N ( s ) ⊆ N ( t ) . If N ( t ) ⊆ N ( s ) , we observe that t ′ v must be adjacent to s , and v ′ s must be non-adjacentto t since v ′ s / ∈ N ( s ) . Then we set q = v , P = P ′ = s, t ′ v , t , and Q = Q ′ = v, v ′ s , v . On the other hand,if N ( s ) ⊆ N ( t ) , we observe that s ′ v must be adjacent to t and v ′ t must be non-adjacent to s . Then we set q = v , P = P ′ = s, s ′ v , t , and Q = Q ′ = v, v ′ t , v .So from now we can assume that t is comparable with both s, v . Observe that it implies that either N ( s, v ) ⊆ N ( t ) , or N ( t ) ⊆ N ( s ) ∩ N ( v ) . Note that the other cases are not possible: if we have, say, N ( v ) ⊆ N ( t ) and N ( t ) ⊆ N ( s ) , then N ( v ) ⊆ N ( s ) , a contradiction. Observe that if there is s ′ ∈ N ( s ) − N ( v ) and v ′ ∈ N ( v ) − N ( s ) , such that t is adjacent to at least one of s ′ , v ′ , then we can set S := { t } ⊆ N ( s, s ′ , v, v ′ ) and, by the assumption of H , it has no decomposition. Thus we can callLemma 21 for vertices s, s ′ , v, v ′ and the set S = { t } . Since t is the only vertex of S , we obtain a vertex q , reachable from { s, v } in H − { t } , and walks P , P ′ : s → t and Q , Q ′ : v → q , or Q , Q ′ : v → t and P , P ′ : s → q , such that P avoids Q and Q ′ avoids P ′ .So it only remains to consider the case in which t is non-adjacent to every vertex in (cid:0) N ( s ) − N ( v ) (cid:1) ∪ (cid:0) N ( v ) − N ( s ) (cid:1) . Choose arbitrary s ′ ∈ N ( s ) − N ( v ) and v ′ ∈ N ( v ) − N ( s ) . Observe that by the casewe are considering, we have N ( t ) ⊆ N ( s ) ∩ N ( v ) , which implies that N ( t ) ⊆ N ( s, s ′ , v, v ′ ) . We callLemma 21 for H , vertices s, s ′ , v, v ′ , and the set S = N ( t ) . We obtain vertices y ∈ N ( t ) and x ∈ U ,where U is the set of vertices reachable from { s, v } in H − S , and walks A , A ′ : s → y, B , B ′ : v → x or A , A ′ : v → y, B , B ′ : s → x of length at least one, such that A avoids B and B ′ avoids A ′ . Let q be thelast vertex on ( B ′ ) ⊢ – it is adjacent to x and non-adjacent to y . We also have that x is non-adjacent to t ,since all neighbors of t are in S . If we obtain walks A , A ′ : s → y, B , B ′ : v → x then we set: P = A ◦ y, t, P ′ = A ′ ◦ y, t, Q = B ◦ x, q, Q ′ = B ′ ◦ x, q, and if we obtain walks A , A ′ : v → y, B , B ′ : s → x , then we set: P = B ′ ◦ x, q, P ′ = B ◦ x, q, Q = A ′ ◦ y, t, Q ′ = A ◦ y, t.
27t is straightforward to verify that in both cases P avoids Q and Q ′ avoids P ′ . The proof, as well asthe proofs of Lemma 21 and Lemma 22, are clearly constructive, so the claim about the polynomial-timealgorithm follows easily. Now we will introduce several lemmas about how our walks reach the obstruction.
Lemma 24.
Let H be an undecomposable, bipartite graph with an obstruction O . Let ( α, β ) ∈ C ( O ) , andlet s be a vertex reachable from O , which belongs to the same bipartition class as β but is incomparable withit. Then there exist walks A , A ′ : s → α and B , B ′ : β → β , such that A avoids B and B ′ avoids A ′ .Proof. We use Lemma 23 for s = α , v = β , and t = s to obtain walks P , P ′ : α → s and Q , Q ′ : β → β or P , P ′ : α → α and Q , Q ′ : β → s , such that P avoids Q and Q ′ avoids P ′ . In the first case, it is enoughto take A = P ′ , B = Q ′ , A ′ = P , B ′ = Q , and we are done. In the second case, we use Lemma 23 again,now for s = s , v = β and t = α and obtain walks R , R ′ : s → α and S , S ′ : β → β or R , R ′ : s → s and S , S ′ : β → α , such that R avoids S and S ′ avoids R ′ . In the first case, we are done, as these are thewalks we are looking for. In the second case we set A = R ◦ Q ◦ Y ′ , A ′ = R ′ ◦ Q ′ ◦ Y , B = S ◦ P ◦ X ′ , B ′ = S ′ ◦ P ′ ◦ X , where X , X ′ : α → β and Y , Y ′ : β → α are obtained by Observation 17.In the next proof some constructions will depend on the bipartition class of a particular vertex. Toavoid considering cases separately, for two non-necessarily distinct vertices u and u ′ , such that u ′ ∈ N [ u ] ,we introduce a walk E [ u, u ′ ] := ( u, u ′ if uu ′ ∈ E ( H ) ,u if u = u ′ . Note that if sets { u, u ′ } and { v, v ′ } are non-adjacent (again, it might be that u = u ′ or v = v ′ ), thenthe walks E [ u, u ′ ] and E [ v, v ′ ] are clearly non-adjacent. Lemma 25.
Let H be a bipartite graph with an obstruction O . Let ( α, β ) ∈ C ( O ) and let s ∈ V ( H ) be avertex reachable from O , which belongs to the same bipartition class as α, β . Assume that N ( s ) − N ( β ) = ∅ and dist( N [ s ] − N ( β ) , O ) . Then one of the following exists:1. walks P : α → α, Q : s → α and R : β → β , such that P , Q avoid R ,2. walks P : α → α, Q : s → β and R : β → β , such that P avoids Q , R .Proof. Let α ′ , β ′ be the pair of vertices, such that C ( O ) = { ( α, β ) , ( α ′ , β ′ ) } .By Definition 6 recall that edges αα ′ and ββ ′ are independent. First, we consider some simple specialcases separately. If sβ ′ ∈ E ( H ) , we obtain the statement (2.) by setting P = α, α ′ α, Q = s, β ′ , β, R = β, β ′ , β. β ′ α ′ β αβ α ′ β ′ Figure 4: The position of elements of C ( O ) when O is isomorphic to C (left) of C (right). Gray verticesindicate the possible position of vertices p and r in the Case 2 of the proof of Lemma 25.If now sβ ′ E ( H ) and there exists s ′ ∈ N ( s ) − N ( β ) such that αs ′ ∈ E ( H ) (in particular when s isadjacent to α ′ ), then we obtain the statement (1.) by setting P = α, α ′ , α, Q = s, s ′ , α, R = β, β ′ , β. So assume that the cases above do not apply. Let us fix any s ′ ∈ N ( s ) − N ( β ) for which dist( { s, s ′ } , O ) .Note that the edges αα ′ , ββ ′ , and ss ′ are independent. Case 1: there exists p ∈ N [ s, s ′ ] ∩ V ( O ) such that p N ( α, α ′ ) . Clearly p
6∈ { α, α ′ , β, β ′ } , asotherwise edges αα ′ , ββ ′ , ss ′ would not be independent. Note that this implies that this case cannot occurif O is isomorphic to C , see Figure 4 (left). Let s be an element of { s, s ′ } which is a neighbor of p . Recallthat since p, β N [ α, α ′ ] , by Observation 16, there exists a p - β -walk W [ p, β ] , which is non-adjacent to { α, α ′ } . We define: P := α, α ′ , . . . , α, Q := E [ s, s ] ◦ s, p ◦ W [ p, β ] , R := β, β ′ , . . . , β, in a way that |P| = |R| = |Q| . Clearly P avoids R . Moreover, P avoids Q since s, s ′ , p N [ α, α ′ ] and W [ p, β ] is non-adjacent to { α, α ′ } . Thus we obtain the statement (2.). Case 2: N [ s, s ′ ] ∩ V ( O ) ⊆ N ( α, α ′ ) . It implies that dist( { s, s ′ } , O ) = 1 , as if { s, s ′ } ∩ V ( O ) = ∅ , then { s, s ′ } and { α, α ′ } would be adjacent. So there exists p ∈ N ( s, s ′ ) ∩ V ( O ) ∩ N ( α, α ′ ) . Again, let s be anelement of { s, s ′ } which is a neighbor of p and let { α, α ′ } := { α, α ′ } such that αp ∈ E ( H ) .Note that if p N ( β, β ′ ) , we can set P := α, α ′ , . . . , α, Q := E [ s, s ] ◦ s, p, α ◦ E [ α, α ] R := β, β ′ , . . . , β. in a way that |P| = |R| = |Q| . Then P , Q avoid R and we get the statement (2.). Observe that if O isisomorphic to C , then the above case applies; see Figure 4 (right).So we can assume that p ∈ N ( s, s ′ ) ∩ N ( α, α ′ ) ∩ N ( β, β ′ ) . Let { β, β ′ } := { β, β ′ } , such that βp ∈ E ( H ) .If O is isomorphic to C , then let r be the other vertex of O which belongs to N ( α, α ′ ) ∩ N ( β, β ′ ) ( r is29niquely determined, see Figure 4 (left)). As pr E ( H ) , we define the walks that satisfy the statement(1.): P := E [ α, α ] ◦ α, p, α, α ′ ◦ E [ α ′ , α ] Q := E [ s, s ] ◦ s, p, α, α ′ ◦ E [ α ′ , α ] , R := E [ β, β ] ◦ β, β ′ , r, β ′ ◦ E [ β ′ , β ] . So finally consider the case that O is an asteroidal subgraph. We use the notation introduced inDefinition 4. Then p ∈ W ,i for some i ∈ { , k } , as all other vertices of O are non-adjacent to α . Let { κ, κ ′ } = { u k +1 , v k +1 } if i = 1 or { κ, κ ′ } = { u k , v k } if i = 2 k , where κ ′ and p are in the same bipartitionclass. Note that by the definition of a special edge asteroid we know that the walk W ,i , and in particular p , is non-adjacent to { κ, κ ′ } . Recall that the walk W [ β, κ ] given by Observation 16 is non-adjacent to { α, α ′ } = { u , v } . So, since we are in Case 2, we observe that s and s ′ are non-adjacent to { κ, κ ′ } and to W [ β, κ ] , as otherwise we would have chosen p ∈ { κ, κ ′ } ∪ W [ β, κ ] , such that p ∈ N [ s, s ′ ] ∩ V ( O ) and p / ∈ N ( α, α ′ ) , ending up in Case 1. We set P := α, α ′ , . . . , α ◦ E [ α, α ] ◦ α, α ′ , α ◦ E [ α, α ] ◦ α, α ′ , . . . , α, Q := s, s ′ , . . . , s ◦ E [ s, s ] ◦ s, p, α ◦ E [ α, α ] ◦ α, α ′ , . . . , α, R := W [ β, κ ] ◦ κ, κ ′ , κ ◦ W [ κ, β ] , so that the lengths of the subwalks in each aligned column are equal. Clearly, R is non-adjacent with both P and Q , so we obtain the statement (1). Lemma 26.
Let H be a connected, undecomposable, bipartite graph with an obstruction O , let ( α, β ) ∈ C ( O ) and let s ∈ V ( H ) be a vertex reachable from O , which belongs to the same bipartition class as β , butincomparable with it. Then at least one of the following exists:1. walks P : α → α, Q : s → α and R : β → β , such that P , Q avoid R ,2. walks P : α → α, Q : s → β and R : β → β , such that P avoids Q , R .Proof. Let α ′ , β ′ be the pair of vertices, such that C ( O ) = { ( α, β ) , ( α ′ , β ′ ) } . Let X, Y be the bipartitionclasses of H , such that α, β ∈ X and α ′ , β ′ ∈ Y . If dist( N [ s ] − N ( β ) , O ) , we are done by Lemma 25.Thus let us assume that dist( N [ s ] − N ( β ) , O ) > . Fix any s ′ ∈ N ( s ) − N ( β ) and observe that edges αα ′ , ββ ′ and ss ′ are independent. Let P be the minimal s - O -separator contained in N ( O ) . Let R be theset of vertices reachable from s in H − P and let Q be the set of vertices reachable from α, β in H − P .Note that V ( O ) ⊆ Q and s ′ ∈ R , as it does not belong to N ( O ) . Case 1: there exists p ∈ P such that p N ( α, β, α ′ , β ′ ) . Denote by S p the s - p -walk, such that S ⊢ p iscontained in R (recall that S ⊢ p denotes the walk S p with the vertex p removed). The walk S p exists, because P is a minimal s - O -separator. Let p • ∈ R be the last vertex of S ⊢ p (it is possible that p • = s ).If p ∈ P X , then clearly p ∈ N ( O ) − N ( β ) , so dist( N [ p ] − N ( β ) , O ) . Moreover, N ( p ) − N ( β ) is non-empty, because p • ∈ N ( p ) − N ( β ) . So by Lemma 25 we can obtain walks T : α → α, U : p → λ for λ ∈ { α, β } , and V : β → β such that if U is a p - α -walk, then T , U avoid V , and otherwise T avoids U , V . Then we define P := α, α ′ , . . . , α ◦ T , Q := S p ◦ U , and R := β, β ′ , . . . , β ◦ V in a way that |P| = |Q| = |R| . Clearly, S p is non-adjacent to { α, α ′ , β, β ′ } , because S ⊢ p ⊆ R and p N ( α ′ , β ′ ) . Thuswalks P , Q , R satisfy statement (1.) or (2.), depending on the statement in the call of Lemma 25.Similarly, if p ∈ P Y , we observe that dist( N [ p ] − N ( β ′ ) , O ) dist( p, O ) = 1 and p • ∈ N ( p ) − N ( β ′ ) .Thus again we can use Lemma 25, but now for ( α ′ , β ′ ) ∈ C ( O ) instead of ( α, β ) . We obtain walks T : ′ → α ′ , U : p → λ ′ for λ ′ ∈ { α ′ , β ′ } and V : β ′ → β ′ , such that if U is a p - α ′ -walk, then T , U avoid V and otherwise T avoids U , V . We define P = α, α ′ , . . . , α ′ ◦ T ◦ α ′ , α, Q = S p ◦ U ◦ λ ′ , λ, R = β, β ′ , . . . , β ′ ◦ V ◦ β ′ , β, where λ is the vertex in { α, β } ∩ N ( λ ′ ) . Analogously like in the subcase when p ∈ P X , we can verify thatthe statement of the lemma holds. Case 2: for every p ∈ P it holds that p ∈ N ( α, β, α ′ , β ′ ) . We use Lemma 21 for s = α, s ′ = α ′ v = β, v ′ = β ′ and S = P to obtain vertices y ∈ P and x ∈ Q and walks A , A ′ : α → y, B , B ′ : β → x or A , A ′ : β → y, B , B ′ : α → x , such that A avoids B , B ′ avoids A ′ . Furthermore, for every i we have {A , B} ( i ) P and A , A ′ , B , B ′ ⊆ P ∪ Q .Observe that it is enough to consider the first case, i.e., A , A ′ : α → y, B , B ′ : β → x . Indeed, observethat in the second case walks X ◦ A , X ′ ◦ A ′ : α → y and Y ◦ B , Y ′ ◦ B ′ : β → x , where X , X ′ , Y , Y ′ aregiven by Observation 17, satisfy the assumptions of the first case.Now let S y be the s - y -walk, such that S ⊢ y is contained in R . Define A ∗ := α, α ′ , α ◦A , B ∗ := β, β ′ , β ◦B ,and S ∗ := s, s ′ , s ◦ S y . Observe that |A ∗ | = |B ∗ | and we have α, α ′ ∈ A ∗ , β, β ′ ∈ B ∗ , and s, s ′ ∈ S ∗ .Denote the consecutive vertices of these walks by A ∗ = a , . . . , a ℓ , B ∗ = b , . . . , b ℓ , and S ∗ = s , . . . , s m .Note that a = α, s = s, b = β and a ℓ = s m = y , b ℓ = x , and A ∗ avoids B ∗ .Observe that there exist i ∈ [ ℓ ] and j ∈ [ m − such that a i s j ∈ E ( H ) or b i s j ∈ E ( H ) (for examplewe have a ℓ = s m = y , so a ℓ s m − ∈ E ( H ) ). Take minimum such j and for that j take minimum i .Define C α := α, α ′ , . . . , α and C β := β, β ′ , . . . , β , such that |C α | = |C β | = max( j − i + 1 , , and C s := s, s ′ , . . . , s , such that |C s | := max( i − − j, . Note that then three walks C α ◦ a , . . . , a i − , C β ◦ b , . . . , b i − , and C s ◦ s , . . . , s j have the same length.We claim that only one of the edges a i s j and b i s j exists. Indeed, recall that for every j ∈ [ m − we have s j ∈ R . On the other hand, walks A ∗ and B ∗ are contained in Q ∪ P . So a i (or b i ) can only beadjacent to s j if a i ∈ P ( b i ∈ P ). However, by the properties of A , B we know that at most one of a i , b i may be in P .If a i s j ∈ E ( H ) and b i s j E ( H ) , we set P = C α ◦ a , . . . , a i − ◦ a i − , a i ◦ a i , . . . , a ℓ ◦ A ′ Q = C s ◦ s , . . . , s j ◦ s j , a i ◦ a i , . . . , a ℓ ◦ A ′ R = C β ◦ b , . . . , b i − ◦ b i − , b i ◦ b i , . . . , b ℓ ◦ B ′ Note that P = C α ◦ A ∗ ◦ A ′ and R = C β ◦ B ∗ ◦ B ′ . Observe that since s, s ′ ∈ S ∗ , β, β ′ ∈ B , and by thedefinition of j and i , the subwalk C s ◦ s , . . . , s j of Q is non-adjacent to the subwalk C β ◦ b , . . . , b i − of R . By analogous arguments we can see that if b i s j ∈ E ( H ) and a i s j E ( H ) , then for P = C α ◦ a , . . . , a i − ◦ a i − , a i ◦ a i +1 , . . . , a ℓ ◦ A ′ Q = C s ◦ s , . . . , s j ◦ s j , b i ◦ b i +1 , . . . , b ℓ ◦ B ′ R = C β ◦ b , . . . , b i − ◦ b i − , b i ◦ b i +1 , . . . , b ℓ ◦ B ′ we have that P avoids Q and R . 31 .4.3 Proof of Lemma 27. All lemmas introduced so far will be used to prove Lemma 27.
Lemma 27.
Let H be a connected, bipartite, undecomposable graph, let O be an obstruction in H and let ( α, β ) ∈ C ( O ) . Let S be an incomparable set of k > vertices of H , contained in the same bipartition classas α, β . Let a and b be two distinct vertices of S . For each v ∈ S there exists a walk D v , of length at least two,satisfying the following properties:(1) for each v ∈ S , D v is a v - α -walk or a v - β -walk,(2) D a is an a - α -walk and D b is a b - β -walk,(3) for each u, v ∈ S , such that D u : u → α and D v : v → β , we have that D u avoids D v .In particular, all walks have equal length. Before we prove Lemma 27 in full generality, we consider a special case. We say that an incomparableset S is strongly incomparable if for every v ∈ S there exists v ′ ∈ N ( v ) such that for every u ∈ S − { v } itholds that uv ′ E ( H ) . Observe that then the edges { vv ′ } v ∈ S are independent. Lemma 28.
Lemma 27 holds if we additionally assume that S is strongly incomparable.Proof. Let
X, Y be the bipartition classes of H such that S = { x , . . . , x k } ⊆ X , where k > , x = a, x = b . To simplify the notation, we will write D i instead of D x i . Let ( α ′ , β ′ ) be the pair, such that C ( O ) = { ( α, β ) , ( α ′ , β ′ ) } .First, observe that all constructed walks must have even length, as they start and end in the samebipartition class. Thus the only possibility to have walks satisfying conditions (1)-(3), which are of lengthless than two, is if | S | = 2 and a = α and b = β . To avoid having walks of length 0, in this case we returnwalks D a = α, α ′ , α and D b = β, β ′ , β . So from now on we do not need to worry about the length of thewalks.We prove the lemma by induction on k . Consider the base case that S = { a, b } . By Lemma 23 usedfor s = a, v = b and t = β , we obtain a vertex q and walks P , P ′ : a → β, Q , Q ′ : b → q or P , P ′ : a → q, Q , Q ′ : b → β , such that P avoids Q and Q ′ avoids P ′ . Note that in both cases q must beincomparable with β (recall Observation 12), so we can use Lemma 24 for s = q to obtain A , A ′ : q → α and B , B ′ : β → β , such that A avoids B and B ′ avoids A ′ .If P : a → q and Q : b → β , then clearly we can define D a = P ◦ A and D b = Q ◦ B . On the otherhand, if P : a → β, Q : b → q , we define D a = P ◦ B ′ ◦ Y ′ and D b = Q ◦ A ′ ◦ X ′ , where X ′ , Y ′ are givenby Observation 17.So now assume that S = { x , . . . , x k } for k > and x = a , x = b , and the lemma holds for k − .Let { f D i } k − i =1 be the set of walks given by the inductive call for the set S − { x k } . The consecutive verticesof f D i are denoted by d i , . . . , d iℓ . Let A be the set of walks f D i terminating at α and let B be the set of walks f D i terminating at β . Clearly f D a ∈ A and f D b ∈ B .As S is strongly incomparable, for every x i ∈ S there exists x ′ i ∈ N ( x i ) , such that the edges in the set { x i x ′ i } i ∈ [ k ] are independent. Case 1: There is an edge between { x k , x ′ k } and S i ∈ [ k − f D i . This means that there is some j ∈ [ ℓ ] and p ∈ [ k − , such that one of edges x k d pj or x ′ k d pj exists (note that both edges cannot exist since H isbipartite). We choose the minimum such j , and for this j , if only possible, we choose p such that f D p ∈ B .32bserve that j > , because otherwise x p x ′ k ∈ E ( H ) , a contradiction with the choice of x ′ k . Let x k ∈ { x k , x ′ k } be the vertex for which x k d pj ∈ E ( H ) . Then we define D i := ( x k , x ′ k , . . . , x k ◦ x k , d pj , . . . , d pℓ if i = k, f D i if i ∈ [ k − , so that they have equal length. Denote the consecutive vertices of D k by d k , . . . , d kℓ . It is clear that thesewalks satisfy conditions (1) and (2), so we only need to prove the condition (3). Assume that there existwalks D q : x q → α and D r : x r → β , such that D q does not avoid D r . Note that by the inductiveassumption this cannot happen if q, r ∈ [ k − . Thus either r = k or q = k .Assume that r = k , i.e., D k is an x k - β -walk. Note that this means that f D p ∈ B . Let c > be theminimum index for which d qc − d kc ∈ E ( H ) . If c < j , it means d qc − x k ∈ E ( H ) or d qc − x ′ k ∈ E ( H ) , whichcontradicts the minimality of j . If c > j , then d kc = d pc , so d qc − is adjacent to d pc . Thus the x q - α walk f D q does not avoid the x p - β walk f D p , a contradiction.So assume q = k , i.e., D k is an x k - α -walk and f D p is an x p - α -walk. Let c > be the smallest indexfor which d kc − d rc ∈ E ( H ) . The argument is analogous: if c < j , then we have a contradiction with theminimality of j . If c > j , then the x p - α -walk f D p does not avoid the x r - β walk f D r , a contradiction. Finally,if c = j , recall that we would choose r instead of p , as f D r ∈ B and f D p / ∈ B . This completes the proof ofthis case. Case 2: There are no edges between { x k , x ′ k } and S i ∈ [ k − f D i . Then we use Lemma 26 for α, β and s = x k to obtain walks P , Q and R and define D i := f D i ◦ P if i ∈ A, f D i ◦ R if i ∈ B,x k , x ′ k , . . . , x k ◦ Q if i = k, so that all walks have the same length ℓ ′ − . We extend the naming of vertices of walks D i by denotingtheir consecutive vertices by d i , . . . , d iℓ ′ , note that this is consistent with previous notation, as for every i ∈ [ k − the walk f D i is the prefix of D i .Again, properties (1) and (2) are straightforward, let us verify the property (3). As P avoids R and forevery q ∈ A and r ∈ B the walk D q avoids D r , by Observation 13 we know that the property (3) holds forall q, r ∈ [ k − .So we only need to consider two cases. First, assume that Q is an x k - α -walk (and thus so it D k ), and P , Q avoid R . Suppose that there exists D r ∈ B such that D k does not avoid D r , i.e., there exists c > such that d kc − d rc ∈ E ( H ) . Recall that the number of vertices in f D r is ℓ . If c − > ℓ , then Q does not avoid R , a contradiction. And if c − < ℓ , then d kc − ∈ { x k , x ′ k } , so f D r is adjacent to x k or x ′ k , a contradictionwith the assumption of the case.Now assume that Q is an x k - β -walk and there exists q ∈ A such that D q does not avoid D k , i.e., thereexists c > such that d qc − d kc ∈ E ( H ) . The arguments which lead to the contradiction are analogous – if c − > ℓ , then P does not avoid Q , and if c − < ℓ , then f D q is adjacent to x k or x ′ k .Now we are ready to prove Lemma 27. 33 roof of Lemma 27. Let
X, Y be the bipartition classes of H such that S = { x , . . . , x k } ⊆ X , where k > , x = a, x = b . Again, to simplify the notation, we will write D i instead of D x i . Let a ′ ∈ N ( a ) − N ( b ) and b ′ ∈ N ( b ) − N ( a ) . We define x ′ := a ′ , x ′ := b ′ , and for every i > such that x i / ∈ N ( a ′ ) we choose x ′ i to be any vertex from N ( x i ) − N ( a ) ; they exist, since S is incomparable.Let U = { x i , x ′ i : x i / ∈ N ( a ′ ) } ∪ { a, a ′ } , and let C be the set of all connected components of H − N ( a, a ′ ) . Note that x i and x ′ i are always in the same component from C . Moreover, there is a component C a ∈ C , such that V ( C a ) = { a, a ′ } , and a component C b ∈ C , such that b, b ′ ∈ V ( C b ) . For each C ∈ C containing at least one vertex from U , we choose one vertex u ∈ U X ∩ V ( C ) and call it the representative of C . The representatives are chosen arbitrarily, except that we choose b as the representative of C b . Notethat necessarily a is the representative of C a . Let R ⊆ S be the set of all vertices that are representativesof components in C , clearly a, b ∈ R . For every vertex of C ∈ C , its representative is the representative of C . We claim that R is strongly incomparable. Indeed, note that for every x i ∈ R , the vertex x ′ i ∈ N ( x i ) is non-adjacent to every x j ∈ R − { x i } . This is because if x ′ i is adjacent to some x j , then, since x ′ i isnon-adjacent to a , both x i , x j must be in the same component in C , so they cannot both belong to R . Socalling Lemma 28 for the set R and a, b, α, β gives us the family of walks { f D i } x i ∈ R .Recall that the only vertices x i ∈ S , for which x ′ i is not defined yet, are in ( S ∩ N ( a ′ )) − { a } . Let usconsider such x i , clearly it is adjacent to some vertices in U Y (at least a ′ ). If there is some x j ∈ U , suchthat: • x i is adjacent to x ′ j , and • f D r terminates at β , where x r is the representative of x j ,then we set x ′ i := x ′ j . Otherwise, we set x ′ i := a ′ (note that f D a terminates at α ). Now for every x i we havedefined x ′ i , and always x ′ i ∈ U Y . In particular, no x ′ i , except for a ′ , is adjacent to a .Consider a vertex x i ∈ S and let C ∈ C be the component containing x ′ i . Let x r be the representativeof C , and let Z i be a x ′ i - x r -walk, contained in C . We define D i := x i , x ′ i ◦ Z i ◦ x r , x ′ r , . . . , x r | {z } t vertices ◦ f D r , where t is chosen so that all D i ’s are of equal length. Let us denote by d i , . . . , d iℓ the consecutive verticesof D i , note that d it , d it +1 , . . . , d iℓ = f D r and d it = x r .It is clear that all walks D i terminate at α or β , and in particular D a is an a - α -walk and D b is a b - β -walk, so the properties (1) and (2) hold. To prove the property (3), suppose that there are p, q ∈ [ k ] suchthat D p : x p → α does not avoid D q : x q → β . So there exists c > such that d pc − is adjacent to d qc . Let x p ′ , x q ′ be, respectively, the representatives of x p and x q . Clearly x ′ p , x ′ q ∈ R . Note that if c − > t , thenthe x p ′ - α -walk g D p ′ does not avoid the x q ′ - β -walk g D q ′ , a contradiction with the properties of the walks { f D i } x i ∈ R ensured by Lemma 28.If c − < t , then there exists an x p ′ - x q ′ -path in H − N ( a, a ′ ) , so they are in the same connectedcomponent in C . Since each component in C has exactly one representative, we obtain that p ′ = q ′ andthus and D p and D q both terminate in α or in β .Finally, consider c = 2 , which means that d p = x p is adjacent to d q = x ′ q . There are three possibilities:(i) x p , x ′ q / ∈ N ( a, a ′ ) , or (ii) x p ∈ N ( a ′ ) , or (iii) x ′ q ∈ N ( a ) . In case (i) we observe that x p and x ′ q are in thesame connected component in C , which means that x p ′ = x q ′ , so both walks D p , D q terminate at the samevertex. In case (ii), recall that when choosing x ′ p , we gave preference to vertices whose representative’swalk terminates at β (see the second condition in definition). Thus we would have chosen x ′ p = x ′ q , a34ontradiction. Finally, in case (iii), recall that x ′ q = a ′ . But since the representative of a ′ is a , the walk D q terminates at α , a contradiction. This completes the proof of the lemma.35 Algorithm for general target graphs
In this section we will generalize the invariant i ∗ ( H ) and extend Theorem 3’ a) to all targets relevant targetgraphs H . Let us start with a simple observation, which is an analogue of Observation 7. Observation 29.
Let ( G, L ) be an instance of LHom ( H ). Without loss of generality we might assume thefollowing.(1) The graph G is connected,(2) for each x ∈ V ( G ) , the set L ( x ) is incomparable,(3) for each edge xy ∈ E ( G ) , for every u ∈ L ( x ) there is v ∈ L ( y ) , such that uv ∈ E ( H ) .Proof. The first two items are analogous to the corresponding ones in Observation 7. For the last itemobserve that if u ∈ L ( x ) is non-adjacent (in H ) to every element of L ( y ) , then we can safely remove u from L ( x ) .The high-level idea is to reduce the general case of LHom ( H ) to the case, when the target is bipartite,and then use Theorem 3’ a). For this, we will consider the so-called associated instances , introduced byFeder, Hell, and Huang [21] (see Section 4.1).We will also separately consider some special graphs that we call strong split graphs . A graph H is a strong split graph , if its vertex set can be partitioned into two sets B and P , where B is independent and P induces a reflexive clique. We call the pair ( B, P ) the partition of H . Note that the partition is unique:all vertices without loops must belong to B and all vertices with loops must belong to P . For a graph G = ( V, E ) , by G ∗ we denote the associated bipartite graph , defined as follows. The vertexset of G ∗ is the union of two independent sets: { x ′ : x ∈ V } and { x ′′ : x ∈ V } . The vertices x ′ and y ′′ are adjacent if and only if xy ∈ E . Note that the edges of type x ′ x ′′ in G ∗ correspond to loops in G . Thevertices x ′ and x ′′ are called twins .Let ( G, L ) be an instance of LHom ( H ). An associated instance is the instance ( G ∗ , L ∗ ) of LHom ( H ∗ ) ,where L ∗ are associated lists defined as follows. For x ∈ V ( G ) , we set L ∗ ( x ′ ) = { u ′ : u ∈ L ( x ) } and L ∗ ( x ′′ ) = { u ′′ : u ∈ L ( x ) } . Note that in the associated lists, the vertices appearing in the list of x ′ areprecisely the twins of the vertices appearing in the list of x ′′ . A homomorphism f : ( G ∗ , L ∗ ) → H ∗ is clean if it maps twins to twins, i.e., f ( x ′ ) = u ′ if and only if f ( x ′′ ) = u ′′ . The following simple observationwas the crucial step of the proof of the complexity dichotomy for list homomorphisms, shown by Feder,Hell, and Huang [21]. We state it using slightly different language, which is more suitable for our purpose. Proposition 30 (Feder, Hell, Huang [21]).
Let ( G, L ) be an instance of LHom ( H ). Then it is a yes-instanceif and only if ( G ∗ , L ∗ ) admits a clean homomorphism to H ∗ . Let us point out that the restriction to clean homomorphisms is necessary for the equivalence. Indeed,consider for example G = K and H = C , so clearly G H . However, we have G ∗ ≃ C and H ∗ ≃ C , so G ∗ → H ∗ .Recall that if H is bipartite, then LHom ( H ) is polynomial-time solvable if H is the complement of acircular-arc graph [20], and NP-complete otherwise. Feder, Hell, and Huang [21] proved the followingdichotomy theorem. Theorem 31 (Feder, Hell, Huang [21]).
Let H be an arbitrary graph (with loops allowed). . The LHom ( H ) problem is polynomial-time solvable if H is a bi-arc graph, and NP-complete otherwise.2. The graph H is a bi-arc-graph if and only if H ∗ is the complement of a circular-arc graph. So for our problem the interesting graphs H are those, for which H ∗ is not the complement of acircular-arc graph. In the observation below we summarize some properties of associated instances. Observation 32.
Consider an instance ( G, L ) of LHom ( H ) and the associated instance ( G ∗ , L ∗ ) of LHom ( H ∗ ).Suppose that G is given along with a tree decomposition of width t .(1) For each v ∈ V ( G ) and u ∈ V ( H ) , we have u ∈ L ( v ) if and only if u ′ ∈ L ∗ ( v ′ ) if and only if u ′′ ∈ L ∗ ( v ′′ ) . In particular, each list is contained in one bipartition class of H ∗ .(2) In polynomial time we can construct a tree decomposition T ∗ of G ∗ of width at most t with the propertythat for each x ∈ V ( G ) , each bag of T either contains both x ′ , x ′′ or none of them.Proof. The first item follows directly from the definition of ( G ∗ , L ∗ ) . To see the second item, consider atree decomposition T of G . We construct T ∗ by taking the same tree structure as for T , and replacingeach vertex v of G in each bag of T by the vertices v ′ , v ′′ of G ∗ . It is straightforward to verify that thisway we obtain a tree decomposition of T ∗ with the desired properties.Observe that for bipartite H , the graph H ∗ consists of two disjoint copies of H , so clearly i ∗ ( H ) = i ∗ ( H ∗ ) . This motivates the following definition, generalizing Definition 3. Definition 8 ( i ∗ ( H ) for general H ). Let H be a connected non-bi-arc graph. Define i ∗ ( H ) := i ∗ ( H ∗ ) . In this section we generalize the notion of decompositions of bipartite graphs, introduced in Section 2.1,to all graphs (with possible loops). The high-level idea is to define decompositions of H , so that they willcorrespond to bipartite decompositions of H ∗ . We consider the following three types of decompositionsof a graph H (see Figure 5). Note that unless stated explicitly, we do not insist that any of the defined setsis non-empty. Definition 9 ( F -decomposition). A partition of V ( H ) into an ordered triple of sets ( F, K, Z ) is an F -decomposition if the following conditions are satisfied (see Figure 5, left).1. K is non-empty and it separates F and Z ,2. | F | > ,3. K induces a reflexive clique,4. F is complete to K . Definition 10 ( BP -decomposition). A partition of V ( H ) into an ordered five-tuple of sets ( B, P, M, K, Z ) is a BP -decomposition if the following conditions are satisfied (see Figure 5, middle).1. K ∪ M is non-empty and there are no edges between ( P ∪ B ) and Z ,2. | P | > or | B | > ,3. K ∪ P induces a reflexive clique and B is an independent set,4. M is complete to P ∪ K and B is complete to K ,5. B is non-adjacent to M . 37 efinition 11 ( B -decomposition). A partition of V ( H ) into an ordered six-tuple of sets ( B , B , K, M , M , Z ) is a B -decomposition if the following conditions are satisfied (see Figure 5, right).1. K ∪ M ∪ M is non-empty and it separates ( B ∪ B ) and Z ,2. | B | > or | B | > ,3. K induces a reflexive clique and each of B , B is an independent set,4. K is complete to M ∪ M ∪ B ∪ B , and M is complete to M ∪ B , and M is complete to B ,5. B is non-adjacent to M and B is non-adjacent to M . KFZ M KB PZ M K M B B Z Figure 5: A schematic view of an F -decomposition (left), a BP -decomposition (middle), and a B -decomposition of H (right). Disks correspond to sets of vertices: white ones depict independent sets,black ones depict reflexive cliques, and orange ones depict arbitrary subgraphs. Similarly, thick black linesindicate that all possible edges between two sets exist, and thin orange lines depict edges that might exist,but do not have to. The lack of a line means that there are no edges between two sets.Observe that a graph H can have more than one decomposition: for example, if ( B, P, M, K, Z ) is an BP -decomposition of H , but M = ∅ , then ( B ∪ P, K, Z ) is an F -decomposition of H .For each kind of decomposition, we define its factors as the following pair of graphs ( H , H ) . for an F -decomposition: H = H [ F ] and H is obtained from H by contracting F to a vertex f . It hasa loop if and only if F is not an independent set. for a BP -decomposition: H = H [ B ∪ P ] and H is obtained from H by contracting P and B re-spectively (if they are non-empty), to vertices p and b , such that p has a loop and b does not. Also, pb ∈ E ( H ) if and only if there is any edge between P and B in H . for a B -decomposition: H = H [ B ∪ B ] and H is obtained from H by contracting B and B re-spectively (if they are non-empty), to vertices b and b (without loops). Also, b b ∈ E ( H ) if andonly if there is any edge between B and B in H .Let us prove that if H is not a strong split graph, then the three types of decompositions defined aboveprecisely correspond to bipartite decompositions of the associated bipartite graph H ∗ . For any W ⊆ V ( H ) ,we define two subsets of V ( H ∗ ) as follows: W ′ := { x ′ : x ∈ W } and W ′′ := { x ′′ : x ∈ W } . Lemma 33.
Let H be be a connected, non-bi-arc graph, which is not a strong split graph. Then H ∗ admits abipartite decomposition if and only if H admits a B -, a BP -, or an F -decomposition.Proof. First, observe that a subset W ⊆ V ( H ) induces a reflexive clique in H if and only if W ′ ∪ W ′′ induces a biclique in H ∗ .Let us show that if H has a decomposition, then H ∗ has a bipartite decomposition ( D, N, R ) . Weconsider three cases, depending on the type of a decomposition of H .38f H has an F -decomposition ( F, K, Z ) , we define D, N, R as follows (see Figure 6 a)): D := F ′ ∪ F ′′ ,N := K ′ ∪ K ′′ ,R := Z ′ ∪ Z ′′ . Now the fact that ( D, N, R ) is a bipartite decomposition of H ∗ (recall Definition 2) follows directly fromthe definition of a F -decomposition (recall Definition 9): each property in Definition 2 follows from thecorresponding property in Definition 9.The other two cases are analogous. If H has a BP -decomposition, then we define D, N, R as follows(see Figure 6 b)): D := B ′ ∪ P ′′ ,N := K ′ ∪ M ′ ∪ P ′ ∪ K ′′ ,R := Z ′ ∪ Z ′′ ∪ M ′′ ∪ B ′′ . Finally, if H has a B -decomposition ( B , B , K, M , M , Z ) , then we define D, N, R as follows (seeFigure 6 c)): D := B ′ ∪ B ′′ ,N := K ′ ∪ M ′ ∪ K ′′ ∪ M ′′ ,R := Z ′ ∪ M ′ ∪ B ′ ∪ Z ′′ ∪ M ′′ ∪ B ′′ . It is straightforward to verify that in both cases ( D, N, R ) is a bipartite decomposition of H ∗ .a) KFZ K ′ F ′ Z ′ K ′′ F ′′ Z ′′ b) M KB PZ K ′ B ′ M ′ P ′ Z ′ K ′′ B ′′ M ′′ P ′′ Z ′′ c) M K M B B Z K ′ B ′ B ′ M ′ M ′ Z ′ K ′′ B ′′ B ′′ M ′′ M ′′ Z ′′ Figure 6: Decompositions of a graph H (left) and their corresponding bipartite decompositions ( D, N, R ) of H ∗ (right): a) an F -decomposition, b) a BP -decomposition and c) a B -decomposition. Dashed linesmark the set N .Now we suppose that ( D, N, R ) is a bipartite decomposition of H ∗ and recall that N = ∅ and onebipartition class of D has at least two elements. We aim to show that H has one of the decompositionsdefined above. We partition the vertices of H into nine sets as follows (see Figure 7):39 ′ B ′ Z ′ M ′′ B ′′ Z ′′ K ′ Q ′ M ′ K ′′ P ′′ M ′′ P ′ F ′ B ′ Q ′′ F ′′ B ′′ DNR
Figure 7: Schematic definition of sets in the proof of Lemma 33. E.g. P is the set of those x ∈ V ( G ) , forwhich x ′ ∈ D and x ′′ ∈ N . F := { x : x ′ ∈ D, x ′′ ∈ D } , Q := { x : x ′ ∈ N, x ′′ ∈ D } , B := { x : x ′ ∈ R, x ′′ ∈ D } ,P := { x : x ′ ∈ D, x ′′ ∈ N } , K := { x : x ′ ∈ N, x ′′ ∈ N } , M := { x : x ′ ∈ R, x ′′ ∈ N } ,B := { x : x ′ ∈ D, x ′′ ∈ R } , M := { x : x ′ ∈ N, x ′′ ∈ R } , Z := { x : x ′ ∈ R, x ′′ ∈ R } . Clearly, from the definition of the bipartite decomposition it follows that some pairs of these sets cannotbe both non-empty (e.g. F and M , because F ′ must be complete to M ′′ and in the same time F ′′ is non-adjacent to M ′ ). Observe that M ∪ Q ∪ K is complete to Q ∪ B ∪ F ∪ P ∪ M ∪ K and P ∪ M ∪ K iscomplete to B ∪ P ∪ F ∪ M ∪ Q ∪ K . Also, B ∪ P ∪ F is non-adjacent to M ∪ B ∪ Z and B ∪ Q ∪ F is non-adjacent to M ∪ B ∪ Z . In particular, it implies that P, Q, and K must be reflexive cliques and B , B are independent sets. Finally, at least one of the sets B ∪ P ∪ F and B ∪ Q ∪ F has at least twovertices and at least one of the sets M ∪ Q ∪ K and P ∪ M ∪ K is non-empty. Case 1: F = ∅ . It implies that M , M = ∅ . If K = ∅ , then it is straightforward to observe that ( F ∪ P ∪ Q ∪ B ∪ B , K, Z ) is an F -decomposition of H . If K = ∅ , then also Z = ∅ , as we assumed that H is connected. Moreover, since M ∪ M ∪ P ∪ Q ∪ K = ∅ , at least one of P, Q is non-empty. Assumethat P = ∅ , as the other case is symmetric. Recall that this means that B = ∅ .If Q = ∅ , then B = ∅ and ( F ∪ Q, P, ∅ ) is an F -decomposition. So let Q = ∅ . If | F | > , then ( F, P, B ) is an F -decomposition. If | B | > or | P | > , then ( B , P, F, ∅ , ∅ ) is a BP -decomposition. Soin the last case we have | F | = | P | = 1 and | B | . It is easy to verify that then H is a bi-arc graph(or, equivalently, H ∗ does not contain an induced cycle on at least 6 vertices or an edge asteroid). Thiscontradicts our assumption on H . Case 2: F = ∅ . We consider three subcases: either B , B = ∅ , or B = ∅ and B = ∅ (the case B = ∅ and B = ∅ is symmetric), or B , B = ∅ . The first case implies that P, Q = ∅ , so we immediately obtaina B -decomposition ( B , B , K, M , M , Z ) .In the second one we have Q = ∅ . If P = ∅ , then M = ∅ . If additionally M ∪ K = ∅ , then there existsa BP -decomposition ( B , P, M , K, Z ) . On the other hand, if M ∪ K = ∅ , then Z = ∅ by connectivity of40 . Thus the only non-empty sets are P and B , and therefore H is a strong split graph. Finally, if P = ∅ ,then H admits a B -decomposition ( ∅ , B , K, M , M , Z ) .So let us assume that B , B = ∅ . We will consider further subcases: either M , M = ∅ , or M = ∅ and M = ∅ (the other case, i.e., M = ∅ and M = ∅ , is symmetric), or M , M = ∅ . Note thatif M , M = ∅ , then P, Q = ∅ , so D = ∅ , which is a contradiction with ( D, N, R ) being a bipartitedecomposition of H ∗ . If M = ∅ and M = ∅ , then Q = ∅ and | P | > and we have a BP -decomposition ( ∅ , P, M , K, Z ) . Lastly, when M , M = ∅ , then without loss of generality | P | > and either ( P, Q ∪ K, Z ) is an F -decomposition, or Q ∪ K = ∅ , then by connectivity of H the set Z must be empty and H is just a reflexive clique induced by P . However, such a graph is a bi-arc graph, a contradiction.Let us point out that one application of a BP -decomposition or a B -decomposition corresponds to twoconsecutive applications of a bipartite decomposition in H ∗ . Consider the case of a BP -decompositionand the bipartite decomposition ( B ′ ∪ P ′′ , K ′ ∪ M ′ ∪ P ′ ∪ K ′′ , Z ′ ∪ M ′′ ∪ B ′′ ∪ Z ′′ ) of H ′ . Note that aftercontracting B ′ to b ′ and P ′′ to p ′′ , we still have a decomposition ( P ′ ∪ B ′′ , K ′ ∪ K ′′ ∪ M ′′ ∪ { p ′′ } , M ′ ∪{ b ′ } ∪ Z ′ ∪ Z ′′ ) of the second factor ( H ∗ ) of H ∗ . Similarly, in the case of a B -decomposition, we stillhave another bipartite decomposition of ( H ∗ ) , where the new set D is B ′′ ∪ B ′ .Note that in a BP -decomposition, a B -decomposition, and an F -decomposition, when F is an inde-pendent set or contains a vertex with a loop, the factors are always induced subgraphs of H . Indeed, wecan equivalently obtain H by removing certain vertices from H . In the last case of an F -decomposition,when F contains at least one edge and has only vertices without loops, H is not an induced subgraph of H . We can equivalently define H as the graph obtained by removing from F all but two vertices that areadjacent to each other, and then replacing them with a vertex with a loop.In the following lemma we consider a graph H ′ that was obtained from H by a series of decompositions(i.e., it is a factor of H , or a factor of a factor of H etc.). We show that even if H ′ is not an induced subgraphof H , the associated bipartite graph H ′∗ is still an induced subgraph of H ∗ . Lemma 34.
Let H ′ be a graph obtained from H by a series of decompositions. Then H ′∗ is an inducedsubgraph of H ∗ .Proof. Recall that by the definitions of decompositions, H ′ was obtained from H by a sequence of twotypes of operations:(O1) removing some vertices or, equivalently, taking an induced subgraph ( BP -decomposition, B -decomposition,and F -decomposition when the set F contains a vertex with a loop or is independent),(O2) removing some vertices and then contracting two adjacent vertices a , b , such that N ( a ) − { b } = N ( b ) − { a } and none of a, b has a loop, to a vertex c with a loop; vertices a and b are removedfrom the graph and the new vertex c becomes adjacent to all vertices in N ( a ) − { b } = N ( b ) − { a } ( F -decomposition, when F has no vertex with a loop and contains at least one edge, see Figure 8).Observe that if only the first type of operation was applied, then H ′ is an induced subgraph of H ,which implies that H ′∗ is an induced subgraph of H ∗ . Let us analyze the case when some operations ofthe second type were applied as well.In this case H ′ might not be an induced subgraph of H , but each newly created vertex c uniquelycorresponds to two adjacent vertices, i.e., a, b . Moreover, when the operation was applied, a and b had thesame neighborhoods in the current graph, except of being adjacent to each other. Note that both a and b are vertices of H : they do not have loops, while we only add vertices with loops. Furthermore, when c iscreated, a and b are removed from a graph, so each vertex is used in the operation of the second type atmost once. 41 Ka b ZKc Z ′ K ′ b ′ a ′ Z ′′ K ′′ b ′′ a ′′ Z ′ K ′ c ′ Z ′′ K ′′ c ′′ Figure 8: Operation (O2) applied to vertices a, b in H (left) and corresponding operation apllied to vertices a ′ , a ′′ , b ′ , b ′′ in H ∗ (right).Let us consider H ′∗ . Note that the edge ab of H corresponds to two edges a ′ b ′′ and a ′′ b ′ in H ∗ . Notethat we can map the vertex c ′ to a ′ and c ′′ to b ′′ . Since N ( a ) − { b } = N ( b ) − { a } , when the operation wasapplied, the associated bipartite graph of the obtained graph is indeed an induced subgraph of H ∗ , and themapping mentioned above defines the isomorphism from H ′∗ to a subgraph of H ∗ .Finally, we show an analogue of Lemma 9, where we explain how decompositions can be used algo-rithmically. Recall that T ( H, n, t ) denotes an upper bound for the complexity of LHom ( H ) on instanceswith n vertices, given along a tree decomposition of width t . In the following lemma we do not assumethat | H | is a constant. Lemma 35 (General decomposition lemma).
Let H be a connected, non-bi-arc graph, and let Γ be a de-composition of H (i.e., Γ is either an F -, a BP -, or a B -decomposition) with factors H , H . If there exist con-stants c > and d > such that T ( H , n, t ) = O (cid:16) c t · ( n · | H | ) d (cid:17) and T ( H , n, t ) = O (cid:16) c t · ( n · | H | ) d (cid:17) ,then T ( H, n, t ) = O (cid:16) c t · ( n · ( | H | + 2)) d (cid:17) . Since every type of decomposition is handled in a slightly different way, for the sake of readabilitywe split Lemma 35 into three lemmas, one for each type of decomposition. Their proofs are similar to theproof of Lemma 9. We also take more care about constants to make sure that the estimation holds even if H is not fixed. Lemma 36 ( F -decomposition lemma). Let H be a connected, non-bi-arc graph, and let ( F, K, Z ) be an F -decomposition of H . If there exist constants α, c > and d > such that T ( H , n, t ) α · c t · ( n · | H | ) d and T ( H , n, t ) α · c t · ( n · | H | ) d , then T ( H, n, t ) α · c t · ( n · | H | ) d , provided that n is sufficientlylarge.Proof. Let ( G, L ) be an instance of LHom ( H ) with n vertices, given along with a tree decomposition ofwith t . Define Q := { x ∈ V ( G ) : L ( x ) ∩ K = ∅} and note that by Observation 29 (2) no vertex from Q has a vertex from F in its list. First, we observe that an analogue of Claim 9.1 in the proof of Lemma 9holds in this situation too (the proof is essentially the same as the proof of Claim 9.1, so we do not repeatit). Claim 36.1.
If there exists a list homomorphism h : ( G, L ) → H , the image of each C ∈ comp( G − Q ) isentirely contained either in F or in Z . (cid:4) x ∈ V ( G ) − Q we define L ( x ) := L ( x ) ∩ F and for every component C ∈ comp( G − Q ) wecheck if there exists a homomorphism h C : ( C, L ) → H . Let C be the set of those C ∈ comp( G − Q ) ,for which h C exists.Now let us define an instance ( G, L ) of LHom ( H ) as follows. If x ∈ Q , then we set L ( x ) := L ( x ) ,note that in this case F ∩ L ( x ) = ∅ . On the other hand, if x / ∈ Q , then it is in exactly one C ∈ comp( G − Q ) .If C ∈ comp( G − Q ) − C , then we set L ( x ) := L ( x ) − F . If C ∈ C , then we set L ( x ) := L ( x ) − F ∪{ f } . Claim 36.2.
There exists a list homomorphism h : ( G, L ) → H if and only if there exists a list homomor-phism h ′ : ( G, L ) → H .Proof of Claim. First, assume that h : ( G, L ) → H exists. We define h ′ : V ( G ) → V ( H ) as follows: h ′ ( x ) := ( f if h ( x ) ∈ F,h ( x ) otherwise . It is straightforward to verify that h ′ is a homomorphism from G to H . Let us show that it respectslists L . Indeed, consider a vertex x ∈ V ( G ) . If h ( x ) / ∈ F , then h ′ ( x ) = h ( x ) ∈ L ( x ) − F ⊆ L ( x ) . Onthe other hand, if h ( x ) ∈ F , then L ( x ) ∩ F = ∅ , so x is in some C ∈ comp( G − Q ) . Since h ( x ) ∈ F , thenby Claim 36.1 the image of C is contained in F , so C ∈ C . Thus h ′ ( x ) = f ∈ L ( x ) .Now assume that there exists a homomorphism h ′ : ( G, L ) → H . We define h : V ( G ) → V ( H ) asfollows. If h ′ ( x ) = f , then we set h ( x ) := h ′ ( x ) . On the other hand, if h ′ ( x ) = f , then we know that x belongs to some C ∈ C . In this case we set h ( x ) := h C ( x ) . Note that h respects lists L , as in the firstcase h ′ ( x ) = h ( x ) clearly belongs to ( L ( x ) − { f } ) ⊆ L ( x ) , and in the second one it follows from thedefinition of h C .Now let us show that h is a homomorphism. Consider and edge xy ∈ E ( G ) . If h ′ ( x ) = h ′ ( y ) = f ,then x, y / ∈ Q , so they must both belong to the same C ∈ C and h ( x ) h ( y ) = h C ( x ) h C ( y ) ∈ E ( H ) , bythe definition of h C . Similarly, if h ′ ( x ) , h ′ ( y ) ∈ K ∪ Z , we have that h ( x ) h ( y ) = h ′ ( x ) h ′ ( y ) ∈ E ( H ) bythe definition of h ′ .So suppose that h ′ ( x ) = f and h ′ ( y ) ∈ K ∪ Z . Note that since h ′ is a homomorphism, we have h ′ ( y ) ∈ K . Recall that the set K is complete to F , so h ( x ) ∈ F is adjacent to h ( y ) = h ′ ( y ) ∈ K . (cid:4) Computing Q and comp( G − Q ) can be done in total time O ( n | H | + n ) = O (( n · | H | ) ) . Computing h C for all C ∈ comp( G − Q ) requires time at most X C ∈ comp( G − Q ) T ( H , | C | , t ) X C ∈ comp( G − Q ) α · c t · ( | H | · | C | ) d α · c t · ( | H | · n ) d . Computing lists L can be performed in time O ( | H |· n ) . Finally, computing h ′ requires time T ( H , n, t ) α · c t · ( | H | · n ) d . Similarly to the proof of Lemma 9, if n is sufficiently large, then the total running timecan be bounded by α · c t · ( | H | · n ) d , as claimed.The case of a BP -decomposition is slightly more complicated, as there might be vertices of G , whoselists contain both vertices from P (which is a part of H ) and from M (which is a part of the separator).These vertices require special handling. Lemma 37 ( BP -decomposition lemma). Let H be a connected, non-bi-arc graph, and let ( B, P, M, K, Z ) be a BP -decomposition of H with factors H , H . If there exist constants α, c > and d > such that T ( H , n, t ) α · c t · ( n · | H | ) d and T ( H , n, t ) α · c t · ( n · | H | ) d , then T ( H, n, t ) α · c t · ( n · | H | ) d ,provided that n is sufficiently large. roof. Let ( G, L ) be an instance of LHom ( H ) with n vertices, given along with a tree decomposition ofwith t . We define Q := { x ∈ V ( G ) : L ( x ) ∩ ( M ∪ K ) = ∅} . We say that a vertex x ∈ V ( G ) is of type B (resp. type P ) if L ( x ) ∩ B = ∅ (resp. L ( x ) ∩ P = ∅ ). Note that by Observation 29 (2) no vertex issimultaneously of type B and type P . Moreover, no vertex of type B is in Q . Let Q ′ be the set of verticesof type P in Q . Note that by Observation 29 (2) each vertex from Q ′ has in its list some vertices from M and some vertices from P , but no vertices from K .Notice that now we cannot just consider components of G − Q independently from each other and fromthe vertices from Q , as we did in the case of an F -decomposition. This is because the coloring we choosefor these components influences the coloring of vertices from Q ′ , which in turn influences the coloringof some other components of G − Q . Thus, instead of considering components of G − Q separately, wegather them together with their neighbors from Q ′ and only then compute the homomorphisms to H .This intuition is formalized by the following argument.Let S , S , and S be families of sets defined as follows S := [ C ∈ comp( G − Q ) n V ( C ) o and S := [ x ∈ Q ′ n { x } o and S := S ∪ S . Let ∼ ⊆ S be a relation, defined as follows: S ∼ S if and only if (i) S ∈ S , i.e., it is a vertex set ofsome C ∈ comp( G − Q ) and (ii) S ∈ S , i.e., S = { x } for some x ∈ Q ′ , and (iii) x is adjacent to somevertex of type B from S . Let ≃ ⊆ S be the smallest equivalence relation containing ∼ and consider theset S / ≃ of equivalence classes of ≃ .Now we form the set C ′ as follows. Consider a class π ∈ S / ≃ , it is a subset of S ∪ S , i.e., a family ofpairwise disjoint subsets of ( V ( G ) − Q ) ∪ Q ′ . We construct a subgraph C ′ of G , whose vertex set is theunion of all sets in π . An edge xy ∈ E ( G ) exists in C ′ if its both endvertices belong to one element of π (i.e.,it is an edge of some C ∈ comp( G − Q ) , such that V ( C ) ∈ π ), or is an edge joining some x ∈ Q ′ , suchthat { x } ∈ π , with a vertex y , which is a vertex of type B in C , such that V ( C ) ∈ π . Note that the edgesof the second kind are exactly the edges which justifed including { x } and V ( C ) in the same equivalenceclass π ∈ S / ≃ . Moreover, each C ′ ∈ C ′ is connected. Finally, we define C := { G [ V ( C ′ )] : C ′ ∈ C ′ } ,observe that it is a set of pairwise disjoint induced subgraphs of G .The following analogue of Claim 9.1 and Claim 36.1 is a crucial step towards proving the lemma. Claim 37.1.
If there exists a list homomorphism h : ( G, L ) → H , the image of each C ∈ C is entirelycontained either in P ∪ B or in M ∪ Z .Proof of Claim. Consider C ∈ C and assume that there exist x, y ∈ V ( C ) such that h ( x ) ∈ P ∪ B and h ( y ) ∈ M ∪ Z . Recall that there exists C ′ ∈ C ′ , which is a connected spanning subgraph of C . Let P be a x - y -path in C ′ . Recall that no vertex of C (and thus of P ) has a vertex from K in its list. This implies thaton P there exists an edge zz ′ , such that h ( z ) ∈ P and h ( z ′ ) ∈ M . Clearly, z ′ ∈ Q ′ . Moreover, z / ∈ Q ′ , asin C ′ there are no edges between vertices of Q ′ . So z must be a vertex of type P from V ( G ) − Q . However,in C ′ there are no edges between Q ′ and vertices of type P in V ( G ) − Q , a contradiction. (cid:4) Let C ∈ C . For every x ∈ V ( C ) we define L ( x ) := L ( x ) ∩ ( P ∪ B ) . Denote by C the set of thesesubgraphs C ∈ C , for which there exists a list homomorphism h C : ( C, L ) → H . We define an instance ( G, L ) of LHom ( H ) as follows: L ( x ) := L ( x ) − P ∪ { p } if x is of type P and belongs to some subgraph in C ,L ( x ) − B ∪ { b } if x is of type B and belongs to some subgraph in C ,L ( x ) − ( P ∪ B ) otherwise . x is simultaneously of type P and B , so L is well-defined. Now let us show thefollowing. Claim 37.2.
There exists a list homomorphism h : ( G, L ) → H if and only if there exists a list homomor-phism h ′ : ( G, L ) → H .Proof of Claim. First, assume that h : ( G, L ) → H exists. Define h ′ : V ( G ) → V ( H ) in the followingway: h ′ ( x ) := p if h ( x ) ∈ P,b if h ( x ) ∈ B,h ( x ) otherwise.The fact that h ′ is a homomorphism follows from the definition of H and the fact that h is a homomor-phism. We need to show for every x we have h ′ ( x ) ∈ L ( x ) .If h ′ ( x ) / ∈ { p, b } , then h ′ ( x ) = h ( x ) ∈ L ( x ) − ( P ∪ B ) ⊆ L ( x ) . So assume that h ′ ( x ) ∈ { p, b } . Thismeans that h ( x ) ∈ P ∪ B , so x ∈ ( V ( G ) − Q ) ∪ Q ′ . This means that x belongs to some C ∈ C , and since h ( x ) ∈ P ∪ B , by Claim 37.1, we observe that C ∈ C . Moreover, if h ′ ( x ) = p , then x is of type P , and if h ′ ( x ) = b , then x is of type B . Therefore h ′ ( x ) ∈ L ( x ) .Now suppose there exists a list homomorphism h ′ : ( G, L ) → H . We define a mapping h : V ( G ) → V ( H ) as follows. If h ′ ( x ) / ∈ { p, b } , then h ( x ) := h ′ ( x ) . Otherwise, by the definition of L , the vertex x must belong to exactly one subgraph C in C . In this case we set h ( x ) := h C ( x ) . Note that for every x ∈ V ( G ) we have h ( x ) ∈ L ( x ) : if h ′ ( x ) / ∈ { p, b } , then h ( x ) = h ′ ( x ) ∈ L ( x ) − { p, b } ⊆ L ( x ) , and if h ′ ( x ) ∈ { p, b } , then h ( x ) ∈ L ( x ) by the definition of h C .Now let us show that h is a homomorphism. Let xy be an edge of G and consider the following cases.1. If h ′ ( x ) , h ′ ( y ) / ∈ { p, b } , then h ( x ) h ( y ) = h ′ ( x ) h ′ ( y ) ∈ E ( H − { p, b } ) ⊆ E ( H ) , by the fact that h ′ is a homomorphism.2. If h ′ ( x ) = b and h ′ ( y ) = p , then x is of type B and is in V ( G ) − Q , while y is of type P and belongsto ( V ( G ) − Q ) ∪ Q ′ . Recall that by the definition of ∼ , vertices x, y belong to the same subgraph C ∈ C . Moreover, C ∈ C , as only in this case p and b could appear on the lists of x, y . This gives h ( x ) h ( y ) = h C ( x ) h C ( y ) ∈ E ( H ) ⊆ E ( H ) , by the definition of h C .3. The case h ′ ( x ) = h ′ ( y ) = b cannot occur, as h ′ is a homomorphism and b has no loop.4. If h ′ ( x ) = h ′ ( y ) = p , then p ∈ L ( x ) ∩ L ( y ) , so both x, y are of type P , and each of thembelongs to some subgraph in C . Let us call these subgraphs C x and C y , respectively, and observethat h ( x ) = h C x ( x ) and h ( y ) = h C y ( y ) . As h C x and h C y are homomorphisms to H , we knowthat h C x ( x ) , h C y ( y ) ∈ P ∪ B . But since neither L ( x ) or L ( y ) contains elements from B , we have h C x ( x ) , h C y ( y ) ∈ P . This means that h ( x ) h ( y ) = h C x ( x ) h C y ( y ) is an edge of H , as P is a reflexiveclique.5. If h ′ ( x ) = b and h ′ ( y ) / ∈ { p, b } , then h ′ ( y ) = h ( y ) ∈ K , as h ′ maps xy to an edge of H . Again, let C be the subgraph from C which contains x and observe that x must be of type B , as b ∈ L ( x ) .So h ( x ) = h C ( x ) ∈ B , which implies that h ( x ) h ( y ) ∈ E ( H ) , as B is complete to K .6. If h ′ ( x ) = p and h ′ ( y ) / ∈ { p, b } , then h ′ ( y ) = h ( y ) ∈ K ∪ M . Again, let C be the subgraph in C , which contains x and observe that p is of type P . So h ( x ) = h C ( x ) ∈ P , which implies that h ( x ) h ( y ) ∈ E ( H ) , as P is complete to K ∪ M .This concludes the proof of the claim. (cid:4) The running time analysis is analogous to the case of an F -decomposition. Note that S / ≃ and thus C can be computed in total time O ( n ·| H | ) . With a reasoning analogous to the one in the proof of Lemma 36,we conclude that if n is sufficiently large, then the problem can be solved in time α · c t · ( n · | H | ) d .45he final lemma, concerning B -decompositions, is the most complicated one. Since in this case thefirst factor, H , is bipartite, we know that every subgraph C of G that is mapped to H must be bipartitetoo. However, unlike in the case when the whole graph H is bipartite (i.e., Lemma 9), we do not knowin advance which bipartition class of C is mapped to which bipartition class of H . Thus for every C weneed to consider both possibilities. Lemma 38 ( B -decomposition lemma). Let H be a connected, non-bi-arc graph, and let ( B , B , K, M , M , Z ) be a B -decomposition of H . If there exist constants α, c, d such that T ( H , n, t ) α/ · c t · ( n · | H | ) d and T ( H , n, t ) α · c t · ( n · | H | ) d , then T ( H, n, t ) α · c t · ( n · | H | ) d , provided that n is sufficiently large.Proof. Let ( G, L ) be an instance of LHom ( H ) with n vertices, given along with a tree decomposition ofwith t . We define Q := { x ∈ V ( G ) : L ( x ) ∩ ( M ∪ M ∪ K ) = ∅} . Furthermore we define two subsetsof Q as follows: Q := { x ∈ Q : L ( x ) ∩ B = ∅} and Q := { x ∈ Q : L ( x ) ∩ B = ∅} . Note that byObservation 29 (2), if L ( x ) contains a vertex from K , then x / ∈ Q ∪ Q . Furthermore, if L ( x ) contains avertex from M , then x / ∈ Q , and if L ( x ) contains a vertex from M , then x / ∈ Q . This means that Q is disjoint with Q . Moreover, every vertex from Q has in its list a vertex from B and a vertex from M ,while every vertex from Q has in its list a vertex from B and a vertex from M .Similarly to e.g. Claim 36.1, we observe that every connected component C of G − Q must be entirelymapped either to B ∪ B or to Z . Recall that H = H [ B ∪ B ] is bipartite, so if C is not bipartite, thenwe can safely remove all vertices from B ∪ B from the lists of vertices of C , let us still call these lists L .Let S be the set of bipartite components of G − Q .Now let us consider an auxiliary graph G ′ defined as follows. The vertex set of G ′ is Q ∪ Q . We addto G ′ all edges of G with one end in Q and the other in Q . Observe that for each component C of G ′ and any list homomorphism ( G, L ) → H , either all vertices of C are mapped to B ∪ B (with V ( C ) ∩ Q mapped to B and V ( C ) ∩ Q mapped to B ), or all vertices of C are mapped to M ∪ M ∪ Z (with V ( C ) ∩ Q mapped to M ∪ Z and V ( C ) ∩ Q mapped to M ∪ Z ). Again, recall that H [ B ∪ B ] = H is bipartite. Thus if for any C ∈ comp( G ′ ) , the graph G [ V ( C )] is not bipartite, then we can safely removeall vertices from B ∪ B from the lists of the vertices of C . We still call these lists L . Let S be the set ofthose C ∈ comp( G ′ ) , for which G [ V ( C )] is bipartite. Note that in this case C = G [ V ( C )] .Observe that S ∪ S is a collection of pairwise vertex-disjoint bipartite induced subgraphs of G . Fur-thermore, no vertex appearing in a subgraph from S ∪ S has a vertex from K in its list. Moreover, weobserve that for any list homomorphism ( G, L ) → H , each C ∈ S ∪ S must be entirely mapped to B ∪ B or to M ∪ M ∪ Z . This is straightforward for C ∈ S , as these vertices do not contain anyvertex from K ∪ M ∪ M in their lists. For C ∈ S , we can observe that in the other case we would obtain uv ∈ E ( C ) , such that u is mapped to a vertex in B and v is mapped to a vertex in M , or u is mapped to avertex in B and v is mapped to a vertex in M . However, notice that for no edge of C such configurationof lists is possible.Let C ∈ S ∪ S and suppose it gets mapped to B ∪ B . If C ∈ S , then we know which bipartitionclass of C is mapped to B and which is mapped to B , i.e., V ( C ) ∩ Q is mapped to B and V ( C ) ∩ Q is mapped to B . On the other hand, if C ∈ S , both options might be possible.We define a set S as follows: for each C ∈ S with bipartition classes X, Y , we add to S twotriples: ( C, X, Y ) and ( C, Y, X ) . Similarly we define a set S : for each C ∈ S , we add to S the triple ( C, V ( C ) ∩ Q , V ( C ) ∩ Q ). Finally, define S := S ∪ S .The intuition behind S is that it represents the subgraphs that could be mapped to B ∪ B , takinginto considerations that some of them (i.e., the ones from S ) could be mapped to B ∪ B in two ways. Atriple ( C, X, Y ) ∈ S indicates that C could be potentially mapped to B ∪ B in a way that X is mappedto B and Y is mapped to B . 46ow we proceed similarly to the proof of Lemma 37. We define a relation ∼ ⊆ S , so that ( C , X , Y ) ∼ ( C , X , Y ) if and only if the following conditions hold: (i) ( C , X , Y ) ∈ S , and (ii) ( C , X , Y ) ∈ S ,and (iii) there is an edge with one endvertex in X and the other in Y , or an edge with one endvertexin Y , and the other in X . Note that if ( C , X , Y ) ∼ ( C , X , Y ) and there is a list homomorphism h : ( G, L ) → H , then either: (i) both C and C are mapped to B ∪ B where h ( X ∪ X ) ⊆ B and h ( Y ∪ Y ) ⊆ B , or (ii) no vertex from X ∪ X is mapped to B and no vertex from Y ∪ Y is mappedto B . This is because lists of vertices from X ∪ Y do no contain any vertex from K ∪ M ∪ M , whilelists of vertices of X (resp. Y ) do not contain any vertex from M ∪ B ∪ K (resp. M ∪ B ∪ K ).Now let ≃ be the smallest equivalence relation containing ∼ , and let S / ≃ be the set of equivalenceclasses of ≃ . We will define a set C of subgraphs of G .Consider an equivalence class π = { ( C , X , Y ) , . . . , ( C s , X s , Y s ) } from S / ≃ , and define X π := S i ∈ [ s ] X i and Y π := S i ∈ [ s ] Y i . Let C π be the subgraph of G induced by X π ∪ Y π . Recall that by thedefinition of ∼ , either (i) all vertices from X π must be mapped to B and all vertices from Y π must bemapped to B , or (ii) no vertex from X π is mapped to B and no vertex from Y π is mapped to B . Thusif C π is not bipartite, then we can safely remove all vertices from B from the lists of X π and all verticesfrom B from the lists of Y π , we still call these lists L .On the other hand, if C π is bipartite, we note that its bipartition classes are exactly X π and Y π . Weadd to C the triple ( C π , X π , Y π ) . Now C can be seen as a collection of bipartite induced subgraphs of G ,containing only vertices from ( V ( G ) − Q ) ∪ ( Q ∪ Q ) , such that each vertex from V ( G ) − Q appears inat most two of them, while every vertex from Q ∪ Q appears in one of them.We claim that at the current step the following holds. Claim 38.1. If x is a vertex such that L ( x ) ∩ B = ∅ (resp. L ( x ) ∩ B = ∅ ), then there exists ( C, X, Y ) ∈ C ,such that x ∈ X (resp. x ∈ Y ).Proof of Claim. Let us show the claim for the case that L ( x ) ∩ B = ∅ , as the other case is symmetric. Notethat since x has a vertex from B in its list, then either x ∈ Q or x ∈ V ( G ) − Q .In the first case, note that there is exactly one ( C ′ , X ′ , Y ′ ) ∈ S , such that x ∈ X ′ ∪ Y ′ , and, since x ∈ Q , we know that x ∈ X ′ . Consider the class π in S / ≃ containing ( C ′ , X ′ , Y ′ ) , and the triple ( C π , X π , Y π ) . Clearly x ∈ X π . Note that if C π is not bipartite, we would have removed all vertices of B from the list of x . But since L ( x ) ∩ B = ∅ , the graph C π must be bipartite and thus ( C π , X π , Y π ) is thedesired triple in C .So suppose that x ∈ V ( G ) − Q , and therefore x is in some bipartite connected component C ′ of G − Q . Let X ′ , Y ′ be the bipartition classes of C ′ , such that x ∈ X ′ . Recall that both triples ( C ′ , X ′ , Y ′ ) and ( C ′ , Y ′ , X ′ ) are in S . Let π and π ′ be the equivalence classes from S / ≃ , containing ( C ′ , X ′ , Y ′ ) and ( C ′ , Y ′ , X ′ ) , respectively.Observe that if π = π ′ , then x ∈ X π ∩ Y π and C π is not bipartite. Indeed, the definition of ∼ impliesthat there is an odd length walk starting and terminating at x . So in this case we have removed all verticesfrom B ∪ B from the list of x .So finally assume that π = π ′ and consider ( C π , X π , Y π ) and ( C π ′ , X π ′ , Y π ′ ) . Note that x ∈ X π ∩ Y π ′ .If C π is not bipartite, then we would have removed all vertices of B from the list of x . Therefore C π mustbe bipartite and ( C π , X π , Y π ) ∈ C is the desired triple. (cid:4) The following claim follows from the definition of C and the reasoning there. Claim 38.2.
Let ( C, X, Y ) ∈ C and suppose that there exists a list homomorphism h : ( G, L ) → H .(a) The image of C is entirely contained in B ∪ B or in M ∪ M ∪ Z . b) If the image of C is contained in B ∪ B , then either h ( X ) ⊆ B and h ( Y ) ⊆ B or h ( X ) ⊆ B and h ( Y ) ⊆ B . (cid:4) Let ( C, X, Y ) ∈ C . For every x ∈ X we define L ( x ) := L ( x ) ∩ B and for every x ∈ Y we define L ( x ) := L ( x ) ∩ B . Denote by C the set of these triples ( C, X, Y ) ∈ C , for which there exists ahomomorphism h ( C,X,Y ) : ( C, L ) → H .We define an instance ( G, L ) of LHom ( H ) as follows: L ( x ) := L ( x ) − ( B ∪ B ) ∪ { b , b } if there is some ( C , X , Y ) ∈ C , such that x ∈ X and some ( C , X , Y ) ∈ C , such that x ∈ Y ,L ( x ) − ( B ∪ B ) ∪ { b } if there is some ( C , X , Y ) ∈ C , such that x ∈ X ,but no ( C , X , Y ) ∈ C , such that x ∈ Y ,L ( x ) − ( B ∪ B ) ∪ { b } if there is some ( C , X , Y ) ∈ C , such that x ∈ Y ,but no ( C , X , Y ) ∈ C , such that x ∈ X ,L ( x ) − ( B ∪ B ) otherwise . Note that L are H -lists. Furthermore, by Claim 38.1 we observe that L ( x ) ∩ { b , b } = ∅ if (i) L ( x ) ∩ ( B ∪ B ) = ∅ , or (ii) L ( x ) ∩ ( B ∪ B ) = ∅ , but for every ( C, X, Y ) ∈ C , such that x ∈ X ∪ Y , we have ( C, X, Y ) / ∈ C . This means that removing B ∪ B from the list of x was justified.Finally, we are ready to show the main claim of the lemma. Claim 38.3.
There exists a list homomorphism h : ( G, L ) → H if and only if there exists a list homomor-phism h ′ : ( G, L ) → H .Proof of Claim. First, assume that h : ( G, L ) → H exists. Define h ′ : V ( G ) → V ( H ) in the following way: h ′ ( x ) := b if h ( x ) ∈ B ,b if h ( x ) ∈ B ,h ( x ) otherwise.The fact that h ′ is a homomorphism follows from the definition of H and the fact that h is a homomor-phism. We need to show that for every x we have h ′ ( x ) ∈ L ( x ) .If h ′ ( x ) / ∈ { b , b } , then h ′ ( x ) = h ( x ) ∈ L ( x ) − ( B ∪ B ) ⊆ L ( x ) . So consider the case that h ′ ( x ) = b (the case if h ′ ( x ) = b is symmetric). This means that h ( x ) ∈ B and thus L ( x ) ∩ B = ∅ ,so, by Claim 38.1, there is some ( C, X, Y ) ∈ C , such that x ∈ X . Since h ( x ) ∈ B , Claim 38.2 (a) impliesthat h maps all vertices of C to B ∪ B , and by Claim 38.2 (b) we have that h ( X ) ⊆ B and h ( Y ) ⊆ B .Therefore ( C, X, Y ) ∈ C and thus b ∈ L ( x ) by the definition of L .Now suppose there exists a list homomorphism h ′ : ( G, L ) → H . We define a mapping h : V ( G ) → V ( H ) as follows. If h ′ ( x ) / ∈ { b , b } , then h ( x ) := h ′ ( x ) . If h ′ ( x ) ∈ { b , b } , then, by the definition of L ,there is ( C, X, Y ) ∈ C , such that x ∈ X if h ′ ( x ) = b or x ∈ Y if h ′ ( x ) = b . Moreover, recall that bythe construction of C this ( C, X, Y ) is unique. Then we set h ( x ) = h ( C,X,Y ) ( x ) .For every x ∈ V ( G ) we have h ( x ) ∈ L ( x ) : if h ′ ( x ) / ∈ { b , b } , then h ( x ) = h ′ ( x ) ∈ L ( x ) −{ b , b } ⊆ L ( x ) , and if h ′ ( x ) ∈ { b , b } , then h ( x ) ∈ L ( x ) by the definition of h ( C,X,Y ) .So let us show that h is a homomorphism. Consider an edge xy of G and the following cases.1. If h ′ ( x ) , h ′ ( y ) / ∈ { b , b } , then h ( x ) h ( y ) = h ′ ( x ) h ′ ( y ) ∈ E ( H − { b , b } ) ⊆ E ( H ) , by the factthat h ′ is a homomorphism. 48. If h ′ ( x ) = b and h ′ ( y ) = b , then, by the definition of L , there are ( C , X , Y ) ∈ C and ( C , X , Y ) ∈ C , such that x ∈ X and y ∈ Y . But since there is an edge from X to Y , wemust have ( C , X , Y ) = ( C , X , Y ) , by the definition of ∼ and C . So we have h ( x ) h ( y ) = h ( C ,X ,Y ) ( x ) h ( C ,X ,Y ) ( y ) ∈ E ( H ) ⊆ E ( H ) .3. The case h ′ ( x ) = h ′ ( y ) = b or h ′ ( x ) = h ′ ( y ) = b cannot occur, as h ′ is a homomorphism and b , b have no loops.4. Finally, consider the case that h ′ ( x ) ∈ { b , b } and h ′ ( y ) / ∈ { b , b } . Assume that h ′ ( x ) = b , as theother case is symmetric. This implies that h ( x ) ∈ B . Since h ′ is a homomorphism, we observe that h ( y ) = h ′ ( y ) ∈ K ∪ M . Therefore h ( x ) h ( y ) ∈ E ( H ) .This concludes the proof of the claim. (cid:4) We observe that C can be computed in total time O (( n ·| H | ) ) . Computing h ( C,X,Y ) for all ( C, X, Y ) ∈ C can be done in total time: X ( C,X,Y ) ∈ C T ( H , | C | , t ) X ( C,X,Y ) ∈ C α/ · c t · ( | H | · | C | ) d (cid:16) α/ · c t · ( | H | · n ) d (cid:17) = α · c t · ( | H | · n ) d , as every vertex of G might appear twice in subgraphs in C . The rest of the argument is exactly the same asin the case of an F -decomposition and a BP -decomposition. Finally we conclude that if n is sufficientlylarge, then the problem can be solved in time α · c t · ( n · | H | ) d . As we have seen, in Lemma 33 we have assumed that H is not a strong split graph. This case is somehowspecial, as if H is a strong split graph, then the straightforward bipartite decomposition of H ∗ does notcorrespond to any of decompositions defined in the preceding section. We will consider these graphs H separately. Lemma 39.
Let H be a strong split graph with partition ( B, P ) . Let H ′ be the graph obtained from H by re-moving all edges with both endvertices in P , including loops. The LHom ( H ) problem with instance ( G, L ) with n vertices, given along with a tree decomposition of width t , can be solved in time O (cid:16) i ∗ ( H ′ ) t · ( n · | H | ) O (1) (cid:17) .Proof. Let X (resp. Y ) be the set of vertices x ∈ V ( G ) , such that L ( x ) ∩ B = ∅ (resp. L ( x ) ∩ P = ∅ ).Observe that for every p ∈ P and b ∈ B we have N ( b ) ⊆ N ( p ) , so, by Observation 29 (2), the sets X and Y are disjoint. Since we can assume that there are no vertices of G with empty lists, we conclude that X, Y is a partition of V ( G ) .Furthermore, notice that if X is not independent, then we can immediately report that ( G, L ) is a no-instance. So assume that X is independent. Let G ′ be the graph obtained from G by removing all edgeswith both endvertices in Y , including loops. Clearly H ′ and G ′ are bipartite, with bipartition classes B, P and
X, Y , respectively. Furthermore, any tree decomposition of G is also a tree decomposition of G ′ .Recall that (i) P is a reflexive clique and (ii) L ( X ) ⊆ B and L ( Y ) ⊆ P . Furthermore, (iii) in order toobtain G ′ and H ′ we have removed all edges with two endvertices inside Y and P , respectively. Thesethree facts imply the following. Claim 39.1.
Consider a function h : V ( G ) → V ( H ) , such that for every x ∈ V ( G ) it holds that h ( x ) ∈ L ( x ) . Then h is a homomorphism from G to H if and only if it is a homomorphism from G ′ to H ′ . (cid:4) Thus we can determine whether ( G, L ) → H by calling the algorithm for bipartite target graphs, givenby Theorem 3’ a). 49n the following corollary we bound the running time of the algorithm from Lemma 39 in terms of theoriginal target graph. Corollary 40.
Let b H be a graph and let H be a strong split graph, which was obtained from b H by a se-ries of decompositions. The LHom ( H ) problem with instance ( G, L ) with n vertices, given along with a treedecomposition of width t , can be solved in time O ( i ∗ ( b H ) t · ( n · | H | ) O (1) ) .Proof. Let H ′ be defined as in Lemma 39. Note that if H ′ is the complement of a circular-arc graph, thenthe problem can be solved in polynomial time, so the claim clearly holds. Otherwise, let H ′′ be the con-nected, induced, undecomposable subgraph of H ′ , whose complement is not a circular-arc graph, suchthat i ( H ′′ ) = i ∗ ( H ′ ) .Recall from Lemma 34 that H ∗ is an induced subgraph of b H ∗ . Observe that H ∗ consists of two copiesof H ′ , induced by the sets B ′ ∪ P ′′ and B ′′ ∪ P ′ , with additional edges joining every vertex from P ′ withevery vertex from P ′′ . Thus H ′ is an induced subgraph of H ∗ , and therefore H ′′ is an induced subgraph of b H ∗ . This means that i ∗ ( b H ) = i ∗ ( b H ∗ ) > i ( H ′′ ) = i ∗ ( H ′ ) . Therefore the algorithm from Lemma 39 solved ( G, L ) in time O (cid:16) i ∗ ( H ′ ) t · ( n · | H | ) O (1) (cid:17) = O (cid:16) i ∗ ( b H ) t · ( n · | H | ) O (1) (cid:17) . LHom ( H ) for general target graphs By Lemma 33, it is straightforward to observe the following.
Observation 41. If H is a connected, undecomposable, non-bi-arc graph, then i ∗ ( H ) is the size of the largestincomparable set in H . (cid:3) In this section we will prove the following, slightly stronger version of Theorem 5 a), where the inputtree decomposition is not assumed to be optimal.
Theorem 5’ a).
Let H be non-bi-arc graph. Even if H is given as an input, the LHom ( H ) problem withinstance ( G, L ) can be solved in time O (cid:16) i ∗ ( H ) t · ( n · | H | ) O (1) (cid:17) for any lists L , provided that G is givenwith its tree decomposition of width t . The main idea is similar to the one in the proof of Theorem 3’ a): given an instance of
LHom ( H ), werecursively decompose H into smaller subgraphs and reduce the initial instance to a number of instancesof list homomorphism to these smaller subgraphs. Finally, we solve the problem for leaves of the recursiontree, and then, using Lemma 35 in a bottom-up fashion, we will compute the solution to the originalinstance.The only thing missing is how to solve the instances corresponding to leaves of the recursion tree. Wedescribe this in the following lemma. Lemma 42.
Let H be an arbitrary graph. Then any n -vertex instance ( G, L ) of LHom ( H ) can be solved intime O (cid:16) i ( H ∗ ) t · ( n · | H | ) O (1) (cid:17) , assuming a tree decomposition of G with width at most t is given.Proof. Let ( G ∗ , L ∗ ) be the associated instance of LHom ( H ∗ ). By Proposition 30, we know that ( G, L ) → H if and only if there is a clean homomorphism ( G ∗ , L ∗ ) → H ∗ . We will focus on finding such a cleanhomomorphism.First, recall that by Observation 29 (2) and Observation 32 (1), the instance ( G ∗ , L ∗ ) is consistent. So,by Corollary 8, the size of each list in L ∗ is at most i ( H ∗ ) . Moreover, by Observation 32 (1), for every x ∈ ( G ) , the vertices in L ∗ ( x ′ ) are precisely the twins of vertices in L ∗ ( x ′′ ) . Finally, by Observation 32 (2),in polynomial time we can obtain a tree decomposition T ∗ of G ∗ with width at most t , in which verticesof G ∗ come in pairs: whenever any bag contains x ′ , it also contains x ′′ .Consider the straightforward dynamic programming algorithm for LHom ( H ∗ ), using the tree decom-position T ∗ of G ∗ . We observe that since we are looking for a clean homomorphism, we do not needto remember partial solutions, in which the colors of twins do not agree. Thus, even though the sizeof each bag of T ∗ is at most t , the number of partial colorings we need to consider is bounded by (max x ∈ V ( G ∗ ) | L ∗ ( x ) | ) t i ( H ∗ ) t . So the claim follows.Finally, let us wrap everything up and prove Theorem 5’ a). The proof is analogous to the proof ofTheorem 3’ a). Proof of Theorem 5’ a).
Again, we can assume that n is sufficiently large, as otherwise we can solve theproblem by brute-force.Let ( G, L ) be an instance of LHom ( H ), where G has n vertices and is given along with its tree decom-position of width at most t . We proceed as in the Theorem 3’ a). We consider a recursion tree R , obtainedby decomposing H recursively. For each node corresponding to some graph H ′ , we construct its childrenrecursively, unless none of the following happens (i) H ′ is a bi-arc graph, (ii) H ′ is bipartite, (iii) H ′ is astrong split graph, or (iv) H ′ is undecomposable.We compute the solutions in a bottom-up fashion. First, consider a leaf of the recursion tree, let thecorresponding target graph for this node of R be H ′ . If H ′ is a bi-arc graph, we can solve the problem inpolynomial time. If H ′ is bipartite, we solve the problem in time β · i ∗ ( H ′ ) · ( n ·| H ′ | ) d β · i ∗ ( H ) · ( n ·| H ′ | ) d for some constants β and d , using the algorithm from Theorem 3’ a). If H ′ is a strong split graph, we cansolve the problem in time γ · i ∗ ( H ) · ( n · | H ′ | ) d , for constants γ, d , using the algorithm from Corollary 40.So finally consider the remaining case, i.e., that H ′ is connected, non-bi-arc, non-bipartite, undecom-posable, which is not a strong split graph. Furthermore we know that H ′ was obtained from H by asequence of decompositions.Recall that by Lemma 42, we can solve the instances of LHom ( H ′ ) in time δ · i ( H ′∗ ) t · ( n · | H ′ | ) d ,for some constants δ, d . Let us consider the graph H ′∗ , by Lemma 34 we know that H ′∗ is an inducedsubgraph of H ∗ . Also, H ′∗ is either connected (if H ′ is non-bipartite), or consists of two disjoint copiesof H ′ (if H ′ is bipartite). Moreover, by Lemma 33, we observe that H ′∗ is undecomposable. Thus, by thedefinition of i ∗ ( H ) , we observe that i ( H ′∗ ) max { i ( H ′′ ) : H ′′ is an undecomposable, connected, induced subgraph of H ∗ , whose complement is not a circular-arc graph } = i ∗ ( H ) . So the algorithm from Lemma 42 solves the instances corresponding to leaves of R in time δ · i ∗ ( H ) t · ( n ·| H ′ | ) d . Define α := max(2 β, γ, δ ) and d := max( d , d , d , .By applying Lemma 35 (in fact, Lemma 36, Lemma 37, and Lemma 38, note that we adjusted the con-stants α and d so that their assumptions are satisfied) for every non-leaf node of R in a bottom-up fashion,we conclude that we can solve LHom ( H ) in time α · i ∗ ( H ) t · ( n · | H | ) d = O (cid:16) i ∗ ( H ) t · ( n · | H | ) O (1) (cid:17) , whichcompletes the proof. 51 Hardness for general target graphs
We aim to show the following. Note that again we are able to show the hardness parameterized by thepathwidth. Actually, we can show that the lower bound holds even if the input graph G is bipartite. Theorem 5’ b).
Let H be a fixed non-bi-arc graph. Unless the SETH fails, there is no algorithm that solvesthe LHom ( H ) problem on bipartite instances with n vertices and pathwidth t in time ( i ∗ ( H ) − ε ) t · n O (1) , forany ε > . The crucial observation is the following.
Proposition 43.
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 .Proof. First, consider f : ( G, L ) → H ∗ . For every x ∈ V ( G ) , we define f ′ ( x ) to be the unique vertex u of H , such that f ( x ) ∈ { u ′ , u ′′ } . Note that since { u ′ , u ′′ } ∩ L ( x ) = ∅ , we have u ∈ L ′ ( x ) . Nowconsider an edge xy of G . Since f is a homomorphism, we have f ( x ) f ( y ) ∈ E ( H ∗ ) . Without loss ofgenerality assume that f ( x ) = u ′ and f ( y ) = v ′′ for some some edge uv of H (possibly u = v ). But then f ′ ( x ) f ′ ( y ) = uv ∈ E ( H ) , so f ′ is a homomorphism from ( G, L ′ ) to H .Now consider a homomorphism f ′ : ( G, L ′ ) → H . Since ( G, L ) is consistent, we know that G isbipartite with bipartition classes X G and Y G , where L ( X G ) ⊆ { u ′ : u ∈ V ( H ) } and L ( Y G ) ⊆ { u ′′ : u ∈ V ( H ) } . Let x ∈ V ( G ) and f ′ ( x ) = u . Then we set f ( x ) = u ′ if x ∈ X G or f ( x ) = u ′′ if x ∈ Y G . First,let us show that f respects the lists L . Consider a vertex x ∈ X G (the case of a vertex in Y G is symmetric).Since f ′ ( x ) = u , we observe that u ∈ L ′ ( x ) , which means that u ′ ∈ L ( x ) . So f respects lists L . Nowconsider an edge xy of G , such that x ∈ X G and y ∈ Y G . Assume that f ′ ( x ) = u and f ′ ( y ) = v , where uv is an edge of H (possibly u = v ). Then f ( x ) f ( y ) = u ′ v ′′ , which is an edge of H ∗ . So f is a homomorphismfrom G to H ∗ .Clearly Theorem 5’ b) implies Theorem 3’ b). We will show that the reverse implication also holds.Recall that we have already shown that Theorem 3’ b) is equivalent to Theorem 11, so in fact we willprove that all these three theorems are equivalent. (Theorem 3’ b) → Theorem 5’ b))
Suppose Theorem 3’ b) holds and Theorem 5’ b) fails. So there is anon-bi-arc graph H and an algorithm A that solves LHom ( H ) in time ( i ∗ ( H ) − ε ) pw( G ) · n O (1) for everybipartite input ( G, L ) , provided that G is given along with its optimal path decomposition.Recall that i ∗ ( H ) = i ∗ ( H ∗ ) . Let ( G, L ) be an arbitrary instance of LHom ( H ∗ ). We can assume that G isbipartite and connected, and the instance ( G, L ) is consistent. Consider the instance ( G, L ′ ) of LHom ( H ),constructed as in Proposition 43. The algorithm A solves this instance in time ( i ∗ ( H ) − ε ) pw( G ) · n O (1) . ByProposition 43, this is equivalent to solving the instance ( G, L ) of LHom ( H ∗ ) in time ( i ∗ ( H ∗ ) − ε ) pw( G ) · n O (1) , contradicting Theorem 3’ b). 52 Conclusion
Let us conclude the paper with some side remarks and pointing out several open problems.
Recall that the crucial tool for our algorithmic results were the decompositions of a connected graph H ,introduced in Section 2.1 (for bipartite graphs H ) and in Section 4.2 (for general graphs H ). Let us ana-lyze how the general decompositions behave in two natural special cases: if H is either a reflexive or anirreflexive graph. We use the notation introduced in Definition 9, Definition 10, and Definition 11.First we consider the case that H is reflexive, i.e., every vertex of H has a loop. Let us point out that a B -decomposition cannot occur in this case, as the sets B , B are empty. In case of an F -decompositionwe obtain exactly the decomposition defined by Egri et al. [18, Lemma 8]. Finally, in the case of a BP -decomposition, note that the set B is empty and therefore each vertex in P has exactly the same neigh-borhood. Thus the total contribution of the vertices in P to i ∗ ( H ) is at most 1. Therefore the only type ofdecomposition that can be algorithmically exploited in reflexive graph is the F -decomposition, as observedby Egri et al. [18].Now let us consider the case that H is irreflexive, i.e., no vertex of H has a loop. Observe that thesets K and P are reflexive cliques, so they are empty in our case. Thus BP -decompositions and F -decompositions do not occur in this case (recall that H is connected). Therefore the only possibility left isa B -decomposition, in which the set K is empty. Let us point out that this decomposition is very similarto the bipartite decomposition, in particular, the graph H is bipartite (while H might be non-bipartite).This gives even more evidence that the case of bipartite graphs H is a crucial step to understanding thecomplexity of the LHom ( H ) problem. Actually, if H is bipartite, then the B -decomposition turns out tobe equivalent to the bipartite decomposition introduced in Section 2.1. The argument used in Lemma 9 issignificantly simpler than the one in Lemma 38, as in the bipartite case we can assume that the instance isconsistent and we know which vertices will be mapped to B , and which to B . In the general case we donot know it, so we need to consider both possibilities, as we do in Lemma 38. H Knowing the precise complexity bounds for
LHom ( H ), we might be interested in a question, how hard isto find a list homomorphism to a typical graph H . We say that a property P holds for almost all graphs , iffor a graph G , chosen with uniform probability from the set of all graphs with n vertices, the probabilitythat G satisfies P tends to 1 as n → ∞ . Properties that hold for almost all graphs can be studied in termsof the random graph G ( n, / . Formally, it is a probability space over all graph with vertex set [ n ] , wherethe edge ij exists with probability / . Here we extend the usual model by allowing loops on vertices (alsowith probability / ), but this does not change much in the reasoning. See the monograph of Alon andSpencer for more information [1].It is well-known and straightforward to observe that for any fixed graph O , almost all graphs contain O as an induced subgraph. By applying this for, say, O = C , we obtain that almost all graphs are non-bi-arc graphs. Also, it is known that almost all graphs are connected [10, 38]. Finally, let us considerincomparable sets in a typical graph H . Lemma 44.
For almost all graphs H , every pair of distinct vertices is incomparable. roof. Consider a random graph with vertex set [ n ] , where each edge (including loops) appears indepen-dently from others with probability / . For each i, j ∈ [ n ] (non-necessarily distinct) we introduce arandom variable I i,j , whose value is if and only if the edge ij exists. Clearly N ( i ) ⊆ N ( j ) if and only if I j,k > I i,k for every k ∈ [ n ] .For every i = j and every k , the probability that I j,k > I i,k is / . Thus, for fixed i = j , the probabilitythat N ( i ) ⊆ N ( j ) is (3 / n . So the probability that there is a pair i, j , such that N ( i ) ⊆ N ( j ) , is at most n ( n − / n , which tends to 0 as n → ∞ . This means that with probability tending to all pairs ofdistinct vertices are incomparable.Note that this in particular implies that almost all graphs are undecomposable, as each decompositionnecessarily contains pairs of comparable vertices. Similarly, almost all graphs are not strong split graphs.Since for connected, undecomposable graphs H , the value of i ∗ ( H ) it is equal to the size of the largestincomparable set in H (recall Observation 41), we conclude that for almost all graphs H we have i ∗ ( H ) = | V ( H ) | .All these observations lead to the following corollary (note that again we can strengthen the statementgiven in the introduction by replacing the treewidth by the pathwidth). Corollary 6’.
For almost all graphs H with possible loops the following holds. Even if H is fixed, there is noalgorithm that solves LHom ( H ) for every instance ( G, L ) on n vertices in time O (( | V ( H ) | − ε ) pw( G ) · n O (1) ) for any ε > , unless the SETH fails. We believe that the decompositions that we discovered can be used for many problems concerning thecomplexity of variants of the
LHom ( H ) problem, e.g., for various other parameterizations. Let us pointout that in the proofs of Lemma 9 and Lemma 35, we did not really require that the running time is of theform O ( c tw( G ) · ( n · | H | ) d ) , for a constant c .Moreover, recall that in each variant of the decomposition lemma, all instances for which we computedpartial results were induced subgraphs of G , the original instance. This motivates the following, general-ized statement. For a graph G , and a graph H , let T ( G, H, n ) be an upper bound for the complexity of the LHom ( H ) problem for instances of size n , which are induced subgraphs of G . Corollary 45.
Let H be a connected, non-bi-arc graph. Let R be its recursion tree, and by Leaves( R ) wedenote the set of graphs associated with leaves of R . Consider an instance ( G, L ) of LHom ( H ) with n vertices.Suppose that that for each H ′ ∈ Leaves( R ) it holds that T ( G, H ′ , n ′ ) f ( n ′ , H ′ ) , where f is superaddi-tive with respect to its first argument. Then ( G, L ) can be solved in time O (cid:16)P H ′ ∈ Leaves( R ) f ( n, H ′ ) + n · | H | (cid:17) .Sketch of proof. The proof is analogous to the proofs of Theorem 3’ a) and Theorem 5’ a). Recall that wecan compute the instances associated with the leaves of R , and then proceed in a bottom-up fashion. Eventhough there might be more than one instance associated with a leaf node, recall that their numbers ofvertices sum up to n , so by the superadditivity of f we can bound the running time related to each leafnode, associated with H ′ , by f ( n, H ′ ) .Now let us consider an internal node of R , it is associated with some subgraph H ′ of H . Recall that thecomputation for this node consists of the computations for child nodes and O ( n | H ′ | ) additional steps.Since the total number of nodes of R is O ( | H | ) , we can bound the total running time for the root node(i.e., time needed to solve ( G, L ) ) by O (cid:16)P H ′ ∈ Leaves( R ) f ( n, H ′ ) + n · | H | (cid:17) .54 .4 Gadgets for general graphs Recall that we proved hardness for general graphs H by reducing the problem to the bipartite case. Inparticular, all our gadgets, including the most important NEQ( S ) -gadget, are constructed for bipartitegraphs only. However, we believe that in some other contexts it might be useful to be able to obtain suchgadgets also for non-bipartite H . Luckily, our constructions can be simply translated to this case too.Observe that the proof of Proposition 43 gives the following, slightly stronger version. Proposition 46.
Let H be an undecomposable non-bi-arc graph. Let G be a bipartite graph with bipartitionclasses X, Y and H ∗ -lists L , where L ( X ) ⊆ V ( H ) ′ and L ( Y ) ⊆ V ( H ) ′′ . Define L ′ : V ( G ) → V ( H ) as L ′ ( v ) = { u : { u ′ , u ′′ } ∩ L ( v ) = ∅} . Then the following hold:1. For f : ( G, L ) → H ∗ , define f ′ : V ( G ) → V ( H ) by setting f ′ ( v ) to be the unique vertex u of H , suchthat f ( v ) ∈ { u ′ , u ′′ } . Then f ′ is a list homomorphism from ( G, L ′ ) to H .2. For f ′ : ( G, L ′ ) → H , define f : V ( G ) → V ( H ∗ ) by setting f ( v ) := u ′ if v ∈ X and f ( v ) := u ′′ if v ∈ Y , where u = f ′ ( v ) . Then f is a list homomorphism from ( G, L ) to H ∗ . In particular we can extend Lemma 4 and construct and
NEQ( S ) -gadget for every non-bi-arc graphthat might appear as a leaf of the recursion tree of H . Corollary 47.
Let H be a connected non-bi-arc graph, which is eithera) undecomposable, orb) a strong split graph, such that the graph H ′ , obtained from H by removing all edges with both endverticesin P (including loops), is undecomposable.Let S ⊆ V ( H ) , such that | S | > and for any a, b ∈ S we have N ( a ) N ( b ) and N ( a ) N ( b ) . Thenthere exists a NEQ( S ) -gadget, i.e., a graph F with H -lists L and two special vertices x, y ∈ V ( F ) , such that L ( x ) = L ( y ) = S and• for any list homomorphism h : ( F, L ) → H , it holds that h ( x ) = h ( y ) ,• for any distinct a, b ∈ S there is a list homomorphism h : ( F, L ) → H , such that h ( x ) = a and h ( y ) = b .Proof. In case a), by Lemma 33, H ∗ is undecomposable. Thus the claim follows directly from applyingProposition 46 to the NEQ( S ′ ) -gadget for H ∗ (where S ′ := { s ′ : s ∈ S } ), constructed in Lemma 4.In case b), let ( B, P ) be the partition of H . Observe that for every b ∈ B and p ∈ P we have N ( b ) ⊆ N ( p ) , so S is either contained in B , or in P . In other words, S is contained in one bipartitionclass of H ′ . Let ( F, L ) be the NEQ( S ) -gadget for H ′ . Recall that H ′ is an induced subgraph of H ∗ , so L are H ∗ -lists. Now the claim follows from applying Proposition 46 to ( F, L ) .Note that all other gadgets, e.g. distinguishers, could be generalized in a similar way. In this paper we have shown tight complexity bounds for the list homomorphism problem, parameterizedby the treewidth of the instance graph.A very natural question, mentioned also in [18], is to provide analogous results for the non-list variantof the problem, denoted by
Hom ( H ). Let us point out that despite of the obvious similarity of Hom ( H ) and LHom ( H ), the methods used to obtain hardness proofs for these problems are very different. For the listvariant most hardness proofs (including all proofs in this paper) are purely combinatorial [19, 20, 21] andare based on considering some local structures in the target graph – note that we can ignore the remaining55ertices of H by not including them in any list. On the other hand, in the Hom ( H ) problem, we need tobe able to capture the structure of the whole graph H at once. This is the reason why hardness proofs forthe non-list variant usually require using some algebraic tools [30, 11, 43].Very recently, Okrasa and Rzążewski were able to provide tight bounds for the complexity of Hom ( H ),assuming two conjectures from algebraic graph theory from early 2000s [40]. It would be very interestingto strengthen these results, either by proving the mentioned two conjectures, or by providing a differentreduction.Another interesting direction is to consider one of many other variants of the graph homomorphismproblem. Let us mention one, i.e., locally surjectve homomorphism , denoted by LSHom ( H ). In this problemwe ask for a homomorphism from an instance graph G to the target graph H , which is surjective on eachneighborhood. In other words, if we map some vertex x ∈ V ( G ) to some vertex v ∈ V ( H ) , then everyneighbor of v must appear as a color of some neighbor of x [24, 22, 23, 39]. We believe that it is interestingto show tight complexity bounds for this problem. One of the reasons why this problem is challenging isthat the natural dynamic programming runs in time O ( | H |· tw( G )) · ( n + | H | ) O (1) . Thus in order to showthat this bound is tight, it is not sufficient to design edge gadgets encoding inequality and substitute alledges of the instance of k - Coloring with these edge gadgets, as we did in this paper. Since the numberof colors needs to be exponential in H , one should also design some vertex gadgets , which will encode theexponential number of possible states.Finally, instead of changing the problem, we can consider changing the parameter. We believe thatan exciting question is to find tight bounds for Hom ( H ) and LHom ( H ), parameterized by the cutwidth ofthe instance graph, denoted by cw( G ) . Quite recently Jansen and Nederlof showed that the chromaticnumber of a graph can be found in time O (cw( G )) · n O (1) [34], i.e., the base of the exponential factor doesnot depend on the number of colors. Jansen [33] asked whether the same is possible for Hom ( H ) and LHom ( H ), if the target H is not complete? Note that while the chromatic number of a graph can be foundin time n · n O (1) [4], for the Hom ( H ) and LHom ( H ) problems the | H | O ( n ) -time algorithm is essentiallybest possible, assuming the ETH [15]. We believe that a similar phenomenon might occur if the cutwidthis a parameter. Acknowledgment.
We are grateful to Daniél Marx and Lászlo Egri for much advice regarding the topicand to Kamil Szpojankowski for an inspiring discussion about almost all graphs.56 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, Derek G. Corneil, and Andrzej Proskurowski. Complexity of finding embeddings ina k -tree. SIAM J. Algebraic Discrete Methods , 8(2):277–284, April 1987.[3] Stefan Arnborg and Andrzej Proskurowski. Linear time algorithms for NP-hard problems restrictedto partial k -trees. Discrete Applied Mathematics , 23(1):11–24, 1989.[4] Andreas Björklund, Thore Husfeldt, and Mikko Koivisto. Set partitioning via inclusion-exclusion.
SIAM J. Comput. , 39(2):546–563, 2009.[5] Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth.
SIAM J. Comput. , 25(6):1305–1317, 1996.[6] Hans L. Bodlaender, Paul S. Bonsma, and Daniel Lokshtanov. The fine details of fast dynamic pro-gramming over tree decompositions. In
Parameterized and Exact Computation - 8th InternationalSymposium, IPEC 2013, Sophia Antipolis, France, September 4-6, 2013, Revised Selected Papers , pages41–53, 2013.[7] Hans L. Bodlaender, Marek Cygan, Stefan Kratsch, and Jesper Nederlof. Deterministic single exponen-tial time algorithms for connectivity problems parameterized by treewidth.
Inf. Comput. , 243:86–111,2015.[8] Hans L. Bodlaender, Pål Grønås Drange, Markus S. Dregi, Fedor V. Fomin, Daniel Lokshtanov, andMichal Pilipczuk. A c k n SIAM J. Comput. , 45(2):317–378,2016.[9] Hans L. Bodlaender and Arie M. C. A. Koster. Combinatorial optimization on graphs of boundedtreewidth.
Comput. J. , 51(3):255–269, May 2008.[10] Béla Bollobás. The diameter of random graphs.
Transactions of the American Mathematical Society ,267(1):41–52, 1981.[11] Andrei A. Bulatov. H -coloring dichotomy revisited. Theor. Comput. Sci. , 349(1):31–39, 2005.[12] Andrei A. Bulatov. Constraint satisfaction problems: Complexity and algorithms. In Shmuel TomiKlein, Carlos Martín-Vide, and Dana Shapira, editors,
Language and Automata Theory and Applica-tions , pages 1–25, Cham, 2018. Springer International Publishing.[13] Rajesh Chitnis, László Egri, and Dániel Marx. List H-coloring a graph by removing few vertices.
Algorithmica , 78(1):110–146, 2017.[14] Bruno Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs.
Inf.Comput. , 85(1):12–75, 1990.[15] 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. 5716] Marek Cygan, Fedor V Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk,Michał Pilipczuk, and Saket Saurabh.
Parameterized algorithms . Springer, 2015.[17] 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.[18] 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.[19] Tomas Feder and Pavol Hell. List homomorphisms to reflexive graphs.
Journal of CombinatorialTheory, Series B , 72(2):236 – 250, 1998.[20] Tomás Feder, Pavol Hell, and Jing Huang. List homomorphisms and circular arc graphs.
Combinator-ica , 19(4):487–505, 1999.[21] 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.[22] Jirí Fiala and Jana Maxová. Cantor-Bernstein type theorem for locally constrained graph homomor-phisms.
Eur. J. Comb. , 27(7):1111–1116, 2006.[23] Jirí Fiala and Daniël Paulusma. A complete complexity classification of the role assignment problem.
Theor. Comput. Sci. , 349(1):67–81, 2005.[24] Jirí Fiala, Daniël Paulusma, and Jan Arne Telle. Matrix and graph orders derived from locally con-strained graph homomorphisms. In Joanna Jedrzejowicz and Andrzej Szepietowski, editors,
Math-ematical Foundations of Computer Science 2005, 30th International Symposium, MFCS 2005, Gdansk,Poland, August 29 - September 2, 2005, Proceedings , volume 3618 of
Lecture Notes in Computer Science ,pages 340–351. Springer, 2005.[25] Fedor V. Fomin, Pinar Heggernes, and Dieter Kratsch. Exact algorithms for graph homomorphisms.
Theory Comput. Syst. , 41(2):381–393, 2007.[26] Markus Frick and Martin Grohe. The complexity of first-order and monadic second-order logic revis-ited.
Ann. Pure Appl. Logic , 130(1-3):3–31, 2004.[27] Michael R. Garey and David S. Johnson.
Computers and Intractability: A Guide to the Theory of NP-Completeness . W. H. Freeman & Co., New York, NY, USA, 1979.[28] Richard Hammack, Wilfried Imrich, and Sandi Klavžar.
Handbook of product graphs . Discrete Math-ematics and its Applications (Boca Raton). CRC Press, Boca Raton, FL, second edition, 2011. With aforeword by Peter Winkler.[29] Pavol Hell and Jaroslav Nešetřil.
Graphs and homomorphisms . Oxford University Press, 2004.[30] Pavol Hell and Jaroslav Nešetřil. On the complexity of H -coloring. J. Comb. Theory, Ser. B , 48(1):92–110, 1990. 5831] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k -SAT. J. Comput. Syst. Sci. ,62(2):367–375, 2001.[32] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponen-tial complexity?
J. Comput. Syst. Sci. , 63(4):512–530, 2001.[33] Bart M. P. Jansen. personal communication.[34] Bart M. P. Jansen and Jesper Nederlof. Computing the chromatic number using graph decompositionsvia matrix rank.
Theor. Comput. Sci. , 795:520–539, 2019.[35] Tomasz Kociumaka and Marcin Pilipczuk. Deleting vertices to graphs of bounded genus.
Algorithmica ,81(9):3655–3691, 2019.[36] Stefan Kratsch, Daniel Lokshtanov, Dániel Marx, and Peter Rossmanith. Optimality and tight resultsin parameterized complexity (dagstuhl seminar 14451).
Dagstuhl Reports , 4(11):1–21, 2014.[37] 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.[38] John W Moon and Leo Moser. Almost all (0 , matrices are primitive. Studia Scient. Math. Hung. ,1:153–156, 1966.[39] Karolina Okrasa and Paweł Rzążewski. Subexponential algorithms for variants of the homomorphismproblem in string graphs.
J. Comput. Syst. Sci. , 109:126–144, 2020.[40] 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.[41] Michał Pilipczuk. Problems parameterized by treewidth tractable in single exponential time: A logicalapproach. In
MFCS 2011 , volume 6907, pages 520–531. Springer, 2011.[42] Paweł Rzążewski. Exact algorithm for graph homomorphism and locally injective graph homomor-phism.
Inf. Process. Lett. , 114(7):387–391, 2014.[43] Mark H. Siggers. A new proof of the H -coloring dichotomy. SIAM Journal on Discrete Mathematics ,23(4):2204–2210, 2010.[44] William T. Trotter and John I. Moore. Characterization problems for graphs, partially ordered sets,lattices, and families of sets.
Discrete Mathematics , 16(4):361 – 381, 1976.[45] Johan M. M. van Rooij, Hans L. Bodlaender, and Peter Rossmanith. Dynamic programming on treedecompositions using generalised fast subset convolution. In Amos Fiat and Peter Sanders, editors,
Algorithms - ESA 2009, 17th Annual European Symposium, Copenhagen, Denmark, September 7-9, 2009.Proceedings , volume 5757 of
Lecture Notes in Computer Science , pages 566–577. Springer, 2009.[46] Magnus Wahlström. New plain-exponential time classes for graph homomorphism.