We consider the problem of finding a homomorphism from an input digraph $G$ to a fixed digraph $H$. We show that if $H$ admits a weak-near-unanimity polymorphism $ϕ$ then deciding whether $G$ admits a homomorphism to $H$ (HOM($H$)) is polynomial time solvable? This gives a proof of the dichotomy conjecture (now dichotomy theorem) by Feder and Vardi [29]. Our approach is combinatorial, and it is simpler than the two algorithms found by Bulatov [9] and Zhuk [46] in 2017. We have implemented our algorithm and show some experimental results.
We consider the problem of finding a homomorphism from an input digraph $G$ to a fixed digraph $H$. We show that if $H$ admits a weak near unanimity polymorphism $ϕ$ then deciding whether $G$ admits a homomorphism to $H$ (HOM($H$)) is polynomial-time solvable. This gives proof of the dichotomy conjecture (now dichotomy theorem) by Feder and Vardi. Our approach is combinatorial, and it is simpler than the two algorithms found by Bulatov and Zhuk. We have implemented our algorithm and show some experimental results. We use our algorithm together with the recent result [38] for recognition of Mal…
Trigraph list homomorphism problems (also known as list matrix partition problems) have generated recent interest, partly because there are concrete problems that are not known to be polynomial time solvable or NP-complete. Thus while digraph list homomorphism problems enjoy dichotomy (each problem is NP-complete or polynomial time solvable), such dichotomy is not necessarily expected for trigraph list homomorphism problems. However, in this paper, we identify a large class of trigraphs for which list homomorphism problems do exhibit a dichotomy. They consist of trigraphs with a tree-like stru…
We consider a generalization of finding a homomorphism from an input digraph $G$ to a fixed digraph $H$, HOM($H$). In this setting, we are given an input digraph $G$ together with a list function from $G$ to $2^H$. The goal is to find a homomorphism from $G$ to $H$ with respect to the lists if one exists. We show that if the list function is a Maltsev polymorphism then deciding whether $G$ admits a homomorphism to $H$ is polynomial time solvable. In our approach, we only use the existence of the Maltsev polymorphism. Furthermore, we show that deciding whether a relational structure $\mathcal{R…
The Dichotomy Conjecture for constraint satisfaction problems has been verified for conservative problems (or, equivalently, for list homomorphism problems) by Andrei Bulatov. An earlier case of this dichotomy, for list homomorphisms to undirected graphs, came with an elegant structural distinction between the tractable and intractable cases. Such structural characterization is absent in Bulatov's classification, and Bulatov asked whether one can be found. We provide an answer in the case of digraphs; the technique will apply in a broader context. The key concept we introduce is that of a digr…
It is well known that the constraint satisfaction problem over general relational structures can be reduced in polynomial time to digraphs. We present a simple variant of such a reduction and use it to show that the algebraic dichotomy conjecture is equivalent to its restriction to digraphs and that the polynomial reduction can be made in logspace. We also show that our reduction preserves the bounded width property, i.e., solvability by local consistency methods. We discuss further algorithmic properties that are preserved and related open problems.
The complexity of graph homomorphism problems has been the subject of intense study. It is a long standing open problem to give a (decidable) complexity dichotomy theorem for the partition function of directed graph homomorphisms. In this paper, we prove a decidable complexity dichotomy theorem for this problem and our theorem applies to all non-negative weighted form of the problem: given any fixed matrix A with non-negative algebraic entries, the partition function Z_A(G) of directed graph homomorphisms from any directed graph G is either tractable in polynomial time or #P-hard, depending on…
In this paper, we will show dichotomy theorems for the computation of polynomials corresponding to evaluation of graph homomorphisms in Valiant's model. We are given a fixed graph $H$ and want to find all graphs, from some graph class, homomorphic to this $H$. These graphs will be encoded by a family of polynomials. We give dichotomies for the polynomials for cycles, cliques, trees, outerplanar graphs, planar graphs and graphs of bounded genus.
We consider the complexity of counting weighted graph homomorphisms defined by a symmetric matrix $A$. Each symmetric matrix $A$ defines a graph homomorphism function $Z_A(\cdot)$, also known as the partition function. Dyer and Greenhill [10] established a complexity dichotomy of $Z_A(\cdot)$ for symmetric $\{0, 1\}$-matrices $A$, and they further proved that its #P-hardness part also holds for bounded degree graphs. Bulatov and Grohe [4] extended the Dyer-Greenhill dichotomy to nonnegative symmetric matrices $A$. However, their hardness proof requires graphs of arbitrarily large degree, and w…
Many natural combinatorial quantities can be expressed by counting the number of homomorphisms to a fixed relational structure. For example, the number of 3-colorings of an undirected graph $G$ is equal to the number of homomorphisms from $G$ to the $3$-clique. In this setup, the structure receiving the homomorphisms is often referred to as a template; we use the term template function to refer to a function, from structures to natural numbers, that is definable as the number of homomorphisms to a fixed template. There is a literature that studies the complexity of template functions. The pres…
Graph homomorphism has been studied intensively. Given an m x m symmetric matrix A, the graph homomorphism function is defined as \[Z_A (G) = \sum_{f:V->[m]} \prod_{(u,v)\in E} A_{f(u),f(v)}, \] where G = (V,E) is any undirected graph. The function Z_A can encode many interesting graph properties, including counting vertex covers and k-colorings. We study the computational complexity of Z_A for arbitrary symmetric matrices A with algebraic complex values. Building on work by Dyer and Greenhill, Bulatov and Grohe, and especially the recent beautiful work by Goldberg, Grohe, Jerrum and Thurley, …
In a valued constraint satisfaction problem (VCSP), the goal is to find an assignment of labels to variables that minimizes a given sum of functions. Each function in the sum depends on a subset of variables, takes values which are rational numbers or infinity, and is chosen from a fixed finite set of functions called a constraint language. The case when all functions take only values 0 and infinity is known as the constraint satisfaction problem (CSP). It is known that any CSP with fixed constraint language is polynomial-time equivalent to one where the constraint language contains a single b…
The complexity of graph homomorphisms has been a subject of intense study [11, 12, 4, 42, 21, 17, 6, 20]. The partition function $Z_{\mathbf A}(\cdot)$ of graph homomorphism is defined by a symmetric matrix $\mathbf A$ over $\mathbb C$. We prove that the complexity dichotomy of [6] extends to bounded degree graphs. More precisely, we prove that either $G \mapsto Z_{\mathbf A}(G)$ is computable in polynomial-time for every $G$, or for some $Δ> 0$ it is #P-hard over (simple) graphs $G$ with maximum degree $Δ(G) \le Δ$. The tractability criterion on $\mathbf A$ for this dichotomy is explicit, and…
In the present paper we show a dichotomy theorem for the complexity of polynomial evaluation. We associate to each graph H a polynomial that encodes all graphs of a fixed size homomorphic to H. We show that this family is computable by arithmetic circuits in constant depth if H has a loop or no edge and that it is hard otherwise (i.e., complete for VNP, the arithmetic class related to #P). We also demonstrate the hardness over the rational field of cut eliminator, a polynomial defined by Bürgisser which is known to be neither VP nor VNP-complete in the field of two elements, if VP is not equal…
The Dichotomy Conjecture for constraint satisfaction problems (CSPs) states that every CSP is in P or is NP-complete (Feder-Vardi, 1993). It has been verified for conservative problems (also known as list homomorphism problems) by A. Bulatov (2003). We augment this result by showing that for digraph templates H, every conservative CSP, denoted LHOM(H), is solvable in logspace or is hard for NL. More precisely, we introduce a digraph structure we call a circular N, and prove the following dichotomy: if H contains no circular N then LHOM(H) admits a logspace algorithm, and otherwise LHOM(H) is h…
In the constraint satisfaction problem ($CSP$), the aim is to find an assignment of values to a set of variables subject to specified constraints. In the minimum cost homomorphism problem ($MinHom$), one is additionally given weights $c_{va}$ for every variable $v$ and value $a$, and the aim is to find an assignment $f$ to the variables that minimizes $\sum_{v} c_{vf(v)}$. Let $MinHom(Γ)$ denote the $MinHom$ problem parameterized by the set of predicates allowed for constraints. $MinHom(Γ)$ is related to many well-studied combinatorial optimization problems, and concrete applications can be fo…
We consider the complexity of finding weighted homomorphisms from intersection graphs of curves (string graphs) with $n$ vertices to a fixed graph $H$. We provide a complete dichotomy for the problem: if $H$ has no two vertices sharing two common neighbors, then the problem can be solved in time $2^{O(n^{2/3} \log n)}$, otherwise there is no algorithm working in time $2^{o(n)}$, even in intersection graphs of segments, unless the ETH fails. This generalizes several known results concerning the complexity of computatational problems in geometric intersection graphs. Then we consider two variant…
Minimum cost homomorphism problems can be viewed as a generalization of list homomorphism problems. They also extend two well-known graph colouring problems: the minimum colour sum problem and the optimum cost chromatic partition problem. In both of these problems, the cost function meets an additional constraint: the cost of using a specific colour is the same for every vertex of the input graph. We study minimum cost homomorphism problems with cost functions constrained to have this property. Clearly, when the standard minimum cost homomorphism problem is polynomial, then the problem with co…
Focke, Goldberg, and Živný (arXiv 2017) prove a complexity dichotomy for the problem of counting surjective homomorphisms from a large input graph G without loops to a fixed graph H that may have loops. In this note, we give a short proof of a weaker result: Namely, we only prove the #P-hardness of the more general problem in which G may have loops. Our proof is an application of a powerful framework of Lovász (2012), and it is analogous to proofs of Curticapean, Dell, and Marx (STOC 2017) who studied the "dual" problem in which the pattern graph G is small and the host graph H is the input. I…
We consider the complexity of counting homomorphisms from an $r$-uniform hypergraph $G$ to a symmetric $r$-ary relation $H$. We give a dichotomy theorem for $r>2$, showing for which $H$ this problem is in FP and for which $H$ it is #P-complete. This generalises a theorem of Dyer and Greenhill (2000) for the case $r=2$, which corresponds to counting graph homomorphisms. Our dichotomy theorem extends to the case in which the relation $H$ is weighted, and the goal is to compute the \emph{partition function}, which is the sum of weights of the homomorphisms. This problem is motivated by statistica…
Assume $D$ is a finite set and $R$ is a finite set of functions from $D$ to the natural numbers. An instance of the minimum $R$-cost homomorphism problem ($MinHom_R$) is a set of variables $V$ subject to specified constraints together with a positive weight $c_{vr}$ for each combination of $v \in V$ and $r \in R$. The aim is to find a function $f:V \rightarrow D$ such that $f$ satisfies all constraints and $\sum_{v \in V} \sum_{r \in R} c_{vr}r(f(v))$ is minimized. This problem unifies well-known optimization problems such as the minimum cost homomorphism problem and the maximum solution probl…
Many important graph theoretic notions can be encoded as counting graph homomorphism problems, such as partition functions in statistical physics, in particular, independent sets and colourings. In this article we study the complexity of $\#_p\mathsf{H}$OMS$\mathsf{T}$O$H$, the problem of counting graph homomorphisms from an input graph to a graph $H$ modulo a prime number $p$. Dyer and Greenhill proved a dichotomy stating that the tractability of non-modular counting graph homomorphisms depends on the structure of the input graph. Many intractable cases in non-modular counting become tractabl…
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 \textsc{LHom}($H$), the instance is a graph $G$, whose every vertex is equipped with a subset of $V(H)$, called list. We ask whether there exists a homomorphism from $G$ to $H$, such that every vertex from $G$ is mapped to a vertex from its list. We study the complexity of the \textsc{LHom}($H$) problem in intersection graphs of various geometric objects. In particular, we are interested in answering the q…
In this paper we study the class of bi-arc digraphs, important from two seemingly unrelated perspectives. On the one hand, they are precisely the digraphs that admit certain polymorphisms of interest in the study of constraint satisfaction problems; on the other hand, they are a very broad generalization of interval graphs. Bi-arc digraphs is the class of digraphs that admit conservative semilattice polymorphisms. There is much interest in understanding structures that admit particular types of polymorphisms, and especially in their recognition algorithms. (Such problems are referred to as met…
It is well known that the constraint satisfaction problem over a general relational structure A is polynomial time equivalent to the constraint problem over some associated digraph. We present a variant of this construction and show that the corresponding constraint satisfaction problem is logspace equivalent to that over A. Moreover, we show that almost all of the commonly encountered polymorphism properties are held equivalently on the A and the constructed digraph. As a consequence, the Algebraic CSP dichotomy conjecture as well as the conjectures characterizing CSPs solvable in logspace an…
We present a framework for the complexity classification of parameterized counting problems that can be formulated as the summation over the numbers of homomorphisms from small pattern graphs H_1,...,H_l to a big host graph G with the restriction that the coefficients correspond to evaluations of the Möbius function over the lattice of a graphic matroid. This generalizes the idea of Curticapean, Dell and Marx [STOC 17] who used a result of Lovász stating that the number of subgraph embeddings from a graph H to a graph G can be expressed as such a sum over the lattice of partitions of H. In the…
We study the problem HomsTo$H$ of counting, modulo 2, the homomorphisms from an input graph to a fixed undirected graph $H$. A characteristic feature of modular counting is that cancellations make wider classes of instances tractable than is the case for exact (non-modular) counting, so subtle dichotomy theorems can arise. We show the following dichotomy: for any $H$ that contains no 4-cycles, HomsTo$H$ is either in polynomial time or is $\oplus P$-complete. This confirms a conjecture of Faben and Jerrum that was previously only known to hold for trees and for a restricted class of treewidth-2…
We prove that an $ω$-categorical core structure primitively positively interprets all finite structures with parameters if and only if some stabilizer of its polymorphism clone has a homomorphism to the clone of projections, and that this happens if and only if its polymorphism clone does not contain operations $α$, $β$, $s$ satisfying the identity $αs(x,y,x,z,y,z) \approx βs(y,x,z,x,z,y)$. This establishes an algebraic criterion equivalent to the conjectured borderline between P and NP-complete CSPs over reducts of finitely bounded homogenous structures, and accomplishes one of the steps of a…
Given a graph G, we investigate the question of determining the parity of the number of homomorphisms from G to some other fixed graph H. We conjecture that this problem exhibits a complexity dichotomy, such that all parity graph homomorphism problems are either polynomial-time solvable or parityP-complete, and provide a conjectured characterisation of the easy cases. We show that the conjecture is true for the restricted case in which the graph H is a tree, and provide some tools that may be useful in further investigation into the parity graph homomorphism problem, and the problem of countin…
Counting homomorphisms of a constant sized pattern graph $H$ in an input graph $G$ is a fundamental computational problem. There is a rich history of studying the complexity of this problem, under various constraints on the input $G$ and the pattern $H$. Given the significance of this problem and the large sizes of modern inputs, we investigate when near-linear time algorithms are possible. We focus on the case when the input graph has bounded degeneracy, a commonly studied and practically relevant class for homomorphism counting. It is known from previous work that for certain classes of $H$,…
We prove a complexity dichotomy theorem for all non-negative weighted counting Constraint Satisfaction Problems (CSP). This caps a long series of important results on counting problems including unweighted and weighted graph homomorphisms and the celebrated dichotomy theorem for unweighted #CSP. Our dichotomy theorem gives a succinct criterion for tractability. If a set F of constraint functions satisfies the criterion, then the counting CSP problem defined by F is solvable in polynomial time; if it does not satisfy the criterion, then the problem is #P-hard. We furthermore show that the quest…
For a fixed digraph $\mathbb H$, the $\mathbb H$-coloring problem is the problem of deciding whether a given input digraph $\mathbb G$ admits a homomorphism to $\mathbb H$. The CSP dichotomy conjecture of Feder and Vardi is equivalent to proving that, for any $\mathbb H$, the $\mathbb H$-coloring problem is in in P or NP-complete. We confirm this dichotomy for a certain class of oriented trees, which we call special trees (generalizing earlier results on special triads and polyads). Moreover, we prove that every tractable special oriented tree has bounded width, i.e., the corresponding $\mathb…
We give a complexity dichotomy theorem for the counting Constraint Satisfaction Problem (#CSP in short) with complex weights. To this end, we give three conditions for its tractability. Let F be any finite set of complex-valued functions, then we prove that #CSP(F) is solvable in polynomial time if all three conditions are satisfied; and is #P-hard otherwise. Our complexity dichotomy generalizes a long series of important results on counting problems: (a) the problem of counting graph homomorphisms is the special case when there is a single symmetric binary function in F; (b) the problem of co…
Holant problems are a general framework to study the algorithmic complexity of counting problems. Both counting constraint satisfaction problems and graph homomorphisms are special cases. All previous results of Holant problems are over the Boolean domain. In this paper, we give the first dichotomy theorem for Holant problems for domain size $>2$. We discover unexpected tractable families of counting problems, by giving new polynomial time algorithms. This paper also initiates holographic reductions in domains of size $>2$. This is our main algorithmic technique, and is used for both tractable…
The Surjective H-Colouring problem is to test if a given graph allows a vertex-surjective homomorphism to a fixed graph H. The complexity of this problem has been well studied for undirected (partially) reflexive graphs. We introduce endo-triviality, the property of a structure that all of its endomorphisms that do not have range of size 1 are automorphisms, as a means to obtain complexity-theoretic classifications of Surjective H-Colouring in the case of reflexive digraphs. Chen [2014] proved, in the setting of constraint satisfaction problems, that Surjective H-Colouring is NP-complete if H …
For two positive integers $k$ and $\ell$, a $(k \times \ell)$-spindle is the union of $k$ pairwise internally vertex-disjoint directed paths with $\ell$ arcs between two vertices $u$ and $v$. We are interested in the (parameterized) complexity of several problems consisting in deciding whether a given digraph contains a subdivision of a spindle, which generalize both the Maximum Flow and Longest Path problems. We obtain the following complexity dichotomy: for a fixed $\ell \geq 1$, finding the largest $k$ such that an input digraph $G$ contains a subdivision of a $(k \times \ell)$-spindle is p…
A homomorphism from a graph $G$ to a graph $H$ is an edge-preserving mapping from $V(G)$ to $V(H)$. For a fixed graph $H$, in the list homomorphism problem, denoted by LHom($H$), we are given a graph $G$, whose every vertex $v$ is equipped with a list $L(v) \subseteq V(H)$. We ask if there exists a homomorphism $f$ from $G$ to $H$, in which $f(v) \in L(v)$ for every $v \in V(G)$. Feder, Hell, and Huang [JGT~2003] proved that LHom($H$) is polynomial time-solvable if $H$ is a bi-arc-graph, and NP-complete otherwise. We are interested in the complexity of the LHom($H$) problem in graphs excluding…
Counting problems in general and counting graph homomorphisms in particular have numerous applications in combinatorics, computer science, statistical physics, and elsewhere. One of the most well studied problems in this area is #GraphHom(H) --- the problem of finding the number of homomorphisms from a given graph G to the graph H. Not only the complexity of this basic problem is known, but also of its many variants for digraphs, more general relational structures, graphs with weights, and others. In this paper we consider a modification of #GraphHom(H), the #_p GraphHom(H) problem, p a prime …
Correspondence homomorphisms are both a generalization of standard homomorphisms and a generalization of correspondence colourings. For a fixed target graph $H$, the problem is to decide whether an input graph $G$, with each edge labeled by a pair of permutations of $V(H)$, admits a homomorphism to $H$ `corresponding' to the labels, in a sense explained below. We classify the complexity of this problem as a function of the fixed graph $H$. It turns out that there is dichotomy -- each of the problems is polynomial-time solvable or NP-complete. While most graphs $H$ yield NP-complete problems, t…
Conservative constraint satisfaction problems (CSPs) constitute an important particular case of the general CSP, in which the allowed values of each variable can be restricted in an arbitrary way. Problems of this type are well studied for graph homomorphisms. A dichotomy theorem characterizing conservative CSPs solvable in polynomial time and proving that the remaining ones are NP-complete was proved by Bulatov in 2003. Its proof, however, is quite long and technical. A shorter proof of this result based on the absorbing subuniverses technique was suggested by Barto in 2011. In this paper we …
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 \in V(G)$ it holds that $h(v) \in L(v)$. The complexity dichotomy for LHom($H$) was proven by Feder, Hell, and Huang [JGT 2003]. We are interested in the complexity of the problem, paramete…
We consider the following problem for a fixed graph H: given a graph G and two H-colorings of G, i.e. homomorphisms from G to H, can one be transformed (reconfigured) into the other by changing one color at a time, maintaining an H-coloring throughout. This is the same as finding a path in the Hom(G,H) complex. For H=K_k this is the problem of finding paths between k-colorings, which was shown to be in P for k<=3 and PSPACE-complete otherwise by Cereceda et al. 2011. We generalize the positive side of this dichotomy by providing an algorithm that solves the problem in polynomial time for any H…
A homomorphism from a graph G to a graph H is a function from V(G) to V(H) that preserves edges. Many combinatorial structures that arise in mathematics and computer science can be represented naturally as graph homomorphisms and as weighted sums of graph homomorphisms. In this paper, we study the complexity of counting homomorphisms modulo 2. The complexity of modular counting was introduced by Papadimitriou and Zachos and it has been pioneered by Valiant who famously introduced a problem for which counting modulo 7 is easy but counting modulo 2 is intractable. Modular counting provides a ric…
For a fixed graph $H$, the reconfiguration problem for $H$-colourings (i.e. homomorphisms to $H$) asks: given a graph $G$ and two $H$-colourings $φ$ and $ψ$ of $G$, does there exist a sequence $f_0,\dots,f_m$ of $H$-colourings such that $f_0=φ$, $f_m=ψ$ and $f_i(u)f_{i+1}(v)\in E(H)$ for every $0\leq i<m$ and $uv\in E(G)$? If the graph $G$ is loop-free, then this is the equivalent to asking whether it possible to transform $φ$ into $ψ$ by changing the colour of one vertex at a time such that all intermediate mappings are $H$-colourings. In the affirmative, we say that $φ$ reconfigures to $ψ$. …