Complexity classification of counting graph homomorphisms modulo a prime number
Abstract
Counting graph homomorphisms and its generalizations such as the Counting Constraint Satisfaction Problem (CSP), its variations, and counting problems in general have been intensively studied since the pioneering work of Valiant. While the complexity of exact counting of graph homomorphisms (Dyer and Greenhill, 2000) and the counting CSP (Bulatov, 2013, and Dyer and Richerby, 2013) is well understood, counting modulo some natural number has attracted considerable interest as well. In their 2015 paper Faben and Jerrum suggested a conjecture stating that counting homomorphisms to a fixed graph modulo a prime number is hard whenever it is hard to count exactly, unless has automorphisms of certain kind. In this paper we confirm this conjecture. As a part of this investigation we develop techniques that widen the spectrum of reductions available for modular counting and apply to the general CSP rather than being limited to graph homomorphisms.
1 Introduction
Counting problems have been intensively studied since the pioneering work by Valiant [Val79b, Val79a]. For a problem from NP the corresponding counting problem asks about the number of accepting paths of a nondeterministic Turing machine that solves the problem. In many cases this may be a more tangible number. For example, in the Constraint Satisfaction Problem (CSP) the question is to decide the existence of an assignment of values to variables subject to a given collection of constraints. Thus, in the Counting CSP the objective is to find the number of such assignments. The counting CSP also allows for generalizations such as partition functions [Bar16, BG05] that yield connections with areas such as statistical physics, see, e.g. [JS93, LS81].
Counting CSP.
While the general Counting CSP is of course #P-complete, certain restrictions of the problem, first, allow us to model specific combinatorial problems, and, second, give rise to counting problems of lower complexity. One of the most natural ways to restrict a CSP is to require that the constraints allowed in instances belong to a certain set , often called a constraint language. The resulting decision problem is then denoted by and the corresponding counting problem by . As was noticed by Feder and Vardi [FV98], the CSP can also be reformulated in terms of homomorphisms of relational structures. It means that problems of the form can also be defined as for some relational structure , in which the question is, given a relational structure , decide the existence (find the the number) of a homomorphism from to . In particular, if is a graph, we obtain the -Coloring problem concerning graph homomorphisms [HN04]. Its counting variant is called the -Coloring problem.
The complexity of the -Coloring problem was characterized by Dyer and Greehill [DG00]. It turns out that this problem can be solved in polynomial time if and only if every connected component of is either an isolated vertex, or a complete graph with all loops present, or a complete bipartite graph. Otherwise -Coloring is #P-complete. This theorem was generalized through a sequence of intermediate results [DGP07, CH96, BD07, BG05] to a complexity classification of for arbitrary finite relational structures by Bulatov [Bul13] and Dyer and Richerby [DR13].
Modular counting.
In this paper we study the problem of counting solutions to a CSP modulo a prime number. If a constraint language or a relational structure is fixed, this problem is denoted or . More precisely, in the objective is, given a relational structure , to find the number of homomorphisms from to modulo . Problems of this form naturally belong to the class [CH89, Her90], in particular, to P if . A priori the relationship of the complexity of such problems with that of regular counting problems is unclear, except modular counting cannot be harder than exact counting. Later we will see examples when modular counting problems are much easier than their exact counterparts.
Since we are not aware of any study of the general modular Counting CSP, we discuss here counting graph homomorphisms modulo . A systematic study of this problem was initiated by Faben and Jerrum [FJ13]. One of the first observations they made concerns the cases where exact and modular counting clearly deviate from each other. As Faben and Jerrum observed, the automorphism group of graph plays a very important role in solving the problem. Let be a homomorphism from a graph to . Then composing with an element from we again obtain a homomorphism from to . Thus, acts on the set of all homomorphisms from to . If contains an automorphism of order (that is is the smallest number such that is the identity permutation), the cardinality of the orbit of is divisible by , unless , that is, the range of is the set of fixed points of ( is a fixed point of if ). Let denote the subgraph of induced by . We write if there is such that is isomorphic to . We also write if there are graphs such that is isomorphic to , is isomorphic to , and .
Lemma 1.1 ([FJ13]).
Let be a graph and a prime. Up to an isomorphism there is a unique smallest (in terms of the number of vertices) graph such that , and for any graph it holds
Moreover, does not have automorphisms of order .
Often Lemma 1.1 helps to reduce the complexity of modular counting.
Example 1.2.
Consider the 3-Coloring problem. Since permuting colors in a proper coloring produces another proper coloring, the number of 3-colorings of a graph is always , that is, counting 3-colorings modulo 3 is trivial. From a more formal perspective, the -Coloring problem is equivalent to , where is a complete graph with 3 vertices. Any permutation of the vertices of is an automorphism, and the cyclic permutation of all vertices has order . Therefore by Lemma 1.1 is equivalent to counting homomorphisms to an empty graph.
Graphs in Lemma 1.1 can be replaced with relational structures without changing the result, see Lemma 2.2 in Section 2. We will call relational structures without order automorphisms -rigid. By Lemmas 1.1, 2.2, and 2.3 it suffices to determine the complexity of for -rigid structures .
Faben and Jerrum [FJ13] proposed the following conjecture that we slightly rephrase and generalize.
Conjecture 1.3 (Faben and Jerrum, [FJ13]).
For a -rigid structure the problem is P-complete (solvable in polynomial time) if and only if is #P-complete (solvable in polynomial time.
The existing results.
The research in modular counting has mostly been aimed at verifying Conjecture 1.3. In [FJ13] Faben and Jerrum proved their conjecture in the case when is a tree and . This result has been extended by Göbel et al. first to the class of cactus graphs [GGR14] and then to the class of square-free graphs [GGR16] (a graph is square-free if it does not contain a 4-cycle), still for . Next, the same authors confirmed Conjecture 1.3 for trees and arbitrary prime [GLS18]. Kazeminia and Bulatov [KB19] confirmed the conjecture in the case of square-free graphs and arbitrary prime . Focke et al. [FGRZ20, FGRZ21] used some techniques from [KB19] to prove the conjecture for -minor-free graph and . Finally, Lagodzinski et al. [LGCF21] considered quantum graphs and quantum homomorphisms, where quantum graphs are simply formal sums of graphs, and quantum homomorphisms are homomorphism-like constructions for quantum graphs defined in an appropriate way. They proved that for a quantum graph is P-complete whenever it is hard for any of its component graphs. Also, they showed that is polynomial time interreducible with , where is a certain bipartite graph. Finally, they confirmed Conjecture 1.3 for bipartite graphs that do not contain without an edge or a domino as an induced subgraph (a domino is a bipartite graph obtained from by removing two non-incident edges). The last two results use intricate structural properties of graphs and a massive case analysis.
In this paper we confirm Conjecture 1.3 for arbitrary graphs.
Methodology.
In order to avoid extensive case analysis we employ the technique that has been very successful in the study of the decision CSP [Jea98, BJK05] and the exact Counting CSP [BD07]. This technique identifies what relations can be added to a constraint language without changing the complexity of the corresponding problem. Two of the constructions used in the papers mentioned above are also used here. They are primitive positive definitions and adding constants.
A relation or a predicate is said to be primitive-positive definable or pp-definable in a constraint language or a relational structure , if it can be expressed by a first order formula that only allows existential quantifiers, conjunctions, predicates from or , and the equality relation. Such formulas are called primitive-positive (pp-)formulas. It was proved in [Jea98], [BD07] that if is pp-definable in a language then is polynomial time reducible to and is polynomial time reducible to .
For modular counting it is possible to strengthen pp-definitions. For a prime we say that is -mpp-definable (pp-definable modulo ) in if there exists a pp-formula as above
such that if and only if the number of assignments to such that is true is not divisible by . The first part of the following theorem is fairly straightforward, but this is the second part that enables our study.
Theorem 1.4.
Let be a prime, a constraint language. Then
-
(1)
if is -mpp-definable in , then is polynomial time reducible to ;
-
(2)
if the relational structure whose predicates are the predicates from is -rigid, and is pp-definable in , then is -mpp-definable in .
While the analogous reduction in [Jea98, BJK05] is straightforward and that in [BD07] uses interpolation techniques, the main tool in proving Theorem 1.4 is careful counting homomorphism numbers showing that the non-existence of the right pp-formula contradicts -rigidity by using Möbius inversion formula.
The second way to expand a constraint language is to add constant relations. Let be a constraint language whose relations are on a set . Then , , denotes the unary relation containing only one tuple. Such relations are called constant relations. Let . It was proved in [BD07] that is polynomial time reducible to , and in [BJK05] it was proved that under certain conditions is polynomial time reducible to . The next theorem was first proved in [FJ13] for graphs.
Theorem 1.5.
If is -rigid, then is polynomial time reducible to .
Modular counting of graph homomorphisms.
The following is the main result of the paper.
Theorem 1.6.
Let be prime and a -rigid graph. Then is solvable in polynomial time if and only if every connected component of is either an isolated vertex, or a complete graph with all loops present, or a complete bipartite graph. (Note that -rigidity implies the the number of vertices in each complete component is less than and the number of vertices on each side of the bipartition in bipartite components is at most .) Otherwise it is P-complete.
In order to prove Theorem 1.6 we first prove a generalization (Theorem 5.17) of Theorem 8.15 from [HIK11] to bipartite graphs. Theorem 5.17 severely restricts the possible form of automorphisms of direct products of graphs. It again allows us to prove that certain relations are pp-definable by showing that the non-existence of such relations contradicts -rigidity. Interestingly, Theorem 5.17 does not hold for general relational structures.
The results of [LGCF21] show that it suffices to prove Theorem 1.6 only for bipartite graphs . To explain how the argument goes in the case of bipartite graphs we need to introduce another counting problem and a special type of bipartite graphs.
Let . Then is the problem defined as follows: given a bipartite graph with bipartition , find the value
modulo . The problem of computing the function is proven to be P-hard in [GLS18].
The special type of bipartite graphs we need is shown in Figure 1. More precisely, a bipartite graph is said to be a thick Z-graph if its vertices can be partitioned into four sets , where , such that the sets induce complete bipartite subgraphs of , and there are no edges between vertices from .
If then for appropriate can be reduced to . Next, we prove, Theorem 6.5, that such a reduction is still possible if there is an induced subgraph that is a thick Z-graph and we can simulate the conditions using -mpp-definitions in the language of . This last step is done through a careful analysis of the unary relations -mpp-definable in . Due to some limitations of Theorem 5.17 we need to consider cases and separately. However, in both cases the the argument uses Lemma 3.2(1)
Organization.
The paper is organized as follows. In Section 2 we introduce the basic definitions and results. Then in Section 3 we prove several auxiliary results that concern the existence of homomorphisms with special properties. In Section 4 we prove reductions for pp- and -mpp-definitions, and for adding constant relations. It also contains an important auxiliary result. The structure of automorphisms of direct products of graphs is analysed in Section 5. A proof of Theorem 1.6 is given in two steps. After some helpful preparations in Section 6.1 we start in Section 6.2 with identifying the requirements to induced thick Z-subgraphs of sufficient for hardness. Then we prove that a required thick Z-subgraph always exists. The cases and are considered separately. The case is considered in Section 6.3, and the case in Section 6.4. Section 7 contains proof omitted from the previous sections due to similarity with the existing results.
2 Preliminaries
2.1 Constraint Satisfaction Problem
Structures and Homomorphisms
We use to denote the set . A relational signature is a collection of relational symbols each with assigned positive integer, the arity of the symbol. A relational structure with signature is a set and an interpretation of each , where is a relation or a predicate on whose arity equals that of . The set is said to be the base set or the universe of . We will use for the base set the same letter as for the structure, only in the regular font. A structure with signature is often called a -structure. Structures with the same signature are called similar.
Let be similar structures. A homomorphism from to is a mapping such that for any , say, of arity , if , , is true then is true. The set of all homomorphisms from to is denoted . The cardinality of is denoted by . A homomorphism is an isomorphism if it is bijective and the inverse mapping is a homomorphism from to . If are isomorphic, we write .
Automorphism group
For a relational structure , an automorphism is an injective homomorphism into itself. The automorphisms of form a group with respect to composition denoted . The set of all automorphisms with as a fixed point is the stabilizer of denoted . It is always a subgroup of .
We will use two basic facts from group theory. First, for any prime , if is a group and , then contains an element of order . In particular, if , then has an automorphism of order . We call such automorphisms -automorphisms.
Second, if is a subgroup of a group then denotes the set of cosets of modulo . In this case Lagrange’s theorem holds claiming .
Two views on the CSP
The simplest way to define the Constraint Satisfaction Problem is as follows: Given similar relational structures , decide whether there is a homomorphism from to . The CSP is often restricted in certain ways. The most widely studied way to restrict the CSP, and the one we use here, is to fix the target structure . By we denote the problem, in which given a structure similar to , the goal is to decide whether there is a homomorphism from to . In the counting version of denoted the goal is to find for a given structure .
There is another view on the CSP that is widely used in the literature and that will be very useful from the technical perspective. Firstly, note that for a -structure the collection of interpretations , , is just a set of relations. We call a set of relations over some set a constraint language over . Thus, for every relational structure there is an associated constraint language . Conversely, every (finite) constraint language can be converted into a relational structure such that in a straightforward way, although in this case there is much room for the choice of a signature.
Definition 2.1.
Let be a constraint language on a set , called the domain. The Constraint Satisfaction Problem is the combinatorial function problem with:
Instance: a pair where is a finite set of variables and is a finite set of constraints. Each constraint is a pair where
-
•
is a tuple of variables from of length , called the constraint scope;
-
•
is an -ary relation, called the constraint relation.
Objective: Decide whether there is a solution of , that is, a mapping such that for each constraint with the tuple belongs to .
In the counting version of denoted the objective is to find the number of solutions of instance .
2.2 Modular counting
In this paper we study modular counting CSPs, where the objective is to find the number of homomorphisms (solutions) modulo a prime number . We fix throughout the paper. More precisely, for a structure or a constraint language in , the objective is to find the number of homomorphisms or solutions for a given instance modulo .
As is mentioned in the introduction, a major complication when studying the complexity of modular counting are -automorphisms of . We call a structure -rigid if it does not have -automorphisms. Also, we call a language -rigid if is -rigid.
As was mentioned, -automorphisms allow for a reduction of as follows. Let be a -automorphism of . By we denote the composition of applications of . For an instance and any homomorphism from to the mappings , , are also homomorphisms. This means that the homomorphism makes a contribution into other than only if . This happens only if maps to the set of fixed points of , that is, . By we denote the relational structure obtained by restricting to .
Lemma 2.2.
If is relational structure, and an -automorphism of , then for any structure
Proof.
Let and denote the universe of and respectively. For a similar structure with universe , we show that the number of homomoprhisms which use at least one element of is .
Given any homomorphism , consider the homomorphism . This is still a homomorphism which is different from as there is some element such that , and so . On the other hand is just , as is an -automorphism. So acts as a -automorphism on the set of homomorphisms from that use at least one element from . Since this automorphism has no fixed points, the size of this set must be 0 . ∎
The binary relation on relational structures is defined as follows. For relational structures and , we have if and only if there exists an automorphism of , of order , such that . If there exists a sequence of structures such that , we write and say that -reduces to . If is -rigid, it is called a -reduced form associated with . The following lemma is proved by a light modification of the proof in [FJ13].
Lemma 2.3 ([FJ13]).
For a relational structure there is (up to isomorphism) exactly one -rigid structure such that .
2.3 Factors, products and homomorphisms
We will need several concepts related to homomorphisms. Recall that a -structure is a said to be an expansion of a -structure if , (with arities of predicate symbols in being equal in ), and for any .
A pair , where for some , will be called a relational structure with distinguished vertices . For structures with distinguished vertices such that are similar, a homomorphism from to is a homomorphism from to that maps to , . The set of all homomorphisms from to is denoted by . Also, .
This notion can be slightly generalized replacing with a sequence :
Note that a relational structure with distinguished vertices can be viewed as an expansion of with additional unary symbols, one for each distinguished vertex. In such an interpretation a homomorphism of structures with distinguished vertices is just a homomorphism between the corresponding expansions.
Next we introduce two types of products of structures. The direct product of -structures , denoted is the -structure with the base set and such that the interpretation of is given by if and only if and . By we will denote the th power of , that is, the direct product of copies of . The direct product of structures is defined to be .
Two -tuples and have the same equality type if if and only if for . Let and be structure with distinguished vertices and such that and have the same equality type. Then denotes the structure that is obtained by taking the disjoint union of and and identifying every with , . The distinguished vertices of the new structure are .
The following statement is straightforward.
Proposition 2.4.
Let be similar relational structures with distinguished vertices. Then
We will also need another simple observation. By we denote the number of injective homomorphisms from to .
Lemma 2.5.
Let and be relational structures with distinguished vertices. If do not have the same equality type, then .
Finally, we will use factor structures. Let be a -structure and an equivalence relation on . By we denote the factor structure defined as follows.
-
•
is a -structure.
-
•
The base set of is , where denotes the -class containing .
-
•
For any , say, -ary, .
Factor structures often appear in relation with homomorphisms. If is a homomorphism from a structure to a structure , then the kernel of is the equivalence relation on given by
Homomorphism gives rise to a homomorphism from to , where , . Homomorphism is always injective.
We also define factor structures for structures with distinguished vertices as follows. Let be a structure with distinguished vertices and an equivalence relation on . Then .
2.4 Primitive-positive definitions
The reader is referred to [BKW17] for details about primitive positive definitions and their use in the study of the CSP.
Primitive positive definitions allow to add predicates to a constraint language without changing the complexity of the CSP. Let denote the relation of equality on the set .
Let be a constraint language on a set . A primitive positive formula in is a first-order formula , where is a conjunction of atomic formulas of the form or , , and . We say that pp-defines a predicate if there exists a pp-formula such that . A relational structure pp-defines if so does .
Jeavons et al. [Jea98] and Bulatov and Dalmau [BD07] proved that if pp-defines then (respectively, ) is polynomial time reducible to (respectively, to ). Later we will prove a similar result for modular counting.
Lemma 2.6.
A predicate is pp-definable in a -structure if and only if there exists a -structure such that
Proof.
It suffices to demonstrate the connection between pp-formulas and structures. Then the lemma follows straightforwardly.
Let be the quantifier free part of a pp-formula, and assume that the equality predicates are eliminated from by identifying equated variables. In other words, is a conjunction of atomic formulas of the form , where and . The corresponding -structure is constructed as follows. Its base set is . Then for any , say, -ary, if and only if is an atom in . The transition from a structure to a formula is defined in the reverse way. The result now follows from the observation that every satisfying assignment of is also a homomorphism from to . ∎
3 Gadgets and automorphisms
In this section we prove several results that claim the existence of certain well behaved pp-definitions and homomorphisms for -rigid relational structures.
3.1 Möbius inversion
We will use Möbius inversion formula. Let be a set, denote the poset of partitions of , where denotes the single class partition, the partition into 1-element classes, and means that is the finer partition of the two. Let also be some functions satisfying
Then
where the function is given by:
-
•
,
-
•
for any partition , .
The Möbius inversion formula will mainly be used as the following lemmas indicate.
Lemma 3.1.
Let be prime and let be a relational structure such that, for any , , where does not depend on . Then has a -automorphism.
Proof.
We use the following parameters in Möbius inversion formula: the set is the base set of , , . Then clearly . By the formula we have
Therefore and has a -automorphism. ∎
We call a subset automorphism-stable if there is such that the set is a subgroup of . Note that is always nonempty, as it contains the identity mapping. Also, by we denote the subset of that contains all the automorphisms for which each of is a fixed point.
Lemma 3.2.
Let be prime, a relational structure.
-
(1)
Let an automorphism-stable set. If for any and , , where does not depend on and , then the structure has a -automorphism for some .
-
(2)
Let . If for any and , , where does not depend on and , then the structure has a -automorphism for some .
Proof.
(1) Similar to Lemma 3.1 we use Möbius inversion formula on . Let be the element witnessing that is automorphism stable and set , . Then , as it includes the identity mapping, and as before we have
Note that and therefore is a subgroup of . As it has order that is a multiple of , it contains a -automorphism.
(2) In this case the argument is essentially the same. ∎
3.2 Rigidity and the number of extensions
The main goal of this section, Proposition 3.3, is to prove that for a -rigid relational structure there is always a pp-definition that somewhat uniformizes the number of extensions of tuples in predicates pp-definable in .
Let be a relational structure and is pp-definable in by a pp-formula
For by we denote the number of assignments to such that holds.
Proposition 3.3.
Let be a -rigid relational structure and is pp-definable in . Then there exists a pp-definition of such that for any , .
Proof.
We use the equivalence between pp-definitions and homomorphisms discussed in Section 2.4. Let . Our goal is to find a relational structure similar to such that for some and any ,
Note that by Proposition 2.4 and Fermat’s Little Theorem it suffices to prove that such a structure exists satisfying .
Consider ( times) with distinguished vertices , where and , . By Proposition 2.4
(1) |
If was -rigid, we could apply Möbius inversion formula in a way similar to Lemma 3.2(2) to infer the existence of a required . However, there is no guarantee this is the case. We need to make one more step.
Note that each of the is a fixed point of any automorphism of . This means that the -reduced form of contains all the . Thus
(2) |
We apply Möbius inversion to . For we set
Then we proceed as in the proof of Lemma 3.2 to conclude that if for all , then has a -automorphism, leading to a contradiction with the construction of . Therefore, there exists such that
Observe that since for each it holds that , we have
3.3 Indistinguishability and isomorphism
In this section we prove a variation of Lovasz’s theorem about homomorphism counts and graph isomorphisms [GGR16, GLS18].
Lemma 3.4.
Let and be -rigid relational structures with distinguished vertices. Then, if and only if
(3) |
for all relational structures with distinguished vertices.
Proof.
The proof goes along the same lines as that in [GLS18]. If and are isomorphic, then (3) obviously holds for all relational structures .
For the other direction, suppose that (3) is true for all .
First, we claim that this implies that and have the same equality type. Indeed, if they do not, then without loss of generality there are such that but . Let be the relational structure with the base set such that with empty predicates and as distinguished vertices. Then , a contradiction with the assumption that (3) holds for all .
We show by induction on the number of vertices in that
(4) |
for all . Let be the number of distinct elements in . For the base case of the induction, consider a relational structure such that . If does not have the same equality type as , then . If has the same equality type as , the only homomorphisms from to are the ones that map to , respectively. Therefore, .
For the inductive step, let and assume that (4) holds for all with . Let be a relational structure with , and let be an equivalence relation on . Then, as is easily seen
where denote the number of homomorphisms from to , respectively, and such that . Then
Since and for all we get .
Finally, we prove that (4) for implies . An injective homomorphism from a relational structure to itself is an automorphism. Since is -rigid, . Therefore , meaning there is an injective homomorphism from to . In a similar way, there is an injective homomorphism from to . Thus, the two structures are isomorphic. ∎
Let be a relational structure. Elements are said to be isomorphic if there is such that . We say that are -indistinguishable, for a relational structure with a distinguished vertex , if . Elements are indistiguishable if they are -indistinguishable for any . We use if are indistinguishable.
The following is an easy implication of Lemma 3.4.
Lemma 3.5.
Let be a relational structure and . Then if and only if are isomorphic.
Proof.
By definition if and only if for all , . Therefore, by Lemma 3.4, , which means there is an isomorphism . Hence, and such that . ∎
4 Expanding constraint languages
In this section we show that the standard methods of expanding constraint languages work for modular counting.
4.1 Primitive-positive definitions
We will use two versions of primitive-positive definitions. The first one, modular, is more natural for counting problems, but its properties are unexplored. The second one is the standard one, and one result we prove is that in -rigid structures modular pp-definitions are more expressive, a feature we will extensively use.
We start with the -modular quantifier . Its syntax is the same as that of the regular existential quantifier, while the semantics is given a follows: Let be a predicate on a set . Then defines the predicate such that , , if and only if .
Modular primitive-positive definitions are the same as the regular ones with the exception of replacing of the regular quantifier with the modular one. Let be a constraint language on a set . A -modular primitive positive formula in is a first-order formula , where is a conjunction of atomic formulas of the form or and , . We say that -mpp-defines a predicate if there exists a -modular primitive-positive formula such that . A relational structure -mpp-defines if so does . We also call the -mpp-definition strict if for any such that the following condition holds .
Mpp-definitions have a similar connection to homomorphisms, as pp-definitions, see Lemma 2.6.
Lemma 4.1.
A predicate is -mpp-definable (strictly -mpp-definable) in a relational structure if and only if there is a structure similar to and such that for exactly when (when ).
It turns out that -mpp-definitions and strict -mpp-definitions are quite similar.
Lemma 4.2.
If is -mpp-definable in a relational structure , it is also strictly -mpp-definable in .
Proof.
As is -mpp-definable in , there exists such that if and only if . Then by Proposition 2.4 given by
is such that if and only if . ∎
Mpp-definitions give rise to reductions between modular counting CSPs.
Proposition 4.3.
Let be constraint languages over a set , finite, and every relation from is -mpp-definable in . Then is polynomial time reducible to .
Proof.
We show that for any -mpp-definable in , is polynomial time reducible to . We need to consider two cases.
First, suppose that is . Take a instance , and for every constraint replace every occurrence of in with . Clearly the resulting instance has the same number of solutions, and after eliminating all the equality constraints, it also does not use .
Second, suppose that has a -mpp-definition in that uses only relations from . By Lemma 4.2 there exists a strict -mpp-definition of such that for any , . Let be a instance. Without loss of generality assume that are the constraints containing . Construct a instance as follows:
-
•
For each introduce new variables and set .
-
•
The set contains every constraint from . Also, we replace each with the definition of .
Next, we find the number of solutions of . As is easily seen, for every solution of there are
solutions of . Therefore if denote the number of solutions of , respectively, we have . ∎
Primitive-positive definitions have been intensively used in the decision and counting CSPs. They do not appear so naturally in the context of modular counting, but Proposition 3.3 basically proves that they are a special case of modular pp-definitions and give rise to reductions between modular counting CSPs as well.
Theorem 4.4.
Let be constraint languages on a finite set such that is finite, and is -rigid. If is pp-definable in , Then is polynomial time reducible to .
Proof.
A unary relation pp-definable in a constraint language or relational structures is said to be a subalgebra of the language or structure. In a similar way let be a relational structure. A set is said to be a -subalgebra of if is strictly -mpp-definable in . Set is a -subalgebra of a constraint language if it is a -subalgebra of .
4.2 Adding constants
Recall that for a constraint language by we denote the language . Theorem 4.5 was proved for exact counting in [BD07] and for modular counting of graph homomorphisms in [FJ13]. We use a proof similar to that in [BD07].
Theorem 4.5.
Let be a -rigid constraint language on a set . Then, the problem is polynomial time reducible to .
Proof.
We follow the same line of argument as the proof of a similar result in [BD07] for exact counting. Let . It is known, see e.g. [JCG99], that the -ary relation is pp-definable in .
Let be an instance of . We construct an instance of as follows.
-
•
;
-
•
consists of three parts: , , and .
The number of solutions of equals the number of solutions to such that for all . Let be the set of all such solutions of and . Then can be computed in two stages.
Let again be the poset of partitions of . For every partition we define as the instance , where belong to the same class of ). Note that if is a solution of , then is a solution of if and only if for every from the same class of . Let us denote the number of solutions of . By Theorem 4.4 the number can be computed using the oracle , since are pp-definable in .
Next we find the number solutions of that assign , , pairwise different values. Let be the set of all such solutions. Let us denote by the number of all solutions of such that if and only if belong to the same class of . In particular, . The number can be obtained using Möbius inversion formula for poset . Let be defined as in Section 3.1. Also, observe that for any
Therefore,
Thus can be found through a constant number of calls to .
Now, we express via . Let be the automorphism group of . We show that . For every solution in and every , is also a solution of . Moreover, since is one-to-one, is in . Conversely, for every , there exists some such that , . Note that implies , which witnesses that is of the required form. Finally, for every and every , if or then . Thus, . Since is -rigid, . Therefore . ∎
Remark 4.6.
For any relational structure the structure does not have any nontrivial homomorphisms, in particular, it is -rigid. However, it does not mean that powers of have no nontrivial automorphisms. The reason is that formally speaking if is a -structure then has the signature . Therefore, so does, say . For the latter structure if and only if , that is, if and only if . This means that the involution is an automorphism of .
5 Automorphisms of direct powers of bipartite graphs
The goal of this section is to study the structure of automorphisms of , a direct power of a simple graph .
If is non-bipartite, the results we need can be found in Chapter 8 of [HIK11]. Here, we expand the scope of [HIK11] to bipartite graphs by introducing diamond product of graphs. This kind of graph products treats the vertices of a bipartite graph as one of the two sorts, left and right, and when constructing a direct product only forms tuples of vertices of the same sort. Automorphisms of the bipartite graph also preserve the sorts of vertices. An alternative way to view such a sorted bipartite graph is to consider it as a relational structure with two unary relations representing the left and the right parts of the bipartition, and one binary edge relation.
In this section, we denote the disjoint union of graphs and by . It will also be convenient to use the standard graph theory notation, and denote graphs in regular font and use for the sets of vertices and edges. The neighborhood of a vertex or a set in is denoted . However, we will use to denote edges, because sometimes vertices will have a complicated structure.
5.1 Graph Products
We will need three types of graph products. For Cartesian product we use the results of Chapter 6 of [HIK11], which are valid for arbitrary graphs.
The Cartesian product of two simple graphs is the graph with vertices and edges .
A graph is called prime with respect to Cartesian product if whenever , one of contains only one vertex.
Theorem 5.1 (Theorem 6.8, [HIK11]).
Let be isomorphic connected graphs and , where each factor and is prime with respect to Cartesian product. Then , and for any isomorphism , there is a permutation of and isomorphisms for which
The direct product of two graphs is defined in the regular way, as the graph with vertices and edges .
The diamond product is defined with bipartite graphs in mind. For a bipartite graph , we denote the two parts of the bipartition by and .
The diamond product of two simple bipartite graphs and is the graph with vertices and edges .
The diamond product of a simple non-bipartite graphs and a bipartie graph is the graph with vertices and edges .
Definition 5.2.
The diamond product of two simple graphs is defined as follows:
Remark 5.3.
The diamond product for simple graphs and is commutative and associative up to an isomorphism, meaning , and
The following statement is straightforward.
Proposition 5.4.
Let be simple graphs with distinguished vertices respectively. Then
We denote the diamond power of by .
5.2 Automorphisms of products of R-thin graphs
Relation on for a graph is defined as follows. Vertices and are in , written , if and only if . Clearly, is an equivalence relation. Normally we will omit the subscript .
We denote the quotient of modulo by . Given , let denote the -class containing . Then and . Since is defined entirely in terms of , it is easy to see that for an isomorphism , we have if and only if . Thus, maps equivalence classes of to equivalence classes of , and can be defined to act on by .
We need the following lemmas from [HIK11].
Lemma 5.5 (Proposition 8.4, [HIK11]).
Suppose are simple graphs. Then if and only if and there is an isomorphism with for each . In fact, given an isomorphism , any map that restricts to a bijection for every is an isomorphism from to .
Lemma 5.6 (Proposition 8.5, [HIK11]).
If graphs and are simple graphs and have no isolated vertices, then . In particular, . Furthermore, , and with is an isomorphism.
We prove similar statements for diamond product.
Remark 5.7.
If , then for any . Recall however that if and are bipartite, then for any either or .
Lemma 5.8.
If graphs G and H are simple graphs and have no isolated vertices, then , and with is an isomorphism. Also .
A graph is said to be -thin if is the equality relation.
5.2.1 Cartesian Skeleton
In this subsection we introduce several definitions and results from Chapter 8 of [HIK11]. The Boolean square of a graph is the graph with and .
Lemma 5.9.
If are graphs, then .
Proof.
Observe that if and only if there is a walk of length 2 joining and . By definition of such a walk exists if and only if each has a walk of length 2 between and . The latter is equivalent to for each , which happens if and only if is an edge of . ∎
We now explain how to construct the Cartesian skeleton of a graph by removing specific edges from .
Given a factorization , we say that an edge of the Boolean square is Cartesian relative to the factorization if either and , or and . An edge of the Boolean square is dispensable if it is a loop, or if there exists some for which both of the following statements hold:
-
1.
or ,
-
2.
or .
Definition 5.10.
The Cartesian skeleton of a graph is the spanning subgraph of the Boolean square obtained by removing all dispensable edges from .
The following statements are from [HIK11].
Lemma 5.11 (Proposition 8.11, [HIK11]).
Any isomorphism , as a map , is also an isomorphism .
Lemma 5.12 (Proposition 8.13, [HIK11]).
Suppose a graph G is connected.
-
1.
If has an odd cycle, then is connected.
-
2.
If is bipartite, then has two connected components whose respective vertex sets are the two parts of the bipartition of .
If is bipartite, we denote the connected component of the corresponding to the left part of by and the one corresponding to the right part of by . Note that if , by Remark 5.7 . This implies the following:
Lemma 5.13 ([HIK11]).
If is an R-thin graph with an arbitrary factorization , then every edge of is Cartesian relative to this factorization.
Observe that in the case of bipartite graphs the Cartesian skeleton is restricted to the left and right parts of the bipartition of the graph. Hence, we can modify Proposition 8.10 of [HIK11] for the diamond product.
Proposition 5.14.
If are -thin graphs without isolated vertices, then
5.2.2 Diamond product factorization
A graph is said to be prime if for any one of is an edge. The following lemma is the core technical statement of this section.
Lemma 5.15.
Consider any isomorphism , where (recall that preserves the left and right parts of the graphs) and all the factors are connected and R-thin. If a factor is prime, then exactly one of the functions depends on .
Proof.
By grouping and permuting the factors we may assume that and is prime. If none of and is bipartite, then Lemma 5.15 is Lemma 8.14 of [HIK11]. We will consider the case when one or both of or are bipartite. We prove this by showing that if it is not the case that exactly one of and depends on , then is not prime. Now, if or is bipartite, the graph is bipartite, hence the graph is bipartite. We denote the connected components of by and , and the connected components of by and which correspond to the left and right parts of the bipartition.
By Lemma 5.11 is also an isomorphism for Cartesian skeletons:
(5) |
which gives us isomorphisms on each connected component:
Note that although is prime, as well as are not necessarily prime. Take prime factorizations of each component, when both and are bipartite:
Note that, if both and are bipartite, then the ’s and ’s, as well as the ’s and ’s can be nonisomorphic. If is non-bipartite, then and for , . Similarly, if is non-bipartite, then and for , .
As is an isomorphism, we have
We relabel the vertices of with , and those of with . We relabel vertices of with . By Proposition 5.14 the isomorphism can be represented as follows:
To simplify the notation we will denote a left vertex of by , where and , and right vertex of by , where and . Similarly, we denote a left vertex of by , where and , and a right vertex of by , where and . By Theorem 5.1, isomorphism is represented as follows
Since this holds for both left and right parts , we can represent the isomorphism like .
Now we find a nontrivial factorization . Define and as follows:
and | |||
We need to prove that if and only of . If , then for some there is an edge , and hence there is an edge which is . Next, suppose that . Then, and . By the construction of and we have that there exist such that
and there exists , such that
Now, apply the isomorphism
Hence, , . Therefore,. Applying we get
Thus, . ∎
Corollary 5.16.
Let be an automorphism of a prime -thin graph , Then there is a permutation of such that
where each is an automorphism of .
5.3 Automorphisms of general graphs
In this section we prove an analog of Corollary 5.16 for graphs that are not necessarily -thin. An automorphism of a graph is called local if it is the identity mapping on .
Theorem 5.17.
Suppose is an automorphism of . Let be the automorphism induced by , and let be a prime factorization of . Then there is a permutation of such that every automorphism of can be split into automorphisms:
We start with two auxiliary lemmas.
Lemma 5.18.
Let be a simple connected graph such that . Then every vertex corresponds to a unique -class of , denote its cardinality by . If there are functions such that , then there are graphs and such that , and and .
Proof.
By Lemma 5.8 are -thin. Define as follows. Take a family of disjoint sets such that for each . Set , and . A graph is constructed in the same way by choosing sets with for each .
Claim 1. The -classes of are the sets , respectively.
Proof of Claim 1..
It suffices to prove that if , then . If there is a such that , then there is such that and , then by the definition of we have . For the proof is analogous. ∎
By Claim 1 there are isomorphisms and , hence, there is a isomorphism . Therefore, . By Lemma 5.5 we have . ∎
Lemma 5.19.
Suppose there is an isomorphism where and all factors are connected and such that are nontrivial. Let be the induced isomorphism
If some is prime, then at most one of the functions depends on .
Proof.
Grouping and permuting factors, it suffices only to prove the lemma in the case when is prime and . We rewrite as . As a consequence we have , where . As are connected, each of is connected and -thin. We prove that if and depend on , then is not prime, a contradiction with the assumption made.
Lemma 5.15 implies that if both and depend on , then is not prime. Take a prime factorization . This gives a labeling of -classes of with vertices of . Then can be viewed as an isomorphism . By Lemma 5.15 for each , exactly one of and depends on . We order the factors of = so that depends on , but not on , and depends on but not on . Then we have
We know that is an -class of , so it makes sense to speak of its cardinality . By Lemma 5.18 graph has a nontrivial factorization (i.e., be non-prime) if we can define functions and , for which . Let be an -class of . Observe that the isomorphism maps each -class of bijectively to the -class of . Therefore
Since is an integer, divides . So there are and such that and divides and divides . Set and . It is easy to see that functions are as required. ∎
Proof of Theorem 5.17.
Let be a factorization of into prime factors. It will be convenient to represent as
(6) |
where for all . Relable each vertex as
By Lemma 5.19, for any automorphism of there is a permutaion of such that can be split into automorphisms:
where the equality follows by putting together all for to obtain the automorphism on . ∎
5.4 Reduced form of
As Faben and Jerum showed in [FJ13], the -reduced form of is obtained by removing from a relational structure or a graph vertices that are not fixed under a -automorphism. On the other hand, we will often use the -reduced form of , and need to make sure that some vertices remain in that -reduced form. In this section our goal is to show that if is -rigid, then we can guarantee that at least some vertices from certain specified sets are not eliminated when constructing the -reduced form. Recall the definition of the relation from Section 3.3.
Lemma 5.20.
For a simple graph , A permutation of its R-class can be transform to an automorphism of . Therefore for , if then .
Proof.
Let be a permutation of . As is easily seen, the following mapping is an automorphism of .
Observe that if , then there is a permutation of such that , hence there is a such that . ∎
Let be a subgraph of obtained by eliminating local -automorphisms. Note that is NOT the reduced form of , as some -automorphisms may remain. It means that from an -class of with size , , we remove elements of . Denote the result by . Note that , and . Also, if and only if . More formally
The following lemma is a direct implication of the definition of . Observe that if then by Lemma 5.20 is not -rigid.
Lemma 5.21.
If is a -rigid graph, then is isomoprhic to .
Proof.
We prove the lemma by the following claims.
Claim 1. The -classes of are the sets .
Proof of Claim 1..
It suffices to prove that if , then . By the definition, if , then , Hence
∎
Claim 2. The function where is an isomrphism.
Proof of Claim 2..
Clearly, the function in bijective and surjective. We just need to prove that the function is edge preserving.
Assume . Then, and . So, there are and such that , also, . Hence there are such that , therefore, . ∎
We have an isomorphism from to . The result follows. ∎
Theorem 5.22.
Let be a -rigid graph and a union of -classes of . Then
-
1.
.
-
2.
For any graph , .
-
3.
If is a -subalgebra of , then is a -subalgebra of .
Proof.
-
1.
By the definition of local -automorphisms . On the other hand, by Lemma 5.21 contains elements of every -class of . The result follows.
-
2.
Note first that if for then , that is, for any graph it holds that . Let be an -class of and . Then is a multiple of . Therefore
-
3.
Suppose that is a -subalgebra of . By Lemma 4.1 there exists such that if and only if . By what is observed above for we have if and only if . Therefore defines .
∎
6 Counting graph homomorphisms
6.1 Reductions for bipartite graphs
In this section we prove the Faben-Jerrum Conjecture. Fix a prime . Let be a graph. By Lemma 2.2 can be assumed to be -rigid. Also, by the results of [LGCF21] it suffices to consider the case when is bipartite. Thus, we assume that is a -rigid bipartite graph that is not complete. Here we use the techniques developed in the previous sections to prove that is P-complete.
One of the results we use is Theorem 5.17 about automorphisms of -powers of . However, Theorem 5.17 is proved assuming that is prime and has two sorts of vertices, left and right. We first prove that we can use this theorem.
Let denote the graph viewed as a 2-sorted structure. Note that if is -rigid, so is . Also, in this case .
Lemma 6.1 (Lemma 3.28, [LGCF21], rephrased).
If is a -rigid bipartite graph then and are polynomial time interreducible.
Since we only work with , to simplify notation we will omit from .
By Theorem 4.5 is polynomial time reducible to . Again, to simplify the notation we use instead of
Proposition 6.2.
Let a bipartite graph, and let be a prime factorization of . Then for every automorphism of there are permutations of such that
where is an element of the th copy of .
Proof.
By Theorem 5.17 there are isomorphisms and a permutation of such that
Now observe that as has all the constant relations, for any we have
(7) |
Firstly, this implies that every is the identity mapping. This means that is basically the permutation of coordinates. If for some , and then choosing any such that we get a contradiction. The result follows. ∎
Proposition 6.2 provides strong restrictions on the possible -automorphisms of .
Corollary 6.3.
If then every -automorphism of is local.
Proof.
Let be a non-local -automorphism of and the corresponding automorphism of . By Proposition 6.2 there are permutations of such that
for any . As is a -automorphism, so is . Therefore every is either the identity mapping or has order . The latter is impossible as , and has to be the identity mapping. ∎
Lemma 6.4.
1. Let . Then is a subalgebra of .
2. Let be a -subalgebra of . Then is a -subalgebra of .
Proof.
Let be the edge relation of .
1. Since has the constant relation , pp-defines (and by Theorem 4.4) -mpp-defines .
2. In this case the argument is similar. Let is -mpp-defined by . Then defines .
∎
6.2 Weighted and thick -graphs
To prove hardness we reduce the Weighted problem to . For a graph let denote the set of its independent sets. Also, for a bipartite graph let denote the two parts of the bipartition. Let . Then is the problem defined as follows: given a bipartite graph , find the value
modulo . The problem of computing the function is proven to be -hard in [GLS18].
A bipartite graph is said to be a thick Z-graph if its vertices can be partitioned into four sets , where , such that the sets induce complete bipartite subgraphs of , and there are no edges between vertices from , see Figure 1.

An induced subgraph of that is a thick Z-graph with parts is said to be non-degenerate if there exist graphs with distinguished vertices such that
(8) |
and
(9) |
Theorem 6.5.
Let there exist an induced subgraph of that is a non-degenerate thick Z-graph with parameters , then (multiplication and inversion here is ) is polynomial time reducible to .
Proof.
Let be a bipartite graph, an instance of . We construct a graph , an instance of as follows:
-
•
For each vertex and each vertex , we make vertices and , respectively. If , then we add an edge between and in .
-
•
For let denote a copy of attached to , that is, in is identified with . For a copy is attached in the same way.

The vertices from will help to encode independent sets of . Specifically, with every independent set of we associate a set of homomorphisms such that for every vertex , if and only if (recall that is also a vertex of identified with in ); and similarly, for every , if and only if . Finally, the structure of makes sure that every homomorphism from to is associated with an independent set. Note that just an association of independent sets with collections of homomorphisms is not enough, the number of homomorphisms in those collections have to allow one to compute the weight of an independent set in .
Now, we give a formal definition of :
For each , define
Claim 1. is an independent set.
Proof of Claim 1.
Assume that for some the set is not an independent set in , i.e. there are two vertices such that . Without loss of generality, let and . By the construction of , and and by definition of there is no edge between and , that is is not a homomorphism. A contradiction. ∎
Let be a relation on given by if and only if .
Obviously is an equivalence relation on . We denote the class of containing by . Clearly, the -classes correspond to the independent sets of . We will need the corresponding mapping
First, we will prove that is bijective, then compute the cardinalities of classes .
Claim 2. The mapping is bijective.
Proof of Claim 2.
By the definition of , it is injective. To show surjectivity let be an independent set. We construct a homomorphism such that . Pick arbitrary , and :
-
•
For every vertex set .
-
•
For every vertex set .
-
•
For every vertex set .
-
•
For every vertex set .
By construction of , if and , then . Similarly, if , then . If none of the endpoints of an edge belongs to then and . By the assumption on , mapping can be extended to a homomorphism from to . Hence is surjective. ∎
Claim 3. .
Proof of Claim 3.
Assume that has classes and is a representative of the -th class. Let be the number of homomorphisms such that or . Then
Finally, by (9) . ∎
6.3
We will consider squares of , and so Corollary 6.3 indicates that the cases and have to be considered separately. While Lemma 6.6 below holds for both cases, after it we split the proof into two parts. Let be as in Section 6.1. The goal is to prove the existence of a non-degenerate thick Z-subgraph of .
We start with showing that there exists a thick Z-subgraph of such that both parts of the bipartition are -subalgebras.
Lemma 6.6.
There are subsets such that are -subalgebras of and the subgraph induced by is a thick Z-graph. Moreover, are unions of -classes.
Proof.
We prove by induction on the number of vertices in . If , graph is either disconnected, or complete, or a Z-graph. Then it suffices to show that if is not complete or is a thick Z-graph, then there are such that are -subalgebras of , one of the inclusions is strict, and the subgraph induced by is not complete. If a connected bipartite graph is not complete, then either it is a thick Z-graph, or there are (assume ) such that and . Then , are subalgebras of and the subgraph induced by is not a complete bipartite graph. ∎
For the rest of Section 6.3 we assume .
Proposition 6.7.
contains a non-degenerate thick Z-subgraph.
Proof.
Let be the thick Z-subgraph found in Lemma 6.6. In particular, are such that are -subalgebras of and are unions of R-classes. We need to prove the existence of structures from the definition of non-degeneracy. We prove it for , as for a proof is identical.
Set , , and . As we demonstrate in Claim 4, it suffices to show that for some it holds that . Indeed, if this is the case, by Proposition 2.4 we would conclude that , and with the required properties can be easily constructed from . We will apply Lemma 3.2(1) to prove the existence of such a structure. However, in order to to apply Lemma 3.2(1) the set needs to be automorphism stable, and there must be no -automorphism of such that for some . Unfortunately, and do not satisfy any of these conditions. We will modify them to enforce the conditions.
Firstly, by Theorem 5.22, can be replaced by and , respectively, obtained by reducing using local -automorphisms, such that , . Moreover, for any
Claim 1. is -rigid.
Proof of Claim X..
By Corollary 6.3 every -automorphism of is local. As the same holds for . By the construction does not have local -automorphisms. The claim follows. ∎
Claim 2. The set is automorphism stable for .
Proof of Claim Y..
We need to show that for some , is a subgroup of . In fact we show that for any , . In order to do that it suffices to proof that for any it holds .
We first show that no element of is isomorphic to an element of . Clearly, for every automorphism of and every the degree of in and that of are equal. As is easily seen, this degree of equals , while for and it is and , respectively. It remains to recall that if any is isomorphic to , then is isomorphic to .
Next, as is easily seen, is a -subalgebra of . Indeed, since is a -subalgebra of , there is such that if and only if . Then by Proposition 2.4(2) the same witnesses that is a -subalgebra of . Finally, for any it holds
and so if and only if .
That is a subalgebra means that for no and no , . Claim 2 follows. ∎
Claim 3. is a union of -classes.
Proof of Claim 3..
By the proof of Claim 2, for any and , . On the other hand, if then the mapping that swaps leaving all the other vertices in place is an automorphism of . ∎
Claim 4. For any , .
Proof of Claim 3.
By Theorem 5.22 it suffices to prove the claim for and . By Proposition 2.4 every homomorphism can be represented as , where are homomorphisms . Conversely, if are homomorphisms, then the mapping given by is a homomorphism from to . Finally, if and only if or . Since swapping coordinates of is an automorphism of the number of homomorphisms of the two kinds is the same. ∎
By Lemma 3.2(1) there is such that . Then by Claim 3 we also have . To obtain a required gadget we need to ensure that whenever . Since is a -subalgebra, there is such that whenever , and otherwise. The structure satisfies the required conditions. ∎
6.4
In this subsection we assume and is as in Section 6.1. Note that, as the underlying bipartite graph of is 2-rigid, is R-thin and in any prime factorization all the factors are pairwise non-isomorphic. The goal is again to prove the existence of a non-degenerate thick Z-subgraph of . By Lemma 6.6 has a thick induced Z-subgraph . Let the parts of are as before. We only give a proof for and , as the proof for is identical.
Let be a prime factorization of . By Proposition 6.2 every automorphism of has the form
where is an element of the th copy of and are permutations of , that is, either identity mappings or involutions. Let .
We plan to use Lemma 3.2(1), and for that we need to find a such that is as small as possible. Suppose for some and an automorphism of we have . If is not an identity mapping, . Choose and such that is maximal possible. Without loss of generality, , that is,
Note that , because in this case , which is impossible, as and are disjoint.
By the choice of we have and . Therefore, is a fixed point of . Let denote the structure reduced using the automorphism . In other words, is the induced structure on the set . Also, let . Note that because .
Lemma 6.8.
For any , the only automorphism of such that is the identity mapping.
Proof.
Any nontrivial homomorphism of has the form
Suppose that is an involution for some and there is such that . But then for the automorphism of given by
where are involutions and for we have . Since we get a contradiction with the choice of . ∎
Lemma 6.8 implies that contains only the identity mapping, and therefore is a subgroup of . Therefore is automorphism stable. By Lemma 3.2(1) there is such that . Therefore
Since is a 2-subalgebra we obtain a structure satisfying the requirements for a non-degenerate thick Z-graph as in the end of Section 6.3
7 Proofs missing from Section 5
7.1 A proof of Lemma 5.8
Lemma 7.1 (Lemma 5.8).
If graphs G and H are simple graphs and have no isolated vertices, then , and with is an isomorphism. Also .
Proof.
Consider a vertex of , By Remark 5.7, we have
Thus . To complete the proof, we show that is an isomorphism. Using the fact that if and only if :
∎
7.2 A proof of Proposition 5.14
Proposition 7.2 (Proposition 5.14).
If are -thin graphs without isolated vertices, then
Proof.
The case when and are non-bipartite is proved in Proposition 8.15 [HIK11]. We prove Proposition 5.14 for the following two cases:
-
(i)
is bipartite and is non-bipartite,
-
(ii)
and are bipartite.
Consider Case (i). As is easily seen, is bipartite. We prove that the is equal to . The proof for the right part is similar.
First, we show . Take an edge in , say with . We must show that is not dispensable in . Suppose it is. Then there would be a vertex in such that the dispensability conditions (1) and (2) hold for , and . The various cases are considered below. Each leads to a contradiction.
Suppose . This means , so . Then the fact that permits cancellation of the common factor , so , and in is dispensable. We will reach the same contradiction if .
Finally, suppose there is a for which both and . Rewrite this as
which is the same as
Thus , so , whence
Thus in is dispensable, a contradiction.
Note that the proof for the Case (ii). where we need to prove that is exactly the same.
We now show , considering Case (i). By Lemma 5.13, all edges of are Cartesian, so we just need to show that implies (The same argument will work for edges of form ).
Suppose for the sake of contradiction that, but , Thus is dispensable in , so there is a for which both of the following conditions hold:
-
1.
or ,
-
2.
or ,
There are no isolated vertices, so . Now, we can multiply each neighborhood in Condition 1 and 2 by on the right and still preserve the proper inclusions. Then the fact that (where is bipartite and is non-bipartite) yields the dispensability conditions (1) and (2), where and and . Thus , a contradiction. Considering Case (ii). we only have the equation when and , therefore what we will get is again , which is a contradiction. ∎
References
- [Bar16] Alexander I. Barvinok. Combinatorics and Complexity of Partition Functions, volume 30 of Algorithms and combinatorics. Springer, 2016.
- [BD07] Andrei A. Bulatov and Víctor Dalmau. Towards a dichotomy theorem for the counting constraint satisfaction problem. Information and Computation, 205(5):651–678, 2007.
- [BG05] Andrei A. Bulatov and Martin Grohe. The complexity of partition functions. Theor. Comput. Sci., 348(2-3):148–186, 2005.
- [BJK05] Andrei A. Bulatov, Peter Jeavons, and Andrei A. Krokhin. Classifying the complexity of constraints using finite algebras. SIAM J. Comput., 34(3):720–742, 2005.
- [BKW17] Libor Barto, Andrei Krokhin, and Ross Willard. Polymorphisms, and how to use them. In Dagstuhl Follow-Ups, volume 7. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2017.
- [Bul13] Andrei A. Bulatov. The complexity of the counting constraint satisfaction problem. J. ACM, 60(5):34:1–34:41, 2013.
- [CH89] Jin-yi Cai and Lane A. Hemachandra. On the power of parity polynomial time. In Burkhard Monien and Robert Cori, editors, STACS 89, 6th Annual Symposium on Theoretical Aspects of Computer Science, Paderborn, FRG, February 16-18, 1989, Proceedings, volume 349 of Lecture Notes in Computer Science, pages 229–239. Springer, 1989.
- [CH96] Nadia Creignou and Miki Hermann. Complexity of generalized satisfiability counting problems. Inf. Comput., 125(1):1–12, 1996.
- [DG00] M. Dyer and C. Greenhill. The complexity of counting graph homomorphisms. Random Structures and Algorithms, 17:260–289, 2000.
- [DGP07] Martin E. Dyer, Leslie Ann Goldberg, and Mike Paterson. On counting homomorphisms to directed acyclic graphs. J. ACM, 54(6):27, 2007.
- [DR13] Martin E. Dyer and David Richerby. An effective dichotomy for the counting constraint satisfaction problem. SIAM J. Comput., 42(3):1245–1274, 2013.
- [FGRZ20] Jacob Focke, Leslie Ann Goldberg, Marc Roth, and Stanislav Zivney. Counting homomorphisms to -minor-free graphs, modulo 2. CoRR, abs/2006.16632, 2020.
- [FGRZ21] Jacob Focke, Leslie Ann Goldberg, Marc Roth, and Stanislav Zivný. Counting homomorphisms to -minor-free graphs, modulo 2. In Dániel Marx, editor, Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021, pages 2303–2314. SIAM, 2021.
- [FJ13] John Faben and Mark Jerrum. The complexity of parity graph homomorphism: an initial investigation. arXiv preprint arXiv:1309.4033, 2013.
- [FV98] Tomás Feder and Moshe Y. Vardi. The computational structure of monotone monadic SNP and constraint satisfaction: A study through datalog and group theory. SIAM J. Comput., 28(1):57–104, 1998.
- [GGR14] Andreas Göbel, Leslie Ann Goldberg, and David Richerby. The complexity of counting homomorphisms to cactus graphs modulo 2. ACM Transactions on Computation Theory, 6(4):1–29, Aug 2014.
- [GGR16] Andreas Göbel, Leslie Ann Goldberg, and David Richerby. Counting homomorphisms to square-free graphs, modulo 2. ACM Transactions on Computation Theory (TOCT), 8(3):1–29, 2016.
- [GLS18] Andreas Göbel, J. A. Gregor Lagodzinski, and Karen Seidel. Counting homomorphisms to trees modulo a prime. In Igor Potapov, Paul Spirakis, and James Worrell, editors, 43rd International Symposium on Mathematical Foundations of Computer Science (MFCS 2018), volume 117 of Leibniz International Proceedings in Informatics (LIPIcs), pages 49:1–49:13, Dagstuhl, Germany, 2018. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.
- [Her90] Ulrich Hertrampf. Relations among mod-classes. Theor. Comput. Sci., 74(3):325–328, 1990.
- [HIK11] Richard Hammack, Wilfried Imrich, and Sandi Klavzar. Handbook of Product Graphs, Second Edition. CRC Press, Inc., USA, 2nd edition, 2011.
- [HN04] P. Hell and Nešetřil. Graphs and homomorphisms, volume 28 of Oxford Lecture Series in Mathematics and its Applications. Oxford University Press, 2004.
- [JCG99] P.G. Jeavons, D.A. Cohen, and M. Gyssens. How to determine the expressive power of constraints. Constraints, 4:113–131, 1999.
- [Jea98] Peter Jeavons. On the algebraic structure of combinatorial problems. Theoretical Computer Science, 200(1-2):185–204, 1998.
- [JS93] Mark Jerrum and Alistair Sinclair. Polynomial-time approximation algorithms for the Ising model. SIAM J. Comput., 22(5):1087–1116, 1993.
- [KB19] Amirhossein Kazeminia and Andrei A Bulatov. Counting homomorphisms modulo a prime number. In 44th International Symposium on Mathematical Foundations of Computer Science (MFCS 2019). Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, 2019.
- [Kol04] Phokion G Kolaitis. Constraint satisfaction, complexity, and logic. In Hellenic Conference on Artificial Intelligence, pages 1–2. Springer, 2004.
- [LGCF21] J. A. Gregor Lagodzinski, Andreas Göbel, Katrin Casel, and Tobias Friedrich. On counting (quantum-)graph homomorphisms in finite fields of prime order. CoRR, abs/2011.04827, 2021.
- [LS81] E.H. Lieb and A.D. Sokal. A general Lee-Yang theorem for one-component and multicomponent ferromagnets. Communications in Mathematical Physics, 80(2):153–179, 1981.
- [Val79a] L. Valiant. The complexity of computing the permanent. Theoretical Computing Science, 8:189–201, 1979.
- [Val79b] L. Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, 8(3):410–421, 1979.