This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Complexity classification of counting graph homomorphisms modulo a prime number

Andrei A.Bulatov and Amirhossein Kazeminia
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 \mathcal{H} modulo a prime number is hard whenever it is hard to count exactly, unless \mathcal{H} 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 Γ\Gamma, often called a constraint language. The resulting decision problem is then denoted by 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma) and the corresponding counting problem by #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma). 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 𝖢𝖲𝖯(Γ),#𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma),\mathsf{\#CSP}(\Gamma) can also be defined as 𝖢𝖲𝖯(),#𝖢𝖲𝖯()\mathsf{CSP}(\mathcal{H}),\mathsf{\#CSP}(\mathcal{H}) for some relational structure \mathcal{H}, in which the question is, given a relational structure 𝒢\mathcal{G}, decide the existence (find the the number) of a homomorphism from 𝒢\mathcal{G} to \mathcal{H}. In particular, if \mathcal{H} is a graph, we obtain the \mathcal{H}-Coloring problem concerning graph homomorphisms [HN04]. Its counting variant is called the #\#\mathcal{H}-Coloring problem.

The complexity of the #\#\mathcal{H}-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 \mathcal{H} is either an isolated vertex, or a complete graph with all loops present, or a complete bipartite graph. Otherwise #\#\mathcal{H}-Coloring is #P-complete. This theorem was generalized through a sequence of intermediate results [DGP07, CH96, BD07, BG05] to a complexity classification of #𝖢𝖲𝖯()\mathsf{\#CSP}(\mathcal{H}) for arbitrary finite relational structures \mathcal{H} 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 Γ\Gamma or a relational structure \mathcal{H} is fixed, this problem is denoted #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma) or #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}). More precisely, in #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) the objective is, given a relational structure 𝒢\mathcal{G}, to find the number of homomorphisms from 𝒢\mathcal{G} to \mathcal{H} modulo pp. Problems of this form naturally belong to the class 𝖬𝗈𝖽pP\mathsf{Mod}_{p}P [CH89, Her90], in particular, to \oplusP if p=2p=2. 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 pp. 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 𝖠𝗎𝗍()\mathsf{Aut}(\mathcal{H}) of graph \mathcal{H} plays a very important role in solving the #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) problem. Let φ\varphi be a homomorphism from a graph 𝒢\mathcal{G} to \mathcal{H}. Then composing φ\varphi with an element from 𝖠𝗎𝗍()\mathsf{Aut}(\mathcal{H}) we again obtain a homomorphism from 𝒢\mathcal{G} to \mathcal{H}. Thus, 𝖠𝗎𝗍()\mathsf{Aut}(\mathcal{H}) acts on the set 𝖧𝗈𝗆(𝒢,)\mathsf{Hom}(\mathcal{G},\mathcal{H}) of all homomorphisms from 𝒢\mathcal{G} to \mathcal{H}. If 𝖠𝗎𝗍()\mathsf{Aut}(\mathcal{H}) contains an automorphism π\pi of order pp (that is pp is the smallest number such that πp\pi^{p} is the identity permutation), the cardinality of the orbit of φ\varphi is divisible by pp, unless πφ=φ\pi\circ\varphi=\varphi, that is, the range of φ\varphi is the set of fixed points 𝖥𝗂𝗑(π)\mathsf{Fix}(\pi) of π\pi (aV()a\in V(\mathcal{H}) is a fixed point of π\pi if π(a)=a\pi(a)=a). Let π\mathcal{H}^{\pi} denote the subgraph of \mathcal{H} induced by 𝖥𝗂𝗑(π)\mathsf{Fix}(\pi). We write p\mathcal{H}\rightarrow_{p}\mathcal{H}^{\prime} if there is π𝖠𝗎𝗍()\pi\in\mathsf{Aut}(\mathcal{H}) such that \mathcal{H}^{\prime} is isomorphic to π\mathcal{H}^{\pi}. We also write p\mathcal{H}\rightarrow^{*}_{p}\mathcal{H}^{\prime} if there are graphs 1,,k\mathcal{H}_{1},\dots,\mathcal{H}_{k} such that \mathcal{H} is isomorphic to 1\mathcal{H}_{1}, \mathcal{H}^{\prime} is isomorphic to k\mathcal{H}_{k}, and 1p2ppk\mathcal{H}_{1}\rightarrow_{p}\mathcal{H}_{2}\rightarrow_{p}\dots\rightarrow_{p}\mathcal{H}_{k}.

Lemma 1.1 ([FJ13]).

Let \mathcal{H} be a graph and pp a prime. Up to an isomorphism there is a unique smallest (in terms of the number of vertices) graph p\mathcal{H}^{*p} such that pp\mathcal{H}\rightarrow_{p}^{*}\mathcal{H}^{*p}, and for any graph 𝒢\mathcal{G} it holds

𝗁𝗈𝗆(𝒢,)𝗁𝗈𝗆(𝒢,p)(modp).\mathsf{hom}(\mathcal{G},\mathcal{H})\equiv\mathsf{hom}(\mathcal{G},\mathcal{H}^{*p})\pmod{p}.

Moreover, p\mathcal{H}^{*p} does not have automorphisms of order pp.

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 0(mod3)0\pmod{3}, that is, counting 3-colorings modulo 3 is trivial. From a more formal perspective, the #33\#_{3}3-Coloring problem is equivalent to #3𝖢𝖲𝖯(K3)\#_{3}\mathsf{CSP}(K_{3}), where K3K_{3} is a complete graph with 3 vertices. Any permutation of the vertices of K3K_{3} is an automorphism, and the cyclic permutation of all vertices has order 33. Therefore by Lemma 1.1 #3𝖢𝖲𝖯(K3)\#_{3}\mathsf{CSP}(K_{3}) 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 pp automorphisms pp-rigid. By Lemmas 1.12.2, and 2.3 it suffices to determine the complexity of #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) for pp-rigid structures \mathcal{H}.

Faben and Jerrum [FJ13] proposed the following conjecture that we slightly rephrase and generalize.

Conjecture 1.3 (Faben and Jerrum, [FJ13]).

For a pp-rigid structure \mathcal{H} the problem #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) is 𝖬𝗈𝖽p\mathsf{Mod}_{p}P-complete (solvable in polynomial time) if and only if #𝖢𝖲𝖯()\mathsf{\#CSP}(\mathcal{H}) 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 \mathcal{H} is a tree and p=2p=2. 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 p=2p=2. Next, the same authors confirmed Conjecture 1.3 for trees and arbitrary prime pp [GLS18]. Kazeminia and Bulatov [KB19] confirmed the conjecture in the case of square-free graphs and arbitrary prime pp. Focke et al. [FGRZ20, FGRZ21] used some techniques from [KB19] to prove the conjecture for K4K_{4}-minor-free graph and p=2p=2. 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 #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) for a quantum graph is 𝖬𝗈𝖽p\mathsf{Mod}_{p}P-complete whenever it is hard for any of its component graphs. Also, they showed that #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) is polynomial time interreducible with #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}^{\prime}), where \mathcal{H}^{\prime} is a certain bipartite graph. Finally, they confirmed Conjecture 1.3 for bipartite graphs that do not contain K3,3K_{3,3} without an edge or a domino as an induced subgraph (a domino is a bipartite graph obtained from K3,3K_{3,3} 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 RR is said to be primitive-positive definable or pp-definable in a constraint language Γ\Gamma or a relational structure \mathcal{H}, if it can be expressed by a first order formula that only allows existential quantifiers, conjunctions, predicates from Γ\Gamma or \mathcal{H}, and the equality relation. Such formulas are called primitive-positive (pp-)formulas. It was proved in [Jea98], [BD07] that if RR is pp-definable in a language Γ\Gamma then 𝖢𝖲𝖯(Γ{R})\mathsf{CSP}(\Gamma\cup\{R\}) is polynomial time reducible to 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma) and #𝖢𝖲𝖯(Γ{R})\mathsf{\#CSP}(\Gamma\cup\{R\}) is polynomial time reducible to #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma).

For modular counting it is possible to strengthen pp-definitions. For a prime pp we say that RR is pp-mpp-definable (pp-definable modulo pp) in Γ\Gamma if there exists a pp-formula as above

R(x1,,xk)=y1,,ysΦ(x1,,xk,y1,,ys)R(x_{1},\dots,x_{k})=\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s})

such that R(a1,,ak)=1R(a_{1},\dots,a_{k})=1 if and only if the number of assignments to y1,,ysy_{1},\dots,y_{s} such that Φ(a1,,ak,y1,,ys)\Phi(a_{1},\dots,a_{k},y_{1},\dots,y_{s}) is true is not divisible by pp. The first part of the following theorem is fairly straightforward, but this is the second part that enables our study.

Theorem 1.4.

Let pp be a prime, Γ\Gamma a constraint language. Then

  • (1)

    if RR is pp-mpp-definable in Γ\Gamma, then #p𝖢𝖲𝖯(Γ{R})\#_{p}\mathsf{CSP}(\Gamma\cup\{R\}) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma);

  • (2)

    if the relational structure whose predicates are the predicates from Γ\Gamma is pp-rigid, and RR is pp-definable in Γ\Gamma, then RR is pp-mpp-definable in Γ\Gamma.

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 pp-rigidity by using Möbius inversion formula.

The second way to expand a constraint language is to add constant relations. Let Γ\Gamma be a constraint language whose relations are on a set HH. Then Ca={(a)}C_{a}=\{(a)\}, aHa\in H, denotes the unary relation containing only one tuple. Such relations are called constant relations. Let Γ=Γ{CaaH}\Gamma^{*}=\Gamma\cup\{C_{a}\mid a\in H\}. It was proved in [BD07] that #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma^{*}) is polynomial time reducible to #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma), and in [BJK05] it was proved that under certain conditions 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma^{*}) is polynomial time reducible to 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma). The next theorem was first proved in [FJ13] for graphs.

Theorem 1.5.

If Γ\Gamma is pp-rigid, then #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma^{*}) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma).

We emphasise that Theorems 1.4 and 1.5 are true not only for graphs, but for general relational structures as well.

Modular counting of graph homomorphisms.

The following is the main result of the paper.

Theorem 1.6.

Let pp be prime and \mathcal{H} a pp-rigid graph. Then #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) is solvable in polynomial time if and only if every connected component of \mathcal{H} is either an isolated vertex, or a complete graph with all loops present, or a complete bipartite graph. (Note that pp-rigidity implies the the number of vertices in each complete component is less than pp and the number of vertices on each side of the bipartition in bipartite components is at most p1p-1.) Otherwise it is 𝖬𝗈𝖽p\mathsf{Mod}_{p}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 pp-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 \mathcal{H}. 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 α,β0(modp)\alpha,\beta\not\equiv 0\pmod{p}. Then #p𝖡𝖨𝖲(α,β)\#_{p}\mathsf{BIS}(\alpha,\beta) is the problem defined as follows: given a bipartite graph 𝒢\mathcal{G} with bipartition L𝒢,R𝒢L_{\mathcal{G}},R_{\mathcal{G}}, find the value

𝒵α,β(𝒢)=I𝖨𝖲(𝒢)α|IL𝒢|β|IR𝒢|\mathcal{Z}_{\alpha,\beta}(\mathcal{G})=\sum_{I\in\mathsf{IS}(\mathcal{G})}\alpha^{|I\cap L_{\mathcal{G}}|}\cdot\beta^{|I\cap R_{\mathcal{G}}|}

modulo pp. The problem of computing the function 𝒵α,β(𝒢)\mathcal{Z}_{\alpha,\beta}(\mathcal{G}) is proven to be 𝖬𝗈𝖽p\mathsf{Mod}_{p}P-hard in [GLS18].

The special type of bipartite graphs we need is shown in Figure 1. More precisely, a bipartite graph 𝒢=(V,E)\mathcal{G}=(V,E) is said to be a thick Z-graph if its vertices can be partitioned into four sets A,B,C,DA,B,C,D, where A,CL𝒢,B,DR𝒢A,C\subseteq L_{\mathcal{G}},B,D\subseteq R_{\mathcal{G}}, such that the sets AB,CB,CDA\cup B,C\cup B,C\cup D induce complete bipartite subgraphs of 𝒢\mathcal{G}, and there are no edges between vertices from ADA\cup D.

If |A|,|B|,|C|,|D|0(modp)|A|,|B|,|C|,|D|\not\equiv 0\pmod{p} then #p𝖡𝖨𝖲(α,β)\#_{p}\mathsf{BIS}(\alpha,\beta) for appropriate α,β\alpha,\beta can be reduced to #p𝖢𝖲𝖯(𝒢)\#_{p}\mathsf{CSP}(\mathcal{G}). Next, we prove, Theorem 6.5, that such a reduction is still possible if there is an induced subgraph 𝒢\mathcal{G} that is a thick Z-graph and we can simulate the conditions |A|,|B|,|C|,|D|0(modp)|A|,|B|,|C|,|D|\not\equiv 0\pmod{p} using pp-mpp-definitions in the language of \mathcal{H}. This last step is done through a careful analysis of the unary relations pp-mpp-definable in \mathcal{H}. Due to some limitations of Theorem 5.17 we need to consider cases p=2p=2 and p>2p>2 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 pp-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 \mathcal{H} sufficient for hardness. Then we prove that a required thick Z-subgraph always exists. The cases p=2p=2 and p>2p>2 are considered separately. The case p>2p>2 is considered in Section 6.3, and the case p=2p=2 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 [n][n] to denote the set {1,,n}\{1,...,n\}. A relational signature σ\sigma is a collection of relational symbols each with assigned positive integer, the arity of the symbol. A relational structure \mathcal{H} with signature σ\sigma is a set HH and an interpretation RR^{\mathcal{H}} of each RσR\in\sigma, where RR^{\mathcal{H}} is a relation or a predicate on HH whose arity equals that of RR. The set HH is said to be the base set or the universe of \mathcal{H}. We will use for the base set the same letter as for the structure, only in the regular font. A structure with signature σ\sigma is often called a σ\sigma-structure. Structures with the same signature are called similar.

Let 𝒢,\mathcal{G},\mathcal{H} be similar structures. A homomorphism from 𝒢\mathcal{G} to \mathcal{H} is a mapping φ:GH\varphi:G\to H such that for any RσR\in\sigma, say, of arity rr, if R𝒢(a1,,ar)R^{\mathcal{G}}(a_{1},\dots,a_{r}), a1,,arHa_{1},\dots,a_{r}\in H, is true then R(φ(a1),,φ(ar))R^{\mathcal{H}}(\varphi(a_{1}),\dots,\varphi(a_{r})) is true. The set of all homomorphisms from 𝒢\mathcal{G} to \mathcal{H} is denoted 𝖧𝗈𝗆(𝒢,)\mathsf{Hom}(\mathcal{G},\mathcal{H}). The cardinality of 𝖧𝗈𝗆(𝒢,)\mathsf{Hom}(\mathcal{G},\mathcal{H}) is denoted by 𝗁𝗈𝗆(𝒢,)\mathsf{hom}(\mathcal{G},\mathcal{H}). A homomorphism φ\varphi is an isomorphism if it is bijective and the inverse mapping φ1\varphi^{-1} is a homomorphism from \mathcal{H} to 𝒢\mathcal{G}. If ,𝒢\mathcal{H},\mathcal{G} are isomorphic, we write 𝒢\mathcal{H}\cong\mathcal{G}.

Automorphism group

For a relational structure \mathcal{H}, an automorphism is an injective homomorphism into itself. The automorphisms of \mathcal{H} form a group with respect to composition denoted 𝖠𝗎𝗍()\mathsf{Aut}(\mathcal{H}). The set of all automorphisms with aHa\in H as a fixed point is the stabilizer of aa denoted 𝖲𝗍𝖺𝖻(a)\mathsf{Stab}_{\mathcal{H}}(a). It is always a subgroup of 𝖠𝗎𝗍()\mathsf{Aut}(\mathcal{H}).

We will use two basic facts from group theory. First, for any prime pp, if GG is a group and |G|0(modp)|G|\equiv 0\pmod{p}, then GG contains an element of order pp. In particular, if |𝖠𝗎𝗍(G)|0(modp)|\mathsf{Aut}(G)|\equiv 0\pmod{p}, then \mathcal{H} has an automorphism of order pp. We call such automorphisms pp-automorphisms.

Second, if HH is a subgroup of a group GG then G:HG:H denotes the set of cosets of GG modulo HH. In this case Lagrange’s theorem holds claiming |G|=|H||G:H||G|=|H|\cdot|G:H|.

Two views on the CSP

The simplest way to define the Constraint Satisfaction Problem is as follows: Given similar relational structures 𝒢,\mathcal{G},\mathcal{H}, decide whether there is a homomorphism from 𝒢\mathcal{G} to \mathcal{H}. 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 \mathcal{H}. By 𝖢𝖲𝖯()\mathsf{CSP}(\mathcal{H}) we denote the problem, in which given a structure 𝒢\mathcal{G} similar to \mathcal{H}, the goal is to decide whether there is a homomorphism from 𝒢\mathcal{G} to \mathcal{H}. In the counting version of 𝖢𝖲𝖯()\mathsf{CSP}(\mathcal{H}) denoted #𝖢𝖲𝖯()\mathsf{\#CSP}(\mathcal{H}) the goal is to find 𝗁𝗈𝗆(𝒢,)\mathsf{hom}(\mathcal{G},\mathcal{H}) for a given structure 𝒢\mathcal{G}.

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 σ\sigma-structure \mathcal{H} the collection of interpretations RR^{\mathcal{H}}, RσR\in\sigma, is just a set of relations. We call a set of relations over some set HH a constraint language over HH. Thus, for every relational structure \mathcal{H} there is an associated constraint language Γ\Gamma_{\mathcal{H}}. Conversely, every (finite) constraint language Γ\Gamma can be converted into a relational structure Γ\mathcal{H}_{\Gamma} such that ΓΓ=Γ\Gamma_{\mathcal{H}_{\Gamma}}=\Gamma in a straightforward way, although in this case there is much room for the choice of a signature.

Definition 2.1.

Let Γ\Gamma be a constraint language on a set HH, called the domain. The Constraint Satisfaction Problem 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma) is the combinatorial function problem with:
Instance: a pair 𝒫=(V,𝒞)\mathcal{P}=(V,\mathcal{C}) where VV is a finite set of variables and 𝒞\mathcal{C} is a finite set of constraints. Each constraint C𝒞C\in\mathcal{C} is a pair 𝐬,R\langle\mathbf{s},R\rangle where

  • 𝐬=(v1,v2,,vm)\mathbf{s}=(v_{1},v_{2},...,v_{m}) is a tuple of variables from VV of length mm, called the constraint scope;

  • RΓR\in\Gamma is an mm-ary relation, called the constraint relation.

Objective: Decide whether there is a solution of 𝒫\mathcal{P}, that is, a mapping φ:VH\varphi:V\to H such that for each constraint 𝐬,R𝒞\langle\mathbf{s},R\rangle\in\mathcal{C} with 𝐬=(v1,,vm)\mathbf{s}=(v_{1},\dots,v_{m}) the tuple (φ(v1),,φ(vm))(\varphi(v_{1}),\dots,\varphi(v_{m})) belongs to RR.

In the counting version of 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma) denoted #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma) the objective is to find the number of solutions of instance 𝒫\mathcal{P}.

It is well known, see e.g. [FV98] and [BKW17] that problems 𝖢𝖲𝖯()\mathsf{CSP}(\mathcal{H}) and 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma_{\mathcal{H}}) can be easily translated into each other. The same is true for #𝖢𝖲𝖯()\mathsf{\#CSP}(\mathcal{H}) and #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma_{\mathcal{H}}). Thus, we use the two forms of the CSP interchangeably.

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 pp. We fix pp throughout the paper. More precisely, for a structure \mathcal{H} or a constraint language Γ\Gamma in #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}), #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma) the objective is to find the number of homomorphisms or solutions for a given instance modulo pp.

As is mentioned in the introduction, a major complication when studying the complexity of modular counting #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) are pp-automorphisms of \mathcal{H}. We call a structure \mathcal{H} pp-rigid if it does not have pp-automorphisms. Also, we call a language Γ\Gamma pp-rigid if Γ\mathcal{H}_{\Gamma} is pp-rigid.

As was mentioned, pp-automorphisms allow for a reduction of #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) as follows. Let π\pi be a pp-automorphism of \mathcal{H}. By π()\pi^{(\ell)} we denote the composition ππ\pi\circ\dots\circ\pi of \ell applications of π\pi. For an instance 𝒢\mathcal{G} and any homomorphism φ\varphi from 𝒢\mathcal{G} to \mathcal{H} the mappings π()φ\pi^{(\ell)}\circ\varphi, [p]\ell\in[p], are also homomorphisms. This means that the homomorphism φ\varphi makes a contribution into 𝗁𝗈𝗆(𝒢,)\mathsf{hom}(\mathcal{G},\mathcal{H}) other than 0(modp)0\pmod{p} only if πφ=φ\pi\circ\varphi=\varphi. This happens only if φ\varphi maps 𝒢\mathcal{G} to the set of fixed points 𝖥𝗂𝗑(π)\mathsf{Fix}(\pi) of π\pi, that is, 𝖥𝗂𝗑(π)={aHπ(a)=a}\mathsf{Fix}(\pi)=\{a\in H\mid\pi(a)=a\}. By π\mathcal{H}^{\pi} we denote the relational structure obtained by restricting \mathcal{H} to 𝖥𝗂𝗑(π)\mathsf{Fix}(\pi).

Lemma 2.2.

If \mathcal{H} is relational structure, and π\pi an pp-automorphism of \mathcal{H}, then for any structure 𝒢\mathcal{G}

𝗁𝗈𝗆(𝒢,)𝗁𝗈𝗆(𝒢,π)(modp)\mathsf{hom}(\mathcal{G},\mathcal{H})\equiv\mathsf{hom}(\mathcal{G},\mathcal{H}^{\pi})\pmod{p}
Proof.

Let HH and HπH^{\pi} denote the universe of \mathcal{H} and π\mathcal{H}^{\pi} respectively. For a similar structure 𝒢\mathcal{G} with universe GG, we show that the number of homomoprhisms which use at least one element of HHπH-H^{\pi} is 0(modp)0\pmod{p}.

Given any homomorphism φ:𝒢\varphi:\mathcal{G}\rightarrow\mathcal{H}, consider the homomorphism πφ\pi\circ\varphi. This is still a homomorphism which is different from φ\varphi as there is some element vGv\in G such that φ(v)HHπ\varphi(v)\in H-H^{\pi}, and so π(φ(v))φ(v)\pi(\varphi(v))\neq\varphi(v). On the other hand π(p)φ\pi^{(p)}\circ\varphi is just φ\varphi, as π\pi is an pp-automorphism. So π\pi acts as a pp-automorphism on the set of homomorphisms from 𝖧𝗈𝗆(𝒢,)\mathsf{Hom}(\mathcal{G},\mathcal{H}) that use at least one element from HHπH\setminus H^{\pi}. Since this automorphism has no fixed points, the size of this set must be 0 (modp)\pmod{p}. ∎

The binary relation p\rightarrow_{p} on relational structures is defined as follows. For relational structures \mathcal{H} and 𝒦\mathcal{K}, we have p𝒦\mathcal{H}\rightarrow_{p}\mathcal{K} if and only if there exists an automorphism π\pi of \mathcal{H}, of order pp, such that π=𝒦\mathcal{H}^{\pi}=\mathcal{K}. If there exists a sequence of structures 1,2,,\mathcal{H}_{1},\mathcal{H}_{2},\dots,\mathcal{H}_{\ell} such that =1p2pp=𝒦\mathcal{H}=\mathcal{H}_{1}\rightarrow_{p}\mathcal{H}_{2}\rightarrow_{p}\dots\rightarrow_{p}\mathcal{H}_{\ell}=\mathcal{K}, we write p𝒦\mathcal{H}\rightarrow_{p}^{*}\mathcal{K} and say that \mathcal{H} pp-reduces to 𝒦\mathcal{K}. If 𝒦\mathcal{K} is pp-rigid, it is called a pp-reduced form associated with \mathcal{H}. The following lemma is proved by a light modification of the proof in [FJ13].

Lemma 2.3 ([FJ13]).

For a relational structure \mathcal{H} there is (up to isomorphism) exactly one pp-rigid structure p\mathcal{H}^{\star p} such that pp\mathcal{H}\rightarrow_{p}\mathcal{H}^{\star p}.

2.3 Factors, products and homomorphisms

We will need several concepts related to homomorphisms. Recall that a σ\sigma-structure \mathcal{H} is a said to be an expansion of a σ\sigma^{\prime}-structure 𝒢\mathcal{G} if H=GH=G, σσ\sigma^{\prime}\subseteq\sigma (with arities of predicate symbols in σ\sigma^{\prime} being equal in σ,σ\sigma,\sigma^{\prime}), and R=R𝒢R^{\mathcal{H}}=R^{\mathcal{G}} for any RσR\in\sigma^{\prime}.

A pair (,𝐚)(\mathcal{H},\mathbf{a}), where 𝐚=(a1,,ak)Hk\mathbf{a}=(a_{1},\dots,a_{k})\in H^{k} for some kk, will be called a relational structure \mathcal{H} with distinguished vertices 𝐚\mathbf{a}. For structures with distinguished vertices (𝒢,𝐚),(,𝐛)(\mathcal{G},\mathbf{a}),(\mathcal{H},\mathbf{b}) such that 𝒢,\mathcal{G},\mathcal{H} are similar, a homomorphism from (𝒢,𝐚)(\mathcal{G},\mathbf{a}) to (,𝐛)(\mathcal{H},\mathbf{b}) is a homomorphism φ\varphi from 𝒢\mathcal{G} to \mathcal{H} that maps aia_{i} to bib_{i}, i[k]i\in[k]. The set of all homomorphisms from (𝒢,𝐚)(\mathcal{G},\mathbf{a}) to (,𝐛)(\mathcal{H},\mathbf{b}) is denoted by 𝖧𝗈𝗆((𝒢,𝐚),(,𝐛))\mathsf{Hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},\mathbf{b})). Also, 𝗁𝗈𝗆((𝒢,𝐚),(,𝐛))=|𝖧𝗈𝗆((𝒢,𝐚),(,𝐛))|\mathsf{hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},\mathbf{b}))=|\mathsf{Hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},\mathbf{b}))|.

This notion can be slightly generalized replacing 𝐛\mathbf{b} with a sequence B1,,BkHB_{1},\dots,B_{k}\subseteq H:

𝖧𝗈𝗆((𝒢,𝐚),(,B1,,Bk))\displaystyle\mathsf{Hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},B_{1},\dots,B_{k})) =biBi,i[k]𝖧𝗈𝗆((𝒢,𝐚),(,𝐛))and\displaystyle=\bigcup_{b_{i}\in B_{i},i\in[k]}\mathsf{Hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},\mathbf{b}))\qquad\text{and}
𝗁𝗈𝗆((𝒢,𝐚),(,B1,,Bk))\displaystyle\mathsf{hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},B_{1},\dots,B_{k})) =biBi,i[k]𝗁𝗈𝗆((𝒢,𝐚),(,𝐛))\displaystyle=\sum_{b_{i}\in B_{i},i\in[k]}\mathsf{hom}((\mathcal{G},\mathbf{a}),(\mathcal{H},\mathbf{b}))

Note that a relational structure (𝒢,𝐚)(\mathcal{G},\mathbf{a}) with distinguished vertices can be viewed as an expansion of 𝒢\mathcal{G} with kk 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 σ\sigma-structures ,𝒢\mathcal{H},\mathcal{G}, denoted ×𝒢\mathcal{H}\times\mathcal{G} is the σ\sigma-structure with the base set H×GH\times G and such that the interpretation of RσR\in\sigma is given by R×𝒢((a1,b1),,(ak,bk))=1R^{\mathcal{H}\times\mathcal{G}}((a_{1},b_{1}),\dots,(a_{k},b_{k}))=1 if and only if R(a1,,ak)=1R^{\mathcal{H}}(a_{1},\dots,a_{k})=1 and R𝒢(b1,,bk)=1R^{\mathcal{G}}(b_{1},\dots,b_{k})=1. By \mathcal{H}^{\ell} we will denote the \ellth power of \mathcal{H}, that is, the direct product of \ell copies of \mathcal{H}. The direct product (𝒢,𝐱)×(,𝐲)(\mathcal{G},\mathbf{x})\times(\mathcal{H},\mathbf{y}) of structures (𝒢,𝐱),(,𝐲)(\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y}) is defined to be (×𝒢,(x1,y1),,(xr,yr))(\mathcal{H}\times\mathcal{G},(x_{1},y_{1}),\dots,(x_{r},y_{r})).

Two rr-tuples 𝐱\mathbf{x} and 𝐲\mathbf{y} have the same equality type if xi=xjx_{i}=x_{j} if and only if yi=yjy_{i}=y_{j} for i,j[r]i,j\in[r]. Let (𝒢,𝐱)(\mathcal{G},\mathbf{x}) and (,𝐲)(\mathcal{H},\mathbf{y}) be structure with rr distinguished vertices and such that 𝐱\mathbf{x} and 𝐲\mathbf{y} have the same equality type. Then (𝒢,𝐱)(,𝐲)(\mathcal{G},\mathbf{x})\odot(\mathcal{H},\mathbf{y}) denotes the structure that is obtained by taking the disjoint union of 𝒢\mathcal{G} and \mathcal{H} and identifying every xix_{i} with yiy_{i}, i[r]i\in[r]. The distinguished vertices of the new structure are x1,,xrx_{1},\dots,x_{r}.

The following statement is straightforward.

Proposition 2.4.

Let (𝒢,𝐱),(,𝐲),(𝒦,𝐳)(\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y}),(\mathcal{K},\mathbf{z}) be similar relational structures with rr distinguished vertices. Then

𝗁𝗈𝗆((𝒢,𝐱)(,𝐲),(𝒦,𝐳))\displaystyle\mathsf{hom}((\mathcal{G},\mathbf{x})\odot(\mathcal{H},\mathbf{y}),(\mathcal{K},\mathbf{z})) =𝗁𝗈𝗆((𝒢,𝐱),(𝒦,𝐳))𝗁𝗈𝗆((,𝐲),(𝒦,𝐳));\displaystyle=\mathsf{hom}((\mathcal{G},\mathbf{x}),(\mathcal{K},\mathbf{z}))\cdot\mathsf{hom}((\mathcal{H},\mathbf{y}),(\mathcal{K},\mathbf{z}));
𝗁𝗈𝗆((𝒦,𝐳),((𝒢,𝐱)×(,𝐲))\displaystyle\mathsf{hom}((\mathcal{K},\mathbf{z}),((\mathcal{G},\mathbf{x})\times(\mathcal{H},\mathbf{y})) =𝗁𝗈𝗆((𝒦,𝐳),(𝒢,𝐱))𝗁𝗈𝗆((𝒦,𝐳),(,𝐲)).\displaystyle=\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))\cdot\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y})).

We will also need another simple observation. By 𝗂𝗇𝗃((𝒢,𝐱),(,𝐲))\mathsf{inj}((\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y})) we denote the number of injective homomorphisms from (𝒢,𝐱)(\mathcal{G},\mathbf{x}) to (,𝐲)(\mathcal{H},\mathbf{y}).

Lemma 2.5.

Let (𝒢,𝐲)(\mathcal{G},\mathbf{y}) and (,𝐲)(\mathcal{H},\mathbf{y}) be relational structures with rr distinguished vertices. If 𝐱,𝐲\mathbf{x},\mathbf{y} do not have the same equality type, then 𝗂𝗇𝗃((𝒢,𝐱),(,𝐲))=0\mathsf{inj}((\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y}))=0.

Finally, we will use factor structures. Let \mathcal{H} be a σ\sigma-structure and θ\theta an equivalence relation on HH. By /θ\mathcal{H}/_{\theta} we denote the factor structure defined as follows.

  • /θ\mathcal{H}/_{\theta} is a σ\sigma-structure.

  • The base set of /θ\mathcal{H}/_{\theta} is H/θ={a/θaH}H/_{\theta}=\{a/_{\theta}\mid a\in H\}, where a/θa/_{\theta} denotes the θ\theta-class containing aa.

  • For any RσR\in\sigma, say, kk-ary, R/θ={(a1/θ,,ak/θ)(a1,,ak)R}R^{\mathcal{H}/_{\theta}}=\{(a_{1}/_{\theta},\dots,a_{k}/_{\theta})\mid(a_{1},\dots,a_{k})\in R^{\mathcal{H}}\}.

Factor structures often appear in relation with homomorphisms. If φ\varphi is a homomorphism from a structure \mathcal{H} to a structure 𝒢\mathcal{G}, then the kernel θ\theta of φ\varphi is the equivalence relation on HH given by

(a,b)θ if and only if φ(u)=φ(v).(a,b)\in\theta\text{ if and only if }\varphi(u)=\varphi(v).

Homomorphism φ\varphi gives rise to a homomorphism φ/θ\varphi/_{\theta} from /θ\mathcal{H}/_{\theta} to 𝒢\mathcal{G}, where φ/θ(a/θ)=φ(a)\varphi/_{\theta}(a/_{\theta})=\varphi(a), aHa\in H. Homomorphism φ/θ\varphi/_{\theta} is always injective.

We also define factor structures for structures with distinguished vertices as follows. Let (,𝐚)(\mathcal{H},\mathbf{a}) be a structure with kk distinguished vertices and θ\theta an equivalence relation on HH. Then (,𝐚)/θ=(/θ,(a1/θ,,ak/θ))(\mathcal{H},\mathbf{a})/_{\theta}=(\mathcal{H}/_{\theta},(a_{1}/_{\theta},\dots,a_{k}/_{\theta})).

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 =H=_{H} denote the relation of equality on the set HH.

Let Γ\Gamma be a constraint language on a set HH. A primitive positive formula in Γ\Gamma is a first-order formula y1,,ysΦ(x1,,xk,y1,,ys)\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}), where Φ\Phi is a conjunction of atomic formulas of the form z1=Hz2z_{1}=_{H}z_{2} or R(z1,,z)R(z_{1},\dots,z_{\ell}), z1,,z{x1,,xk,y1,,ys}z_{1},\dots,z_{\ell}\in\{x_{1},\dots,x_{k},y_{1},\dots,y_{s}\}, and RΓR\in\Gamma. We say that Γ\Gamma pp-defines a predicate RR if there exists a pp-formula y1,,ysΦ(x1,,xk,y1,,ys)\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}) such that R(x1,,xk)=y1,,ysΦ(x1,,xk,y1,,ys)R(x_{1},\dots,x_{k})=\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}). A relational structure pp-defines RR if so does Γ\Gamma_{\mathcal{H}}.

Jeavons et al. [Jea98] and Bulatov and Dalmau [BD07] proved that if Γ\Gamma pp-defines RR then 𝖢𝖲𝖯(Γ{R})\mathsf{CSP}(\Gamma\cup\{R\}) (respectively, #𝖢𝖲𝖯(Γ{R})\mathsf{\#CSP}(\Gamma\cup\{R\})) is polynomial time reducible to 𝖢𝖲𝖯(Γ)\mathsf{CSP}(\Gamma) (respectively, to #𝖢𝖲𝖯(Γ)\mathsf{\#CSP}(\Gamma)). Later we will prove a similar result for modular counting.

Primitive positive definitions have close connections to homomorphisms, see [FV98, Kol04].

Lemma 2.6.

A predicate R(x1,,xk)R(x_{1},\dots,x_{k}) is pp-definable in a σ\sigma-structure \mathcal{H} if and only if there exists a σ\sigma-structure (𝒢,(x1,,xk))(\mathcal{G},(x_{1},\dots,x_{k})) such that

𝗁𝗈𝗆((𝒢,(x1,,xk),(,(a1,,ak))0if and only if(a1,,ak)R.\mathsf{hom}((\mathcal{G},(x_{1},\dots,x_{k}),(\mathcal{H},(a_{1},\dots,a_{k}))\neq 0\qquad\text{if and only if}\qquad(a_{1},\dots,a_{k})\in R.
Proof.

It suffices to demonstrate the connection between pp-formulas and structures. Then the lemma follows straightforwardly.

Let Φ(x1,,xk,y1,,ys)\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}) be the quantifier free part of a pp-formula, and assume that the equality predicates are eliminated from Φ\Phi by identifying equated variables. In other words, Φ\Phi is a conjunction of atomic formulas of the form Q(z1,,z)Q(z_{1},\dots,z_{\ell}), where QσQ\in\sigma and z1,,z{x1,,xk,y1,,ys}z_{1},\dots,z_{\ell}\in\{x_{1},\dots,x_{k},y_{1},\dots,y_{s}\}. The corresponding σ\sigma-structure Φ\mathcal{H}_{\Phi} is constructed as follows. Its base set is HΦ={x1,,xk,y1,,ys}H_{\Phi}=\{x_{1},\dots,x_{k},y_{1},\dots,y_{s}\}. Then for any QσQ\in\sigma, say, \ell-ary, (z1,,z)QΦ(z_{1},\dots,z_{\ell})\in Q^{\mathcal{H}_{\Phi}} if and only if Q(z1,,z)Q(z_{1},\dots,z_{\ell}) is an atom in Φ\Phi. The transition from a structure (𝒢,(x1,,xk))(\mathcal{G},(x_{1},\dots,x_{k})) to a formula is defined in the reverse way. The result now follows from the observation that every satisfying assignment of Φ\Phi is also a homomorphism from Φ\mathcal{H}_{\Phi} to \mathcal{H}. ∎

3 Gadgets and automorphisms

In this section we prove several results that claim the existence of certain well behaved pp-definitions and homomorphisms for pp-rigid relational structures.

3.1 Möbius inversion

We will use Möbius inversion formula. Let HH be a set, 𝖯𝖺𝗋𝗍(H)\mathsf{Part}(H) denote the poset of partitions of HH, where 1¯{\underline{1}} denotes the single class partition, 0¯{\underline{0}} the partition into 1-element classes, and ηθ\eta\leq\theta means that η\eta is the finer partition of the two. Let also M,N:𝖯𝖺𝗋𝗍(H)M,N:\mathsf{Part}(H)\rightarrow\mathbb{Z} be some functions satisfying

M(θ)=ηθN(η).M(\theta)=\sum_{\eta\geq\theta}N(\eta).

Then

N(0¯)=θ𝖯𝖺𝗋𝗍(H)w(θ)M(θ),N({\underline{0}})=\sum_{\theta\in\mathsf{Part}(H)}w(\theta)M(\theta),

where the function w:𝖯𝖺𝗋𝗍(H)w:\mathsf{Part}(H)\rightarrow\mathbb{Z} is given by:

  • w(1¯)=1w({\underline{1}})=1,

  • for any partition θ<1¯\theta<{\underline{1}}, w(θ)=γ>θw(γ)w(\theta)=-{\sum}\limits_{\gamma>\theta}w(\gamma).

The Möbius inversion formula will mainly be used as the following lemmas indicate.

Lemma 3.1.

Let pp be prime and let \mathcal{H} be a relational structure such that, for any 𝒢\mathcal{G}, 𝗁𝗈𝗆(𝒢,)c(modp)\mathsf{hom}(\mathcal{G},\mathcal{H})\equiv c\pmod{p}, where cc does not depend on 𝒢\mathcal{G}. Then \mathcal{H} has a pp-automorphism.

Proof.

We use the following parameters in Möbius inversion formula: the set HH is the base set of \mathcal{H}, M(θ)=𝗁𝗈𝗆(/θ,)M(\theta)=\mathsf{hom}(\mathcal{H}/_{\theta},\mathcal{H}), N(θ)=𝗂𝗇𝗃(/θ,)N(\theta)=\mathsf{inj}(\mathcal{H}/_{\theta},\mathcal{H}). Then clearly N(0¯)=𝖠𝗎𝗍()N({\underline{0}})=\mathsf{Aut}(\mathcal{H}). By the formula we have

N(0¯)=θ𝖯𝖺𝗋𝗍(H)w(θ)M(θ)=θ𝖯𝖺𝗋𝗍(H)w(θ)𝗁𝗈𝗆(/θ,)cθ𝖯𝖺𝗋𝗍(H)w(θ)0(modp).N({\underline{0}})=\sum_{\theta\in\mathsf{Part}(H)}w(\theta)M(\theta)=\sum_{\theta\in\mathsf{Part}(H)}w(\theta)\mathsf{hom}(\mathcal{H}/_{\theta},\mathcal{H})\equiv c\cdot\sum_{\theta\in\mathsf{Part}(H)}w(\theta)\equiv 0\pmod{p}.

Therefore |𝖠𝗎𝗍()|0(modp)|\mathsf{Aut}(\mathcal{H})|\equiv 0\pmod{p} and \mathcal{H} has a pp-automorphism. ∎

We call a subset ArA\subseteq\mathcal{H}^{r} automorphism-stable if there is 𝐚A\mathbf{a}\in A such that the set 𝖲𝗍𝖺𝖻(𝐚,A)={π𝖠𝗎𝗍(r)π(𝐚)A}\mathsf{Stab}(\mathbf{a},A)=\{\pi\in\mathsf{Aut}(\mathcal{H}^{r})\mid\pi(\mathbf{a})\in A\} is a subgroup of 𝖠𝗎𝗍(r)\mathsf{Aut}(\mathcal{H}^{r}). Note that 𝖲𝗍𝖺𝖻(𝐚,A)\mathsf{Stab}(\mathbf{a},A) is always nonempty, as it contains the identity mapping. Also, by 𝖲𝗍𝖺𝖻(𝐚1,,𝐚k)\mathsf{Stab}(\mathbf{a}_{1},\dots,\mathbf{a}_{k}) we denote the subset of 𝖠𝗎𝗍(r)\mathsf{Aut}(\mathcal{H}^{r}) that contains all the automorphisms for which each of 𝐚1,,𝐚k\mathbf{a}_{1},\dots,\mathbf{a}_{k} is a fixed point.

Lemma 3.2.

Let pp be prime, \mathcal{H} a relational structure.

  • (1)

    Let AHrA\subseteq H^{r} an automorphism-stable set. If for any 𝒢\mathcal{G} and 𝐱𝒢\mathbf{x}\in\mathcal{G}, 𝗁𝗈𝗆((𝒢,𝐱),(,A))c(modp)\mathsf{hom}((\mathcal{G},\mathbf{x}),(\mathcal{H},A))\equiv c\pmod{p}, where cc does not depend on 𝒢\mathcal{G} and 𝐱\mathbf{x}, then the structure r\mathcal{H}^{r} has a pp-automorphism π𝖲𝗍𝖺𝖻(𝐚,A)\pi\in\mathsf{Stab}(\mathbf{a},A) for some 𝐚A\mathbf{a}\in A.

  • (2)

    Let 𝐚1,,𝐚kr\mathbf{a}_{1},\dots,\mathbf{a}_{k}\in\mathcal{H}^{r}. If for any 𝒢\mathcal{G} and x1,,xk𝒢x_{1},\dots,x_{k}\in\mathcal{G}, 𝗁𝗈𝗆((𝒢,x1,,xk),(,𝐚1,,𝐚k))c(modp)\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H},\mathbf{a}_{1},\dots,\mathbf{a}_{k}))\equiv c\pmod{p}, where cc does not depend on 𝒢\mathcal{G} and x1,,xkx_{1},\dots,x_{k}, then the structure r\mathcal{H}^{r} has a pp-automorphism π𝖲𝗍𝖺𝖻(𝐚1,,𝐚k)\pi\in\mathsf{Stab}(\mathbf{a}_{1},\dots,\mathbf{a}_{k}) for some 𝐚A\mathbf{a}\in A.

Proof.

(1) Similar to Lemma 3.1 we use Möbius inversion formula on 𝖯𝖺𝗋𝗍(Hr)\mathsf{Part}(H^{r}). Let 𝐚A\mathbf{a}\in A be the element witnessing that AA is automorphism stable and set M(θ)=𝗁𝗈𝗆((r/θ,𝐚/θ),(r,A))M(\theta)=\mathsf{hom}((\mathcal{H}^{r}/_{\theta},\mathbf{a}/_{\theta}),(\mathcal{H}^{r},A)), N(θ)=𝗂𝗇𝗃((r/θ,𝐚/θ),(r,A))N(\theta)=\mathsf{inj}((\mathcal{H}^{r}/_{\theta},\mathbf{a}/_{\theta}),(\mathcal{H}^{r},A)). Then N(0¯)0N({\underline{0}})\neq 0, as it includes the identity mapping, and as before we have

N(0¯)\displaystyle N({\underline{0}}) =θ𝖯𝖺𝗋𝗍(Hr)w(θ)M(θ)\displaystyle=\sum_{\theta\in\mathsf{Part}(H^{r})}w(\theta)M(\theta)
=θ𝖯𝖺𝗋𝗍(Hr)w(θ)𝗁𝗈𝗆((r/θ,x/θ),(r,A))cθ𝖯𝖺𝗋𝗍(Hr)w(θ)0(modp).\displaystyle=\sum_{\theta\in\mathsf{Part}(H^{r})}w(\theta)\mathsf{hom}((\mathcal{H}^{r}/_{\theta},x/_{\theta}),(\mathcal{H}^{r},A))\equiv c\cdot\sum_{\theta\in\mathsf{Part}(H^{r})}w(\theta)\equiv 0\pmod{p}.

Note that N(0¯)=𝖲𝗍𝖺𝖻(𝐚,A)N({\underline{0}})=\mathsf{Stab}(\mathbf{a},A) and therefore is a subgroup of 𝖠𝗎𝗍(r)\mathsf{Aut}(\mathcal{H}^{r}). As it has order that is a multiple of pp, it contains a pp-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 pp-rigid relational structure \mathcal{H} there is always a pp-definition that somewhat uniformizes the number of extensions of tuples in predicates pp-definable in \mathcal{H}.

Let \mathcal{H} be a relational structure and RR is pp-definable in \mathcal{H} by a pp-formula

R(x1,,xk)=y1,,ysΦ(x1,,xk,y1,,ys).R(x_{1},\dots,x_{k})=\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}).

For 𝐚R\mathbf{a}\in R by #𝖾𝗑𝗍Φ(𝐚)\mathsf{\#ext}_{\Phi}(\mathbf{a}) we denote the number of assignments 𝐛Hs\mathbf{b}\in H^{s} to y1,,ysy_{1},\dots,y_{s} such that Φ(𝐚,𝐛)\Phi(\mathbf{a},\mathbf{b}) holds.

Proposition 3.3.

Let \mathcal{H} be a pp-rigid relational structure and RR is pp-definable in \mathcal{H}. Then there exists a pp-definition y1,,ysΦ(x1,,xk,y1,,ys)\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}) of RR such that for any 𝐚R\mathbf{a}\in R, #𝖾𝗑𝗍Φ(𝐚)1(modp)\mathsf{\#ext}_{\Phi}(\mathbf{a})\equiv 1\pmod{p}.

Proof.

We use the equivalence between pp-definitions and homomorphisms discussed in Section 2.4. Let R={𝐚1,,𝐚}HkR=\{\mathbf{a}_{1},\dots,\mathbf{a}_{\ell}\}\subseteq H^{k}. Our goal is to find a relational structure 𝒢\mathcal{G} similar to \mathcal{H} such that for some x1,,xkGkx_{1},\dots,x_{k}\in G^{k} and any 𝐚=(a1,,ak)R\mathbf{a}=(a_{1},\dots,a_{k})\in R,

𝗁𝗈𝗆((𝒢,x1,,xk),(,a1,,ak))1(modp).\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H},a_{1},\dots,a_{k}))\equiv 1\pmod{p}.

Note that by Proposition 2.4 and Fermat’s Little Theorem it suffices to prove that such a structure exists satisfying 𝗁𝗈𝗆((𝒢,x1,,xk),(,a1,,ak))0(modp)\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H},a_{1},\dots,a_{k}))\not\equiv 0\pmod{p}.

Consider =××\mathcal{H}^{\ell}=\mathcal{H}\times\dots\times\mathcal{H} (\ell times) with distinguished vertices 𝐚1,,𝐚k\mathbf{a}^{1},\dots,\mathbf{a}^{k}, where 𝐚i=(ai1,,aik)\mathbf{a}_{i}=(a_{i1},\dots,a_{ik}) and 𝐚j=(a1j,,aj)\mathbf{a}^{j}=(a_{1j},\dots,a_{\ell j}), i[],j[k]i\in[\ell],j\in[k]. By Proposition 2.4

𝗁𝗈𝗆((𝒢,x1,,xk),(,𝐚1,,𝐚k))=i[]𝗁𝗈𝗆((𝒢,x1,,xk),(,𝐚i)).\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H}^{\ell},\mathbf{a}^{1},\dots,\mathbf{a}^{k}))=\prod_{i\in[\ell]}\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H},\mathbf{a}_{i})). (1)

If (,𝐚1,,𝐚k)(\mathcal{H}^{\ell},\mathbf{a}^{1},\dots,\mathbf{a}^{k}) was pp-rigid, we could apply Möbius inversion formula in a way similar to Lemma 3.2(2) to infer the existence of a required 𝒢\mathcal{G}. However, there is no guarantee this is the case. We need to make one more step.

Note that each of the 𝐚j\mathbf{a}^{j} is a fixed point of any automorphism of (,𝐚1,,𝐚k)(\mathcal{H}^{\ell},\mathbf{a}^{1},\dots,\mathbf{a}^{k}). This means that the pp-reduced form p\mathcal{H}^{\star p} of (,(𝐚1,,𝐚k))(\mathcal{H}^{\ell},(\mathbf{a}^{1},\dots,\mathbf{a}^{k})) contains all the 𝐚j\mathbf{a}^{j}. Thus

𝗁𝗈𝗆((𝒢,x1,,xk),(,𝐚1,,𝐚k))=𝗁𝗈𝗆((𝒢,x1,,xk),(p,𝐚1,,𝐚k)).\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H}^{\ell},\mathbf{a}^{1},\dots,\mathbf{a}^{k}))=\mathsf{hom}((\mathcal{G},x_{1},\dots,x_{k}),(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k})). (2)

We apply Möbius inversion to (p,𝐚1,,𝐚k)(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k}). For θ𝖯𝖺𝗋𝗍(Hp)\theta\in\mathsf{Part}(H^{\star p}) we set

M(θ)\displaystyle M(\theta) =𝗁𝗈𝗆((p/θ,𝐚1/θ,,𝐚k/θ),(p,𝐚1,,𝐚k)),\displaystyle=\mathsf{hom}((\mathcal{H}^{\star p}/_{\theta},\mathbf{a}^{1}/_{\theta},\dots,\mathbf{a}^{k}/_{\theta}),(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k})),
N(θ)\displaystyle N(\theta) =𝗂𝗇𝗃((p/θ,𝐚1/θ,,𝐚k/θ),(p,𝐚1,,𝐚k)).\displaystyle=\mathsf{inj}((\mathcal{H}^{\star p}/_{\theta},\mathbf{a}^{1}/_{\theta},\dots,\mathbf{a}^{k}/_{\theta}),(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k})).

Then we proceed as in the proof of Lemma 3.2 to conclude that if M(θ)0(modp)M(\theta)\equiv 0\pmod{p} for all θ𝖯𝖺𝗋𝗍(Hp)\theta\in\mathsf{Part}(H^{\star p}), then (p,𝐚1,,𝐚k)(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k}) has a pp-automorphism, leading to a contradiction with the construction of (p,𝐚1,,𝐚k)(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k}). Therefore, there exists θ𝖯𝖺𝗋𝗍(Hp)\theta\in\mathsf{Part}(H^{\star p}) such that

𝗁𝗈𝗆((p/θ,𝐚1/θ,,𝐚k/θ),(p,𝐚1,,𝐚k))0(modp).\mathsf{hom}((\mathcal{H}^{\star p}/_{\theta},\mathbf{a}^{1}/_{\theta},\dots,\mathbf{a}^{k}/_{\theta}),(\mathcal{H}^{\star p},\mathbf{a}^{1},\dots,\mathbf{a}^{k}))\not\equiv 0\pmod{p}.

Observe that since for each j[l]j\in[l] it holds that (aj1,,ajk)R(a_{j1},\dots,a_{jk})\in R, we have

𝗁𝗈𝗆((p/θ,𝐚1/θ,,𝐚k/θ),(,b1,,bk)0(modp),\mathsf{hom}((\mathcal{H}^{\star p}/_{\theta},\mathbf{a}^{1}/_{\theta},\dots,\mathbf{a}^{k}/_{\theta}),(\mathcal{H},b_{1},\dots,b_{k})\not\equiv 0\pmod{p},

unless (b1,,bk)R(b_{1},\dots,b_{k})\in R. By (1),(2) (/θ,𝐚1/θ,,𝐚k/θ)(\mathcal{H}^{*}/_{\theta},\mathbf{a}^{1}/_{\theta},\dots,\mathbf{a}^{k}/_{\theta}) satisfies the required conditions. ∎

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 (𝒢,𝐱)(\mathcal{G},\mathbf{x}) and (,𝐱)(\mathcal{H},\mathbf{x}) be pp-rigid relational structures with rr distinguished vertices. Then, (𝒢,𝐱)(,𝐲)(\mathcal{G},\mathbf{x})\cong(\mathcal{H},\mathbf{y}) if and only if

𝗁𝗈𝗆((𝒦,𝐳),(𝒢,𝐱))𝗁𝗈𝗆((𝒦,𝐳),(,𝐲))(modp)\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))\equiv\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y}))\pmod{p} (3)

for all relational structures (𝒦,𝐳)(\mathcal{K},\mathbf{z}) with rr distinguished vertices.

Proof.

The proof goes along the same lines as that in [GLS18]. If (𝒢,𝐱)(\mathcal{G},\mathbf{x}) and (,𝐲)(\mathcal{H},\mathbf{y}) are isomorphic, then (3) obviously holds for all relational structures (𝒦,𝐳)(\mathcal{K},\mathbf{z}).

For the other direction, suppose that (3) is true for all (𝒦,𝐳)(\mathcal{K},\mathbf{z}).

First, we claim that this implies that 𝐱\mathbf{x} and 𝐲\mathbf{y} have the same equality type. Indeed, if they do not, then without loss of generality there are i,j[r]i,j\in[r] such that xi=xjx_{i}=x_{j} but yiyjy_{i}\neq y_{j}. Let 𝒦\mathcal{K} be the relational structure with the base set {z1,,zr}\{z_{1},\dots,z_{r}\} such that zi=zjz_{i}=z_{j} with empty predicates and (z1,,zr)(z_{1},\dots,z_{r}) as distinguished vertices. Then 𝗁𝗈𝗆((𝒦,𝐳),(𝒢,𝐱))=10=𝗁𝗈𝗆((𝒦,𝐳),(,𝐲))\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))=1\neq 0=\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y})), a contradiction with the assumption that (3) holds for all (𝒦,𝐳)(\mathcal{K},\mathbf{z}).

We show by induction on the number of vertices in 𝒦\mathcal{K} that

𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))𝗂𝗇𝗃((𝒦,𝐳),(,𝐲))(modp).\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))\equiv\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y}))\pmod{p}. (4)

for all (𝒦,𝐳)(\mathcal{K},\mathbf{z}). Let n0=|{x1,,xr}|=|{y1,,yr}|n_{0}=|\{x_{1},\dots,x_{r}\}|=|\{y_{1},\dots,y_{r}\}| be the number of distinct elements in 𝐱,𝐲\mathbf{x},\mathbf{y}. For the base case of the induction, consider a relational structure (𝒦,𝐳)(\mathcal{K},\mathbf{z}) such that |K|n0|K|\leq n_{0}. If 𝐳\mathbf{z} does not have the same equality type as 𝐱,𝐲\mathbf{x},\mathbf{y}, then 𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))=𝗂𝗇𝗃((𝒦,𝐳),(,𝐲))=0\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))=\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y}))=0. If 𝐱\mathbf{x} has the same equality type as 𝐱,𝐲\mathbf{x},\mathbf{y}, the only homomorphisms from (𝒦,𝐳)(\mathcal{K},\mathbf{z}) to (𝒢,𝐱),(,𝐲)(\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y}) are the ones that map ziz_{i} to xi,yix_{i},y_{i}, respectively. Therefore, 𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))=𝗂𝗇𝗃((𝒦,𝐳),(,𝐲))\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))=\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y})).

For the inductive step, let n>n0n>n_{0} and assume that (4) holds for all (𝒦,𝐳)(\mathcal{K},\mathbf{z}) with |K|<n|K|<n. Let (𝒦,𝐳)(\mathcal{K},\mathbf{z}) be a relational structure with |K|=n|K|=n, and let θ\theta be an equivalence relation on KK. Then, as is easily seen

𝗁𝗈𝗆θ((𝒦,𝐳),(𝒢,𝐱))=𝗂𝗇𝗃((𝒦/θ,𝐳/θ),(𝒢,𝐱)) and 𝗁𝗈𝗆θ((𝒦,𝐳),(,𝐲))=𝗂𝗇𝗃((𝒦/θ,𝐳/θ),(,𝐲)),\mathsf{hom}_{\theta}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))=\mathsf{inj}((\mathcal{K}/_{\theta},\mathbf{z}/_{\theta}),(\mathcal{G},\mathbf{x}))\quad\text{ and }\quad\mathsf{hom}_{\theta}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y}))=\mathsf{inj}((\mathcal{K}/_{\theta},\mathbf{z}/_{\theta}),(\mathcal{H},\mathbf{y})),

where 𝗁𝗈𝗆θ((𝒦,𝐳),(𝒢,𝐱)),𝗁𝗈𝗆θ((𝒦,𝐳),(,𝐲))\mathsf{hom}_{\theta}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x})),\mathsf{hom}_{\theta}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y})) denote the number of homomorphisms φ\varphi from (𝒦,𝐳)(\mathcal{K},\mathbf{z}) to (𝒢,𝐱),(,𝐲)(\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y}), respectively, and such that ker(φ)=θ\ker(\varphi)=\theta. Then

𝗁𝗈𝗆((𝒦,𝐳),(𝒢,𝐱))\displaystyle\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x})) =𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))+θ𝖯𝖺𝗋𝗍(K){0¯}𝗂𝗇𝗃((𝒦,𝐳)/θ,(𝒢,𝐱))\displaystyle=\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))+\sum_{\theta\in\mathsf{Part}(K)-\{{\underline{0}}\}}\mathsf{inj}((\mathcal{K},\mathbf{z})/_{\theta},(\mathcal{G},\mathbf{x}))
𝗁𝗈𝗆((𝒦,𝐳),(𝒢,𝐱))\displaystyle\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x})) =𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))+θ𝖯𝖺𝗋𝗍(K){0¯}𝗂𝗇𝗃((𝒦,𝐳)/θ,(𝒢,𝐱))\displaystyle=\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))+\sum_{\theta\in\mathsf{Part}(K)-\{{\underline{0}}\}}\mathsf{inj}((\mathcal{K},\mathbf{z})/_{\theta},(\mathcal{G},\mathbf{x}))

Since 𝗁𝗈𝗆((𝒦,𝐳),(𝒢,𝐱))𝗁𝗈𝗆((𝒦,𝐳),(,𝐲))(modp)\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))\equiv\mathsf{hom}((\mathcal{K},\mathbf{z}),(\mathcal{H},\mathbf{y}))\pmod{p} and 𝗂𝗇𝗃((𝒦,𝐳)/θ,(𝒢,𝐱))𝗂𝗇𝗃((𝒦,𝐳)/θ,(,𝐲))(modp)\mathsf{inj}((\mathcal{K},\mathbf{z})/_{\theta},(\mathcal{G},\mathbf{x}))\equiv\mathsf{inj}((\mathcal{K},\mathbf{z})/_{\theta},(\mathcal{H},\mathbf{y}))\pmod{p} for all θ𝖯𝖺𝗋𝗍(K){0¯}\theta\in\mathsf{Part}(K)-\{{\underline{0}}\} we get 𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))𝗂𝗇𝗃((𝒦,𝐳),(𝒢,𝐱))(modp)\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))\equiv\mathsf{inj}((\mathcal{K},\mathbf{z}),(\mathcal{G},\mathbf{x}))\pmod{p}.

Finally, we prove that (4) for (𝒦,𝐳)=(𝒢,𝐱)(\mathcal{K},\mathbf{z})=(\mathcal{G},\mathbf{x}) implies (𝒢,𝐱)(,𝐲)(\mathcal{G},\mathbf{x})\cong(\mathcal{H},\mathbf{y}). An injective homomorphism from a relational structure to itself is an automorphism. Since (𝒢,𝐱)(\mathcal{G},\mathbf{x}) is pp-rigid, |𝖠𝗎𝗍(𝒢,𝐱)|=𝗂𝗇𝗃((𝒢,𝐱),(𝒢,𝐱))0(modp)|\mathsf{Aut}(\mathcal{G},\mathbf{x})|=\mathsf{inj}((\mathcal{G},\mathbf{x}),(\mathcal{G},\mathbf{x}))\not\equiv 0\pmod{p}. Therefore 𝗂𝗇𝗃(𝒢,𝐱),(,𝐲))0(modp)\mathsf{inj}(\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{y}))\not\equiv 0\pmod{p}, meaning there is an injective homomorphism from (𝒢,𝐱)(\mathcal{G},\mathbf{x}) to (,𝐲)(\mathcal{H},\mathbf{y}). In a similar way, there is an injective homomorphism from (,𝐲)(\mathcal{H},\mathbf{y}) to (𝒢,𝐱)(\mathcal{G},\mathbf{x}). Thus, the two structures are isomorphic. ∎

Let \mathcal{H} be a relational structure. Elements a,bHa,b\in H are said to be isomorphic if there is φ𝖠𝗎𝗍(H)\varphi\in\mathsf{Aut}(H) such that φ(a)=b\varphi(a)=b. We say that a,bHa,b\in H are (𝒢,x)(\mathcal{G},x)-indistinguishable, for a relational structure 𝒢\mathcal{G} with a distinguished vertex xx, if 𝗁𝗈𝗆((𝒢,x),(,a))=𝗁𝗈𝗆((𝒢,x),(,b))\mathsf{hom}((\mathcal{G},x),(\mathcal{H},a))=\mathsf{hom}((\mathcal{G},x),(\mathcal{H},b)). Elements a,ba,b are indistiguishable if they are (𝒢,x)(\mathcal{G},x)-indistinguishable for any (𝒢,x)(\mathcal{G},x). We use aba\sim b if a,ba,b are indistinguishable.

The following is an easy implication of Lemma 3.4.

Lemma 3.5.

Let \mathcal{H} be a relational structure and a,bHa,b\in H. Then aba\sim b if and only if a,ba,b are isomorphic.

Proof.

By definition aba\sim b if and only if for all (𝒢,x)(\mathcal{G},x), 𝗁𝗈𝗆((𝒢,x),(,a))=𝗁𝗈𝗆((𝒢,x),(,b))\mathsf{hom}((\mathcal{G},x),(\mathcal{H},a))=\mathsf{hom}((\mathcal{G},x),(\mathcal{H},b)). Therefore, by Lemma 3.4, (,a)(,b)(\mathcal{H},a)\cong(\mathcal{H},b), which means there is an isomorphism φ:(,a)(,b)\varphi:(\mathcal{H},a)\rightarrow(\mathcal{H},b). Hence, φ𝖠𝗎𝗍()\varphi\in\mathsf{Aut}(\mathcal{H}) and such that φ(a)=b\varphi(a)=b. ∎

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 pp-rigid structures modular pp-definitions are more expressive, a feature we will extensively use.

We start with the pp-modular quantifier p\exists^{\oplus p}. Its syntax is the same as that of the regular existential quantifier, while the semantics is given a follows: Let R(x1,,xk,y)R(x_{1},\dots,x_{k},y) be a predicate on a set HH. Then pyR(x1,,xk,y)\exists^{\oplus p}y\;R(x_{1},\dots,x_{k},y) defines the predicate Q(x1,,xk)Q(x_{1},\dots,x_{k}) such that Q(a1,,ak)=1Q(a_{1},\dots,a_{k})=1, a1,,akHa_{1},\dots,a_{k}\in H, if and only if |{bHR(a1,,ak,b)=1}|0(modp)|\{b\in H\mid R(a_{1},\dots,a_{k},b)=1\}|\not\equiv 0\pmod{p}.

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 Γ\Gamma be a constraint language on a set HH. A pp-modular primitive positive formula in Γ\Gamma is a first-order formula py1,,ysΦ(x1,,xk,y1,,ys)\exists^{\oplus p}y_{1},\dots,y_{s}\;\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}), where Φ\Phi is a conjunction of atomic formulas of the form z1=Hz2z_{1}=_{H}z_{2} or R(z1,,z)R(z_{1},\dots,z_{\ell}) and RΓR\in\Gamma, z1,,z{x1,,xk,y1,,ys}z_{1},\dots,z_{\ell}\in\{x_{1},\dots,x_{k},y_{1},\dots,y_{s}\}. We say that Γ\Gamma pp-mpp-defines a predicate RR if there exists a pp-modular primitive-positive formula py1,,ysΦ(x1,,xk,y1,,ys)\exists^{\oplus p}y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}) such that R(x1,,xk)=py1,,ysΦ(x1,,xk,y1,,ys)R(x_{1},\dots,x_{k})=\exists^{\oplus p}y_{1},\dots,y_{s}\;\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}). A relational structure pp-mpp-defines RR if so does Γ\Gamma_{\mathcal{H}}. We also call the pp-mpp-definition R(x1,,xk)=py1,,ysΦ(x1,,xk,y1,,ys)R(x_{1},\dots,x_{k})=\exists^{\oplus p}y_{1},\dots,y_{s}\;\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}) strict if for any a1,,akHa_{1},\dots,a_{k}\in H such that R(a1,,ak)=1R(a_{1},\dots,a_{k})=1 the following condition holds #𝖾𝗑𝗍Φ(a1,,ak)1(modp)\mathsf{\#ext}_{\Phi}(a_{1},\dots,a_{k})\equiv 1\pmod{p}.

Mpp-definitions have a similar connection to homomorphisms, as pp-definitions, see Lemma 2.6.

Lemma 4.1.

A predicate R(x1,,xk)R(x_{1},\dots,x_{k}) is pp-mpp-definable (strictly pp-mpp-definable) in a relational structure \mathcal{H} if and only if there is a structure 𝒢\mathcal{G} similar to \mathcal{H} and x1,,xkGx_{1},\dots,x_{k}\in G such that R(a1,,ak)=1R(a_{1},\dots,a_{k})=1 for a1,,akHa_{1},\dots,a_{k}\in H exactly when 𝗁𝗈𝗆((𝒢,𝐱),(,𝐚))0(modp)\mathsf{hom}((\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{a}))\not\equiv 0\pmod{p} (when 𝗁𝗈𝗆((𝒢,𝐱),(,𝐚))1(modp)\mathsf{hom}((\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{a}))\equiv 1\pmod{p}).

It turns out that pp-mpp-definitions and strict pp-mpp-definitions are quite similar.

Lemma 4.2.

If RR is pp-mpp-definable in a relational structure \mathcal{H}, it is also strictly pp-mpp-definable in \mathcal{H}.

Proof.

As RR is pp-mpp-definable in \mathcal{H}, there exists (𝒢,x1,,xk)(\mathcal{G},x_{1},\dots,x_{k}) such that 𝗁𝗈𝗆((𝒢,𝐱),(,𝐚))0(modp)\mathsf{hom}((\mathcal{G},\mathbf{x}),(\mathcal{H},\mathbf{a}))\not\equiv 0\pmod{p} if and only if R(a1,,ak)=1R(a_{1},\dots,a_{k})=1. Then by Proposition 2.4 (𝒢,𝐱)(\mathcal{G}^{\prime},\mathbf{x}) given by

(𝒢,𝐱)=(𝒢,𝐱)(𝒢,𝐱)p1 times(\mathcal{G}^{\prime},\mathbf{x})=\underbrace{(\mathcal{G},\mathbf{x})\odot\dots\odot(\mathcal{G},\mathbf{x})}_{\text{$p-1$ times}}

is such that R(a1,,ak)=1R(a_{1},\dots,a_{k})=1 if and only if 𝗁𝗈𝗆((𝒢,𝐱),(,𝐚))1(modp)\mathsf{hom}((\mathcal{G}^{\prime},\mathbf{x}),(\mathcal{H},\mathbf{a}))\equiv 1\pmod{p}. ∎

Mpp-definitions give rise to reductions between modular counting CSPs.

Proposition 4.3.

Let Γ,Δ\Gamma,\Delta be constraint languages over a set HH, Δ\Delta finite, and every relation from Δ\Delta is pp-mpp-definable in Γ\Gamma. Then #p𝖢𝖲𝖯(Δ)\#_{p}\mathsf{CSP}(\Delta) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma).

Proof.

We show that for any RR pp-mpp-definable in Γ\Gamma, #p𝖢𝖲𝖯(Γ{R})\#_{p}\mathsf{CSP}(\Gamma\cup\{R\}) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma). We need to consider two cases.

First, suppose that RR is =H=_{H}. Take a #p𝖢𝖲𝖯(Γ{R})\#_{p}\mathsf{CSP}(\Gamma\cup\{R\}) instance 𝒫=(X,𝒞)\mathcal{P}=(X,\mathcal{C}), and for every constraint x=Hyx=_{H}y replace every occurrence of yy in 𝒫\mathcal{P} with xx. Clearly the resulting instance has the same number of solutions, and after eliminating all the equality constraints, it also does not use =H=_{H}.

Second, suppose that RR has a pp-mpp-definition in Γ\Gamma that uses only relations from Γ\Gamma. By Lemma 4.2 there exists a strict pp-mpp-definition of R(x1,,xk)=y1,,ysΦ(x1,,xk,y1,,ys)R(x_{1},\dots,x_{k})=\exists y_{1},\dots,y_{s}\Phi(x_{1},\dots,x_{k},y_{1},\dots,y_{s}) such that for any 𝐚R\mathbf{a}\in R, #𝖾𝗑𝗍Φ(𝐚)1(modp)\mathsf{\#ext}_{\Phi}(\mathbf{a})\equiv 1\pmod{p}. Let 𝒫=(X,𝒞)\mathcal{P}=(X,\mathcal{C}) be a #p𝖢𝖲𝖯(Γ{R})\#_{p}\mathsf{CSP}(\Gamma\cup\{R\}) instance. Without loss of generality assume that C1,,CmC_{1},\dots,C_{m} are the constraints containing RR. Construct a #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma) instance 𝒫=(X,𝒞)\mathcal{P}^{\prime}=(X^{\prime},\mathcal{C}^{\prime}) as follows:

  • For each i[m]i\in[m] introduce new variables yi1,,yisy_{i1},\dots,y_{is} and set X=Xi[m]{yi1,,yis}X^{\prime}=X\cup\bigcup_{i\in[m]}\{y_{i1},\dots,y_{is}\}.

  • The set 𝒞\mathcal{C}^{\prime} contains every constraint from 𝒞{C1,,Cm}\mathcal{C}-\{C_{1},\dots,C_{m}\}. Also, we replace each Ci=(xi1,,xik),RC_{i}=\langle(x_{i1},\dots,x_{ik}),R\rangle with the definition Φ(xi1,,xik,yi1,,yis)\Phi(x_{i1},\dots,x_{ik},y_{i1},\dots,y_{is}) of RR.

Next, we find the number of solutions of 𝒫\mathcal{P}^{\prime}. As is easily seen, for every solution φ\varphi of 𝒫\mathcal{P} there are

i[m]#𝖾𝗑𝗍Φ(φ(xi1),,φ(xik))1(modp)\prod_{i\in[m]}\mathsf{\#ext}_{\Phi}(\varphi(x_{i_{1}}),\dots,\varphi(x_{ik}))\equiv 1\pmod{p}

solutions of 𝒫\mathcal{P}^{\prime}. Therefore if N,NN,N^{\prime} denote the number of solutions of 𝒫,𝒫\mathcal{P},\mathcal{P}^{\prime}, respectively, we have NN(modp)N\equiv N^{\prime}\pmod{p}. ∎

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 Γ,Δ\Gamma,\Delta be constraint languages on a finite set HH such that Δ\Delta is finite, and Γ\Gamma is pp-rigid. If Δ\Delta is pp-definable in Γ\Gamma, Then #p𝖢𝖲𝖯(Δ)\#_{p}\mathsf{CSP}(\Delta) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma).

Proof.

We show that for any RR pp-definable in Γ\Gamma, #p𝖢𝖲𝖯(Γ{R})\#_{p}\mathsf{CSP}(\Gamma\cup\{R\}) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma). The proof repeats the proof of Proposition 4.3 verbatim, except we use Proposition 3.3 in place of Lemma 4.2. ∎

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 \mathcal{H} be a relational structure. A set UHU\subseteq H is said to be a pp-subalgebra of \mathcal{H} if UU is strictly pp-mpp-definable in \mathcal{H}. Set UU is a pp-subalgebra of a constraint language Γ\Gamma if it is a pp-subalgebra of Γ\mathcal{H}_{\Gamma}.

4.2 Adding constants

Recall that for a constraint language Γ\Gamma by Γ\Gamma^{*} we denote the language Γ{Ca|aH}\Gamma\cup\{C_{a}|a\in H\}. 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 Γ\Gamma be a pp-rigid constraint language on a set HH. Then, the problem #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma^{*}) is polynomial time reducible to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma).

Proof.

We follow the same line of argument as the proof of a similar result in [BD07] for exact counting. Let H={a1,,an}H=\{a_{1},...,a_{n}\}. It is known, see e.g. [JCG99], that the nn-ary relation Q={(φ(a1),,φ(an))| φ is a homomorphism of Γ into itself}Q=\{(\varphi(a_{1}),\dots,\varphi(a_{n}))|\text{ $\varphi$ is a homomorphism of $\mathcal{H}_{\Gamma}$ into itself}\} is pp-definable in Γ\Gamma.

Let 𝒫=(V;𝒞)\mathcal{P}=(V;\mathcal{C}) be an instance of #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma^{*}). We construct an instance 𝒫=(X,𝒞)\mathcal{P}^{\prime}=(X^{\prime},\mathcal{C}^{\prime}) of #p𝖢𝖲𝖯(Γ{Q,=H})\#_{p}\mathsf{CSP}(\Gamma\cup\{Q,=_{H}\}) as follows.

  • V=V{va|aH}V^{\prime}=V\cup\{v_{a}|a\in H\};

  • 𝒞\mathcal{C}^{\prime} consists of three parts: {C=𝐱,R𝒞RΓ}\{C=\langle\mathbf{x},R\rangle\in\mathcal{C}\mid R\in\Gamma\}, {(a1,,an),Q}\{\langle(a_{1},\dots,a_{n}),Q\rangle\}, and {(x,ya),=H(x),Ca𝒞}\{\langle(x,y_{a}),=_{H}\rangle\mid\langle(x),C_{a}\rangle\in\mathcal{C}\}.

The number of solutions of 𝒫\mathcal{P} equals the number of solutions φ\varphi to 𝒫\mathcal{P}^{\prime} such that φ(va)=a\varphi(v_{a})=a for all aHa\in H. Let UU be the set of all such solutions of 𝒫\mathcal{P}^{\prime} and T=|U|T=|U|. Then TT can be computed in two stages.

Let again 𝖯𝖺𝗋𝗍(H)\mathsf{Part}(H) be the poset of partitions of HH. For every partition θ𝖯𝖺𝗋𝗍(H)\theta\in\mathsf{Part}(H) we define 𝒫θ\mathcal{P}^{\prime}_{\theta} as the instance (V,𝒞θ)(V^{\prime},\mathcal{C}_{\theta}), where 𝒞′′=𝒞{(va,va),=H}a,a\mathcal{C}^{\prime\prime}=\mathcal{C}^{\prime}\cup\{\langle(v_{a},v_{a^{\prime}}),=_{H}\rangle\}\mid a,a^{\prime} belong to the same class of θ}\theta\}). Note that if φ\varphi is a solution of 𝒫\mathcal{P}^{\prime}, then φ\varphi is a solution of 𝒫θ\mathcal{P}^{\prime}_{\theta} if and only if φ(va)=φ(va)\varphi(v_{a})=\varphi(v_{a^{\prime}}) for every a,aa,a^{\prime} from the same class of θ\theta. Let us denote M(θ)M(\theta) the number of solutions of 𝒫θ\mathcal{P}^{\prime}_{\theta}. By Theorem 4.4 the number M(θ)M(\theta) can be computed using the oracle #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma), since {=H,Q}\{=_{H},Q\} are pp-definable in Γ\Gamma.

Next we find the number solutions φ\varphi of 𝒫\mathcal{P}^{\prime} that assign vav_{a}, aAa\in A, pairwise different values. Let WW be the set of all such solutions. Let us denote by N(θ)N(\theta) the number of all solutions φ\varphi of 𝒫θ\mathcal{P}^{\prime}_{\theta} such that φ(va)=φ(vb)\varphi(v_{a})=\varphi(v_{b}) if and only if a,ba,b belong to the same class of θ\theta. In particular, N(0¯)=|W|N({\underline{0}})=|W|. The number N(θ)N(\theta) can be obtained using Möbius inversion formula for poset 𝖯𝖺𝗋𝗍(H)\mathsf{Part}(H). Let w:𝖯𝖺𝗋𝗍(𝖧)w:\mathsf{Part(H)}\rightarrow\mathbb{Z} be defined as in Section 3.1. Also, observe that for any θ𝖯𝖺𝗋𝗍(H)\theta\in\mathsf{Part}(H)

M(θ)=ηθN(η).M(\theta)=\sum_{\eta\geq\theta}N(\eta).

Therefore,

N(0¯)=θ𝖯𝖺𝗋𝗍(A)w(θ)M(θ).N({\underline{0}})=\sum_{\theta\in\mathsf{Part}(A)}w(\theta)M(\theta).

Thus N(0¯)N({\underline{0}}) can be found through a constant number of calls to #p𝖢𝖲𝖯(Γ)\#_{p}\mathsf{CSP}(\Gamma).

Now, we express TT via N(0¯)N({\underline{0}}). Let G=𝖠𝗎𝗍(Γ)G=\mathsf{Aut}(\Gamma) be the automorphism group of Γ\mathcal{H}_{\Gamma}. We show that W={gφ|gG,φU}W=\{g\circ\varphi|g\in G,\varphi\in U\}. For every solution φ\varphi in UU and every gGg\in G, gφg\circ\varphi is also a solution of 𝒫\mathcal{P}^{\prime}. Moreover, since gg is one-to-one, gφg\circ\varphi is in WW. Conversely, for every ψW\psi\in W, there exists some gGg\in G such that g(a)=ψ(va)g(a)=\psi(v_{a}), aHa\in H. Note that g1Gg^{-1}\in G implies φ=g1ψU\varphi=g^{-1}\circ\psi\in U, which witnesses that ψ=gφ\psi=g\circ\varphi is of the required form. Finally, for every φ,φU\varphi,\varphi^{\prime}\in U and every g,gGg,g^{\prime}\in G, if φφ\varphi\neq\varphi^{\prime} or ggg\neq g^{\prime} then gφgφg\circ\varphi\neq g^{\prime}\circ\varphi^{\prime}. Thus, N(0¯)=|G|TN({\underline{0}})=|G|\cdot T. Since Γ\Gamma is pp-rigid, |G|0(modp)|G|\not\equiv 0\pmod{p}. Therefore T|G|1N(0¯)(modp)T\equiv|G|^{-1}\cdot N({\underline{0}})\pmod{p}. ∎

Remark 4.6.

For any relational structure \mathcal{H} the structure \mathcal{H}^{*} does not have any nontrivial homomorphisms, in particular, it is pp-rigid. However, it does not mean that powers of \mathcal{H}^{*} have no nontrivial automorphisms. The reason is that formally speaking if \mathcal{H} is a σ\sigma-structure then \mathcal{H}^{*} has the signature σ{CaaH}\sigma\cup\{C_{a}\mid a\in H\}. Therefore, so does, say ()2(\mathcal{H}^{*})^{2}. For the latter structure (b,c)Ca()2(b,c)\in C_{a}^{(\mathcal{H}^{*})^{2}} if and only if b,cCab,c\in C_{a}^{\mathcal{H}^{*}}, that is, if and only if b=c=ab=c=a. This means that the involution (a,b)(b,a)(a,b)\mapsto(b,a) is an automorphism of ()2(\mathcal{H}^{*})^{2}.

5 Automorphisms of direct powers of bipartite graphs

The goal of this section is to study the structure of automorphisms of HH^{\ell}, a direct power of a simple graph HH.

If HH 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 HH 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 GG and HH by G+HG+H. It will also be convenient to use the standard graph theory notation, and denote graphs in regular font and use V(H),E(H)V(H),E(H) for the sets of vertices and edges. The neighborhood of a vertex vV(G)v\in V(G) or a set AV(G)A\subseteq V(G) in GG is denoted NG(v),NG(A)N_{G}(v),N_{G}(A). However, we will use a,b\left\langle a,b\right\rangle 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 A,BA,B is the graph ABA\;\small\Box\;B with vertices V(A)×V(B)V(A)\times V(B) and edges E(AB)={(a,b),(a,b)|a,aE(A) and b=b, or a=a and b,bE(B)}E(A\;\small\Box\;B)=\{\left\langle(a,b),(a^{\prime},b^{\prime})\right\rangle|\left\langle a,a^{\prime}\right\rangle\in E(A)\text{ and }b=b^{\prime},\text{ or }a=a^{\prime}\text{ and }\left\langle b,b^{\prime}\right\rangle\in E(B)\}.

A graph GG is called prime with respect to Cartesian product if whenever G=G1G2G=G_{1}\;\small\Box\;G_{2}, one of G1,G2G_{1},G_{2} contains only one vertex.

Theorem 5.1 (Theorem 6.8, [HIK11]).

Let G,HG,H be isomorphic connected graphs G=G1GkG=G_{1}\;\small\Box\;\dots\;\small\Box\;G_{k} and H=H1HlH=H_{1}\;\small\Box\;\dots\;\small\Box\;H_{l}, where each factor GiG_{i} and HiH_{i} is prime with respect to Cartesian product. Then k=lk=l, and for any isomorphism φ:GH\varphi:G\rightarrow H, there is a permutation π\pi of [k][k] and isomorphisms φi:Gπ(i)Hi\varphi_{i}:G_{\pi(i)}\rightarrow H_{i} for which

φ(x1,,xk)=(φ1(xπ(1)),,,φk(xπ(k))).\varphi(x_{1},\dots,x_{k})=(\varphi_{1}(x_{\pi(1)}),,\dots,\varphi_{k}(x_{\pi(k)})).

The direct product of two graphs A,BA,B is defined in the regular way, as the graph A×BA\times B with vertices V(A)×V(B)V(A)\times V(B) and edges E(A×B)={(a,b),(a,b)|a,aE(A) and b,bE(B)}E(A\times B)=\{\left\langle(a,b),(a^{\prime},b^{\prime})\right\rangle|\left\langle a,a^{\prime}\right\rangle\in E(A)\text{ and }\left\langle b,b^{\prime}\right\rangle\in E(B)\}.

The diamond product is defined with bipartite graphs in mind. For a bipartite graph G=(LR,E)G=(L\cup R,E), we denote the two parts of the bipartition by LG=LL_{G}=L and RG=RR_{G}=R.

The diamond product of two simple bipartite graphs G=(LGRG,E(G))G=(L_{G}\cup R_{G},E(G)) and H=(LHRH,E(H))H=(L_{H}\cup R_{H},E(H)) is the graph GHG\vec{\diamond}H with vertices (LG×LH)(RG×RH)(L_{G}\times L_{H})\cup(R_{G}\times R_{H}) and edges E(GH)={(a,b),(a,b)|a,aE(G) and b,bE(H)}E(G\vec{\diamond}H)=\{\left\langle(a,b),(a^{\prime},b^{\prime})\right\rangle|\left\langle a,a^{\prime}\right\rangle\in E(G)\text{ and }\left\langle b,b^{\prime}\right\rangle\in E(H)\}.

The diamond product of a simple non-bipartite graphs G=(V(G),E(G))G=(V(G),E(G)) and a bipartie graph H=(LHRH,E(H))H=(L_{H}\cup R_{H},E(H)) is the graph H¯HH\bar{\diamond}H with vertices (V(G)×LH)(V(G)×RH)(V(G)\times L_{H})\cup(V(G)\times R_{H}) and edges E(G¯H)={(a,b),(a,b)|a,aE(G) and b,bE(H)}E(G\bar{\diamond}H)=\{\left\langle(a,b),(a^{\prime},b^{\prime})\right\rangle|\left\langle a,a^{\prime}\right\rangle\in E(G)\text{ and }\left\langle b,b^{\prime}\right\rangle\in E(H)\}.

Definition 5.2.

The diamond product of two simple graphs G,HG,H is defined as follows:

GH={GHif G,H are bipartiteG¯Hif G is bipartite and H is non-bipartiteG¯Hif H is bipartite and G is non-bipartiteG×Hif G,H are non-bipartiteG\diamond H=\left\{\begin{array}[]{cl}G\;\vec{\diamond}\;H&\mbox{if }G,H\mbox{ are bipartite}\\ G\;\bar{\diamond}\;H&\mbox{if }G\mbox{ is bipartite and }H\mbox{ is non-bipartite}\\ G\;\bar{\diamond}\;H&\mbox{if }H\mbox{ is bipartite and }G\mbox{ is non-bipartite}\\ G\times H&\mbox{if }G,H\mbox{ are non-bipartite}\end{array}\right.
Remark 5.3.

The diamond product for simple graphs GG and HH is commutative and associative up to an isomorphism, meaning GHHGG\diamond H\cong H\diamond G, and (GH)KG(HK)(G\diamond H)\diamond K\cong G\diamond(H\diamond K)

The following statement is straightforward.

Proposition 5.4.

Let G,H,KG,H,K be simple graphs with rr distinguished vertices 𝐱,𝐲,𝐳\mathbf{x},\mathbf{y},\mathbf{z} respectively. Then

𝗁𝗈𝗆((K,GH)\displaystyle\mathsf{hom}((K,G\diamond H) =𝗁𝗈𝗆(K,G)𝗁𝗈𝗆(K,H),\displaystyle=\mathsf{hom}(K,G)\cdot\mathsf{hom}(K,H),
𝗁𝗈𝗆((K,𝐳),((G,𝐱)(H,𝐲))\displaystyle\mathsf{hom}((K,\mathbf{z}),((G,\mathbf{x})\diamond(H,\mathbf{y})) =𝗁𝗈𝗆((K,𝐳),(G,𝐱))𝗁𝗈𝗆((K,𝐳),(H,𝐲)).\displaystyle=\mathsf{hom}((K,\mathbf{z}),(G,\mathbf{x}))\cdot\mathsf{hom}((K,\mathbf{z}),(H,\mathbf{y})).

We denote the kk diamond power of HH by HkH^{\diamond k}.

5.2 Automorphisms of products of R-thin graphs

Relation RGR_{G} on V(G)V(G) for a graph GG is defined as follows. Vertices xx and xx^{\prime} are in RGR_{G}, written xRxxRx^{\prime}, if and only if NG(x)=NG(x)N_{G}(x)=N_{G}(x^{\prime}). Clearly, RGR_{G} is an equivalence relation. Normally we will omit the subscript GG.

We denote the quotient of GG modulo RR by G/RG/_{R}. Given xV(G)x\in V(G), let [x]={xV(G)|NG(x)=NG(x)}[x]=\{x\in V(G)|N_{G}(x^{\prime})=N_{G}(x)\} denote the RR-class containing xx. Then V(G/R)={[x]xV(G)}V(G/_{R})=\{[x]\mid x\in V(G)\} and E(G/R)={[x],[y]x,yE(G)}E(G/_{R})=\{\left\langle[x],[y]\right\rangle\mid\left\langle x,y\right\rangle\in E(G)\}. Since RGR_{G} is defined entirely in terms of E(G)E(G), it is easy to see that for an isomorphism φ:GH\varphi:G\rightarrow H, we have xRGyxR_{G}y if and only if φ(x)RHφ(y)\varphi(x)R_{H}\varphi(y). Thus, φ\varphi maps equivalence classes of RGR_{G} to equivalence classes of RHR_{H}, and can be defined to act on V(G/R)V(G/_{R}) by φ([x])=[φ(x)]\varphi([x])=[\varphi(x)].

We need the following lemmas from [HIK11].

Lemma 5.5 (Proposition 8.4, [HIK11]).

Suppose G,HG,H are simple graphs. Then GHG\cong H if and only if G/RH/RG/_{R}\cong H/_{R} and there is an isomorphism ψ:G/RH/R\psi:G/_{R}\rightarrow H/_{R} with |[x]|=|ψ([x])||[x]|=|\psi([x])| for each [x]V(G/R)[x]\in V(G/_{R}). In fact, given an isomorphism φ:G/RH/R\varphi:G/_{R}\rightarrow H/_{R}, any map φ:V(G)V(H)\varphi:V(G)\rightarrow V(H) that restricts to a bijection φ:[x]ψ([x])\varphi:[x]\rightarrow\psi([x]) for every [x]G/R[x]\in G/_{R} is an isomorphism from GG to HH.

Lemma 5.6 (Proposition 8.5, [HIK11]).

If graphs GG and HH are simple graphs and have no isolated vertices, then V((G×H)/R)={X×Y|XV(G/R),YV(H/R)}V((G\times H)/_{R})=\{X\times Y|X\in V(G/_{R}),Y\in V(H/_{R})\}. In particular, [(x,y)]=[x]×[y][(x,y)]=[x]\times[y]. Furthermore, (G×H)/RG/R×H/R(G\times H)/_{R}\cong G/_{R}\times H/_{R}, and ψ:(G×H)/RG/R×H/R\psi:(G\times H)/_{R}\rightarrow G/_{R}\times H/_{R} with ψ([x,y])=([x],[y])\psi([x,y])=([x],[y]) is an isomorphism.

We prove similar statements for diamond product.

Remark 5.7.

If G=HKG=H\diamond K, then NG((h,k))=NH(h)×NK(k)N_{G}((h,k))=N_{H}(h)\times N_{K}(k) for any (h,k)V(HK)(h,k)\in V(H\diamond K). Recall however that if GG and HH are bipartite, then for any (h,k)V(HK)(h,k)\in V(H\diamond K) either hLG,kLKh\in L_{G},k\in L_{K} or hRG,kRKh\in R_{G},k\in R_{K}.

Lemma 5.8.

If graphs G and H are simple graphs and have no isolated vertices, then (GH)/RG/RH/R(G\diamond H)/_{R}\cong G/_{R}\diamond H/_{R}, and ψ:(GH)/RG/RH/R\psi:(G\diamond H)/_{R}\rightarrow G/_{R}\diamond H/_{R} with ψ([x,y])=([x],[y])\psi([x,y])=([x],[y]) is an isomorphism. Also [(x,y)]=[x]×[y][(x,y)]=[x]\times[y].

The proof of Lemma 5.8 is similar to that of Proposition 8.5 of [HIK11] and is moved to Section 7.

A graph GG is said to be RR-thin if RR 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 GG is the graph GsG^{s} with V(Gs)=V(G)V(G^{s})=V(G) and E(Gs)={x,y|NG(x)NG(y)}E(G^{s})=\{\left\langle x,y\right\rangle|N_{G}(x)\cap N_{G}(y)\not=\emptyset\}.

Lemma 5.9.

If G1,,GkG_{1},\dots,G_{k} are graphs, then (G1Gk)s=G1sGks(G_{1}\diamond\dots\diamond G_{k})^{s}=G^{s}_{1}\diamond\dots\diamond G^{s}_{k}.

Proof.

Observe that (x1,,xk),(y1,,yk)E((G1Gk)s)\left\langle(x_{1},\dots,x_{k}),(y_{1},\dots,y_{k})\right\rangle\in E((G_{1}\diamond\dots\diamond G_{k})^{s}) if and only if there is a walk of length 2 joining (x1,,xk)(x_{1},\dots,x_{k}) and (y1,,yk)(y_{1},\dots,y_{k}). By definition of \diamond such a walk exists if and only if each GiG_{i} has a walk of length 2 between xix_{i} and yiy_{i}. The latter is equivalent to xi,yiE((Gi)s)\left\langle x_{i},y_{i}\right\rangle\in E((G_{i})^{s}) for each i[k]i\in[k], which happens if and only if (x1,,xk),(y1,,yk)\left\langle(x_{1},\dots,x_{k}),(y_{1},\dots,y_{k})\right\rangle is an edge of G1sGksG^{s}_{1}\diamond\dots\diamond G^{s}_{k}. ∎

We now explain how to construct the Cartesian skeleton S(G)S(G) of a graph GG by removing specific edges from GsG^{s}.

Given a factorization G=HKG=H\diamond K, we say that an edge (h,k),(h,k)\left\langle(h,k),(h^{\prime},k^{\prime})\right\rangle of the Boolean square GsG^{s} is Cartesian relative to the factorization if either h=hh=h^{\prime} and kkk\not=k^{\prime}, or hhh\not=h^{\prime} and k=kk=k^{\prime}. An edge x,y\left\langle x,y\right\rangle of the Boolean square GsG^{s} is dispensable if it is a loop, or if there exists some zV(G)z\in V(G) for which both of the following statements hold:

  1. 1.

    NG(x)NG(y)NG(x)NG(z)N_{G}(x)\cap NG(y)\subset N_{G}(x)\cap NG(z) or NG(x)NG(z)NG(y)N_{G}(x)\subset N_{G}(z)\subset N_{G}(y),

  2. 2.

    NG(y)NG(x)NG(y)NG(z)N_{G}(y)\cap NG(x)\subset N_{G}(y)\cap NG(z) or NG(y)NG(z)NG(x)N_{G}(y)\subset N_{G}(z)\subset N_{G}(x).

Definition 5.10.

The Cartesian skeleton S(G)S(G) of a graph GG is the spanning subgraph of the Boolean square GsG^{s} obtained by removing all dispensable edges from GsG^{s}.

The following statements are from [HIK11].

Lemma 5.11 (Proposition 8.11, [HIK11]).

Any isomorphism φ:GH\varphi:G\rightarrow H, as a map φ:V(G)V(H)\varphi:V(G)\rightarrow V(H), is also an isomorphism φ:S(G)S(H)\varphi:S(G)\rightarrow S(H).

Lemma 5.12 (Proposition 8.13, [HIK11]).

Suppose a graph G is connected.

  1. 1.

    If GG has an odd cycle, then S(G)S(G) is connected.

  2. 2.

    If GG is bipartite, then S(G)S(G) has two connected components whose respective vertex sets are the two parts of the bipartition of GG.

If GG is bipartite, we denote the connected component of the S(G)S(G) corresponding to the left part of GG by SL(G)S_{L}(G) and the one corresponding to the right part of GG by SR(G)S_{R}(G). Note that if G=HKG=H\diamond K, by Remark 5.7 NG((h,k))=NH(h)×NK(k)N_{G}((h,k))=N_{H}(h)\times N_{K}(k). This implies the following:

Lemma 5.13 ([HIK11]).

If GG is an R-thin graph with an arbitrary factorization G=HKG=H\diamond K, then every edge of S(G)S(G) 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 A,BA,B are RR-thin graphs without isolated vertices, then

S(AB)={SL(A)SL(B)+SR(A)SR(B)if A,B are bipartiteSL(A)S(B)+SR(A)S(B)if A is bipartite and B is non-bipartiteS(A)SL(B)+S(A)SR(B)if B is bipartite and A is non-bipartiteS(A)S(B)if G,H are non-bipartiteS(A\diamond B)=\left\{\begin{array}[]{cl}S_{L}(A)\;\small\Box\;S_{L}(B)+S_{R}(A)\;\small\Box\;S_{R}(B)&\mbox{if }A,B\mbox{ are bipartite}\\ S_{L}(A)\;\small\Box\;S(B)+S_{R}(A)\;\small\Box\;S(B)&\mbox{if }A\mbox{ is bipartite and }B\mbox{ is non-bipartite}\\ S(A)\;\small\Box\;S_{L}(B)+S(A)\;\small\Box\;S_{R}(B)&\mbox{if }B\mbox{ is bipartite and }A\mbox{ is non-bipartite}\\ S(A)\;\small\Box\;S(B)&\mbox{if }G,H\mbox{ are non-bipartite}\end{array}\right.

The proof of Proposition 5.14 is similar to that of Proposition 8.10 of [HIK11] and is moved to Section 7.

5.2.2 Diamond product factorization

A graph GG is said to be prime if for any GHKG\cong H\diamond K one of H,KH,K is an edge. The following lemma is the core technical statement of this section.

Lemma 5.15.

Consider any isomorphism φ:G1GkH1H\varphi:G_{1}\diamond\dots\diamond G_{k}\rightarrow H_{1}\diamond\dots\diamond H_{\ell}, where φ(x1,,xk)=(φ1(x1,,xk),,φ(x1,,xk))\varphi(x_{1},\dots,x_{k})=(\varphi_{1}(x_{1},\dots,x_{k}),\dots,\varphi_{\ell}(x_{1},\dots,x_{k})) (recall that φ\varphi preserves the left and right parts of the graphs) and all the factors are connected and R-thin. If a factor GiG_{i} is prime, then exactly one of the functions φ1,φ2,,φ\varphi_{1},\varphi_{2},...,\varphi_{\ell} depends on xix_{i}.

Proof.

By grouping and permuting the factors we may assume that k==2k=\ell=2 and G1G_{1} is prime. If none of G1G_{1} and G2G_{2} is bipartite, then Lemma 5.15 is Lemma 8.14 of [HIK11]. We will consider the case when one or both of G1G_{1} or G2G_{2} are bipartite. We prove this by showing that if it is not the case that exactly one of φ1\varphi_{1} and φ2\varphi_{2} depends on x1x_{1}, then G1G_{1} is not prime. Now, if G1G_{1} or G2G_{2} is bipartite, the graph G1G2G_{1}\diamond G_{2} is bipartite, hence the graph H1H2H_{1}\diamond H_{2} is bipartite. We denote the connected components of S(G1G2)S(G_{1}\diamond G_{2}) by SLS_{L} and SRS_{R}, and the connected components of S(H1H2)S(H_{1}\diamond H_{2}) by CLC_{L} and CRC_{R} which correspond to the left and right parts of the bipartition.

By Lemma 5.11 φ\varphi is also an isomorphism for Cartesian skeletons:

φ:SL+SRCL+CR,\varphi:S_{L}+S_{R}\rightarrow C_{L}+C_{R}, (5)

which gives us isomorphisms on each connected component:

φL:SLCL,φR:SRCR\varphi_{L}:S_{L}\rightarrow C_{L},\;\;\varphi_{R}:S_{R}\rightarrow C_{R}

Note that although G1G_{1} is prime, S(G1)S(G_{1}) as well as SL,SRS_{L},S_{R} are not necessarily prime. Take prime factorizations of each component, when both GG and HH are bipartite:

SL(G)=A1At\displaystyle S_{L}(G)=A_{1}\;\small\Box\;\dots\;\small\Box\;A_{t}\; ,SR(G)=B1Bs,\displaystyle,\;\;S_{R}(G)=B_{1}\;\small\Box\;\dots\;\small\Box\;B_{s},
SL(H)=D1Dw\displaystyle S_{L}(H)=D_{1}\;\small\Box\;\dots\;\small\Box\;D_{w}\; ,SR(H)=E1Er,\displaystyle,\;\;S_{R}(H)=E_{1}\;\small\Box\;\dots\;\small\Box\;E_{r},
CL=C1Cm\displaystyle C_{L}=C_{1}\;\small\Box\;\dots\;\small\Box\;C_{m}\; ,CR=C1Cn,\displaystyle,\;\;C_{R}=C^{\prime}_{1}\;\small\Box\;\dots\;\small\Box\;C^{\prime}_{n},

Note that, if both G1G_{1} and G2G_{2} are bipartite, then the AiA_{i}’s and BiB_{i}’s, as well as the DiD_{i}’s and EiE_{i}’s can be nonisomorphic. If G1G_{1} is non-bipartite, then t=st=s and for i[t]i\in[t], AiBiA_{i}\cong B_{i}. Similarly, if G2G_{2} is non-bipartite, then w=rw=r and for i[w]i\in[w], DiEiD_{i}\cong E_{i}.

As φ\varphi is an isomorphism, we have

φL:(A1At)(D1Dw)\displaystyle\varphi_{L}:(A_{1}\;\small\Box\;\dots\;\small\Box\;A_{t})\;\small\Box\;(D_{1}\;\small\Box\;\dots\;\small\Box\;D_{w}) (C1Cm)\displaystyle\rightarrow(C_{1}\;\small\Box\;\dots\;\small\Box\;C_{m})
φR:(B1Bs)(E1Er)\displaystyle\varphi_{R}:(B_{1}\;\small\Box\;\dots\;\small\Box\;B_{s})\;\small\Box\;(E_{1}\;\small\Box\;\dots\;\small\Box\;E_{r}) (C1Cn)\displaystyle\rightarrow(C^{\prime}_{1}\;\small\Box\;\dots\;\small\Box\;C^{\prime}_{n})

We relabel the vertices of G1G_{1} with V((A1At)+(B1Bs))V((A_{1}\;\small\Box\;\dots\;\small\Box\;A_{t})+(B_{1}\;\small\Box\;\dots\;\small\Box\;B_{s})), and those of G2G_{2} with V(D1Dw+E1Er)V(D_{1}\;\small\Box\;\dots\;\small\Box\;D_{w}+E_{1}\;\small\Box\;\dots\;\small\Box\;E_{r}). We relabel vertices of H1H2H_{1}\diamond H_{2} with V(C1Cm+C1Cn)V(C_{1}\;\small\Box\;\dots\;\small\Box\;C_{m}+C^{\prime}_{1}\;\small\Box\;\dots\;\small\Box\;C^{\prime}_{n}). By Proposition 5.14 the isomorphism φ\varphi can be represented as follows:

φL:(A1At)(D1Dw)\displaystyle\varphi_{L}:(A_{1}\;\small\Box\;\dots\;\small\Box\;A_{t})\;\small\Box\;(D_{1}\;\small\Box\;\dots\;\small\Box\;D_{w}) \displaystyle\rightarrow
(A1AtD1Dw)\displaystyle(A_{1}\;\small\Box\;\dots\;\small\Box\;A_{t^{\prime}}\;\small\Box\;D_{1}\;\small\Box\;\dots\;\small\Box\;D_{w^{\prime}}) (At+1AtDw+1Dw)\displaystyle\;\small\Box\;(A_{t^{\prime}+1}\;\small\Box\;\dots\;\small\Box\;A_{t}\;\small\Box\;D_{w^{\prime}+1}\;\small\Box\;\dots\;\small\Box\;D_{w})
φR:(B1Bs)(E1Er)\displaystyle\varphi_{R}:(B_{1}\;\small\Box\;\dots\;\small\Box\;B_{s})\;\small\Box\;(E_{1}\;\small\Box\;\dots\;\small\Box\;E_{r}) \displaystyle\rightarrow
(B1BsE1Er)\displaystyle(B_{1}\;\small\Box\;\dots\;\small\Box\;B_{s^{\prime}}\;\small\Box\;E_{1}\;\small\Box\;\dots\;\small\Box\;E_{r^{\prime}}) (Bs+1BsEr+1Er)\displaystyle\;\small\Box\;(B_{s^{\prime}+1}\;\small\Box\;\dots\;\small\Box\;B_{s}\;\small\Box\;E_{r^{\prime}+1}\;\small\Box\;\dots\;\small\Box\;E_{r})

To simplify the notation we will denote a left vertex (a1,,at,at+1,,at)(a_{1},\dots,a_{t^{\prime}},a_{t^{\prime}+1},\dots,a_{t}) of G1G_{1} by (xL,yL)(x_{L},y_{L}), where xL=(a1,,at)x_{L}=(a_{1},\dots,a_{t^{\prime}}) and yL=(at+1,,at)y_{L}=(a_{t^{\prime}+1},\dots,a_{t}), and right vertex (b1,,bs,bs+1,,bs)(b_{1},\dots,b_{s^{\prime}},b_{s^{\prime}+1},\dots,b_{s}) of G1G_{1} by (xR,yR)(x_{R},y_{R}), where xR=(b1,,,bs)x_{R}=(b_{1},,\dots,b_{s^{\prime}}) and yR=(bs+1,,bs)y_{R}=(b_{s^{\prime}+1},\dots,b_{s}). Similarly, we denote a left vertex (d1,,dw,dw+1,,dw)(d_{1},\dots,d_{w^{\prime}},d_{w^{\prime}+1},\dots,d_{w}) of G2G_{2} by (uL,vL)(u_{L},v_{L}), where uL=(d1,,dw)u_{L}=(d_{1},\dots,d_{w^{\prime}}) and vL=(dw+1,,dw)v_{L}=(d_{w^{\prime}+1},\dots,d_{w}), and a right vertex (e1,,er,er+1,,er)(e_{1},\dots,e_{r^{\prime}},e_{r^{\prime}+1},\dots,e_{r}) of G2G_{2} by (uR,vR)(u_{R},v_{R}), where uR=(e1,,er)u_{R}=(e_{1},\dots,e_{r^{\prime}}) and vR=(er+1,,er)v_{R}=(e_{r^{\prime}+1},\dots,e_{r}). By Theorem 5.1, isomorphism φ\varphi is represented as follows

φL((xL,yL),(uL,vL))=((xL,uL),(yL,vL)),φR((xR,yR),(uR,vR))=((xR,uR),(yR,vR))\varphi_{L}((x_{L},y_{L}),(u_{L},v_{L}))=((x_{L},u_{L}),(y_{L},v_{L})),\;\varphi_{R}((x_{R},y_{R}),(u_{R},v_{R}))=((x_{R},u_{R}),(y_{R},v_{R}))

Since this holds for both left and right parts G1G2G_{1}\diamond G_{2}, we can represent the isomorphism like φ((x,y),(u,v))=((x,u),(y,v))\varphi((x,y),(u,v))=((x,u),(y,v)).

Now we find a nontrivial factorization G1SSG_{1}\cong S\diamond S^{\prime}. Define SS and SS^{\prime} as follows:

V(S)\displaystyle V(S) ={xL|((xL,yL),(uL,vL))V(G1G2)}{xR|((xR,yR),(uR,vR))V(G1G2)}\displaystyle=\left\{x_{L}|\;\Big{(}(x_{L},y_{L}),(u_{L},v_{L})\Big{)}\in V(G_{1}\diamond G_{2})\right\}\cup\left\{x_{R}|\;\Big{(}(x_{R},y_{R}),(u_{R},v_{R})\Big{)}\in V(G_{1}\diamond G_{2})\right\}
E(S)\displaystyle E(S) ={xL,xR|((xL,yL),(uL,vL)),((xR,yR),(uR,vR))E(G1G2)}\displaystyle=\left\{\left\langle x_{L},x_{R}\right\rangle|\;\left\langle\Big{(}(x_{L},y_{L}),(u_{L},v_{L})\Big{)},\Big{(}(x_{R},y_{R}),(u_{R},v_{R})\Big{)}\right\rangle\in E(G_{1}\diamond G_{2})\right\}
and
V(S)\displaystyle V(S^{\prime}) ={yL|((xL,yL),(uL,vL))V(G1G2)}{yR|((xR,yR),(uR,vR))V(G1G2)}\displaystyle=\left\{y_{L}|\;\Big{(}(x_{L},y_{L}),(u_{L},v_{L})\Big{)}\in V(G_{1}\diamond G_{2})\right\}\cup\left\{y_{R}|\;\Big{(}(x_{R},y_{R}),(u_{R},v_{R})\Big{)}\in V(G_{1}\diamond G_{2})\right\}
E(S)\displaystyle E(S^{\prime}) ={yL,yR|((xL,yL),(uL,vL)),((xR,yR),(uR,vR))E(G1G2)}\displaystyle=\left\{\left\langle y_{L},y_{R}\right\rangle|\;\left\langle\Big{(}(x_{L},y_{L}),(u_{L},v_{L})\Big{)},\Big{(}(x_{R},y_{R}),(u_{R},v_{R})\Big{)}\right\rangle\in E(G_{1}\diamond G_{2})\right\}

We need to prove that (x,y),(x,y)E(G1)\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(G_{1}) if and only of (x,y),(x,y)E(SS)\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(S\diamond S^{\prime}). If (x,y),(x,y)E(G1)\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(G_{1}), then for some u,v,u,vu,v,u^{\prime},v^{\prime} there is an edge ((x,y),(u,v)),((x,y),(u,v))E(G1G2)\left\langle\Big{(}(x,y),(u,v)\Big{)},\Big{(}(x^{\prime},y^{\prime}),(u^{\prime},v^{\prime})\Big{)}\right\rangle\in E(G_{1}\diamond G_{2}), and hence there is an edge SSS\diamond S^{\prime} which is (x,y),(x,y)E(SS)\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(S\diamond S^{\prime}). Next, suppose that (x,y),(x,y)E(SS)\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(S\diamond S^{\prime}). Then, x,xE(S)\left\langle x,x^{\prime}\right\rangle\in E(S) and y,yE(S)\left\langle y,y^{\prime}\right\rangle\in E(S^{\prime}). By the construction of SS and SS^{\prime} we have that there exist a,b,u,v,u,va,b,u,v,u^{\prime},v^{\prime} such that

((x,a),(u,v)),((x,b),(u,v))E(G1G2)\displaystyle\left\langle\Big{(}(x,a),(u,v)\Big{)},\Big{(}(x^{\prime},b),(u^{\prime},v^{\prime})\Big{)}\right\rangle\in E(G_{1}\diamond G_{2})

and there exists c,d,u′′,v′′,u′′′,v′′′c,d,u^{\prime\prime},v^{\prime\prime},u^{\prime\prime\prime},v^{\prime\prime\prime}, such that

((c,y),(u′′,v′′′)),((d,y),(u′′′,v′′′))E(G1G2)\displaystyle\left\langle\Big{(}(c,y),(u^{\prime\prime},v^{\prime\prime\prime})\Big{)},\Big{(}(d,y^{\prime}),(u^{\prime\prime\prime},v^{\prime\prime\prime})\Big{)}\right\rangle\in E(G_{1}\diamond G_{2})

Now, apply the isomorphism φ\varphi

((x,u),(a,v)),((x,u),(b,v))\displaystyle\left\langle\Big{(}(x,u),(a,v)\Big{)},\Big{(}(x^{\prime},u^{\prime}),(b,v^{\prime})\Big{)}\right\rangle E(H1H2)\displaystyle\in E(H_{1}\diamond H_{2})
((c,u′′),(y,v′′′)),((d,u′′′),(y,v′′′))\displaystyle\left\langle\Big{(}(c,u^{\prime\prime}),(y,v^{\prime\prime\prime})\Big{)},\Big{(}(d,u^{\prime\prime\prime}),(y^{\prime},v^{\prime\prime\prime})\Big{)}\right\rangle E(H1H2)\displaystyle\in E(H_{1}\diamond H_{2})

Hence, (x,u),(x,u)E(H1)\left\langle(x,u),(x^{\prime},u^{\prime})\right\rangle\in E(H_{1}), (y,v′′′),(y,v′′′)E(H2)\left\langle(y,v^{\prime\prime\prime}),(y^{\prime},v^{\prime\prime\prime})\right\rangle\in E(H_{2}). Therefore,((x,u),(y,v′′′)),((x,u),(y,v′′′))E(H1H2)\left\langle\Big{(}(x,u),(y,v^{\prime\prime\prime})\Big{)},\Big{(}(x^{\prime},u^{\prime}),(y^{\prime},v^{\prime\prime\prime})\Big{)}\right\rangle\in E(H_{1}\diamond H_{2}). Applying φ1\varphi^{-1} we get

((x,y),(u,v′′′)),((x,y),(u,v′′′))E(G1G2).\left\langle\Big{(}(x,y),(u,v^{\prime\prime\prime})\Big{)},\Big{(}(x^{\prime},y^{\prime}),(u^{\prime},v^{\prime\prime\prime})\Big{)}\right\rangle\in E(G_{1}\diamond G_{2}).

Thus, (x,y),(x,y)E(G1)\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(G_{1}). ∎

Corollary 5.16.

Let φ\varphi be an automorphism of a prime RR-thin graph GG^{\diamond\ell}, Then there is a permutation π\pi of [k][k] such that

φ(x1,,x)=(φ1(xπ(1)),,φ(xπ()))\varphi(x_{1},\dots,x_{\ell})=(\varphi_{1}(x_{\pi(1)}),\dots,\varphi_{\ell}(x_{\pi(\ell)}))

where each φi\varphi_{i} is an automorphism of GG.

5.3 Automorphisms of general graphs

In this section we prove an analog of Corollary 5.16 for graphs that are not necessarily RR-thin. An automorphism of a graph GG is called local if it is the identity mapping on G/RG/_{R}.

Theorem 5.17.

Suppose φ\varphi is an automorphism of GG^{\diamond\ell}. Let ψ:G/RG/R\psi:G^{\diamond\ell}/_{R}\rightarrow G^{\diamond\ell}/_{R} be the automorphism induced by φ\varphi, and let G=G1GkG=G_{1}\diamond\dots\diamond G_{k} be a prime factorization of GG. Then there is a permutation π\pi of []×[k][\ell]\times[k] such that every automorphism of G/RG^{\diamond\ell}/_{R} can be split into kk\ell automorphisms:

ψ([v1],,[v])\displaystyle\psi([v_{1}],\dots,[v_{\ell}]) =((ψ1,1([vπ(1,1)]),,ψ1,k([vπ(1,k)])),\displaystyle=\Big{(}\big{(}\psi_{1,1}([v_{\pi(1,1)}]),\dots,\psi_{1,k}([v_{\pi(1,k)}])\big{)},
\displaystyle\;\;\;\;\;\;\vdots
(ψ,1([vπ(,1)]),,ψ,k([vπ(,k)]))).\displaystyle\;\;\;\;\;\;\big{(}\psi_{\ell,1}([v_{\pi(\ell,1)}]),\dots,\psi_{\ell,k}([v_{\pi(\ell,k)}])\big{)}\Big{)}.

We start with two auxiliary lemmas.

Lemma 5.18.

Let GG be a simple connected graph such that G/RH1H2G/_{R}\cong H_{1}\diamond H_{2}. Then every vertex (x,y)V(H1H2)(x,y)\in V(H_{1}\diamond H_{2}) corresponds to a unique RR-class of GG, denote its cardinality by |(x,y)||(x,y)|. If there are functions ω1:V(H1),ω2:V(H2)\omega_{1}:V(H_{1})\rightarrow\mathbb{N},\omega_{2}:V(H_{2})\rightarrow\mathbb{N} such that |(x,y)|=ω1(x)ω2(y)|(x,y)|=\omega_{1}(x)\cdot\omega_{2}(y), then there are graphs H1H^{\prime}_{1} and H2H^{\prime}_{2} such that GH1H2G\cong H^{\prime}_{1}\diamond H^{\prime}_{2}, and H1/R=H1H^{\prime}_{1}/_{R}=H_{1} and H2/R=H2H^{\prime}_{2}/_{R}=H_{2}.

Proof.

By Lemma 5.8 H1,H2H_{1},H_{2} are RR-thin. Define H1H^{\prime}_{1} as follows. Take a family {AxxV(H1)}\{A_{x}\mid x\in V(H_{1})\} of disjoint sets such that |Ax|=ω1(x)|A_{x}|=\omega_{1}(x) for each xV(H1)x\in V(H_{1}). Set V(H1)=xV(H1)AxV(H^{\prime}_{1})=\bigcup_{x\in V(H_{1})}A_{x}, and E(H1)={u,v|aAx,bAy and x,yE(H1)}E(H^{\prime}_{1})=\{\left\langle u,v\right\rangle|a\in A_{x},b\in A_{y}\mbox{ and }\left\langle x,y\right\rangle\in E(H_{1})\}. A graph H2H^{\prime}_{2} is constructed in the same way by choosing sets BxB_{x} with |Bx|=ω2(x)|B_{x}|=\omega_{2}(x) for each xV(H2)x\in V(H_{2}).

Claim 1. The RR-classes of H1,H2H^{\prime}_{1},H^{\prime}_{2} are the sets Ax,BxA_{x},B_{x}, respectively.

Proof of Claim 1..

It suffices to prove that if a,bAxa,b\in A_{x}, then NH1(a)=NH2(b)N_{H^{\prime}_{1}}(a)=N_{H^{\prime}_{2}}(b). If there is a cc such that a,cE(A)\left\langle a,c\right\rangle\in E(A^{\prime}), then there is zz such that cAzc\in A_{z} and x,zE(H1)\left\langle x,z\right\rangle\in E(H_{1}), then by the definition of E(H1)E(H^{\prime}_{1}) we have b,cE(H1)\left\langle b,c\right\rangle\in E(H^{\prime}_{1}). For H2H^{\prime}_{2} the proof is analogous. ∎

By Claim 1 there are isomorphisms ψ1:H1H1/R\psi_{1}:H_{1}\rightarrow H^{\prime}_{1}/_{R} and ψ2:H2H2/R\psi_{2}:H_{2}\rightarrow H^{\prime}_{2}/_{R}, hence, there is a isomorphism ψ:H1H2H1/RH2/R\psi:H_{1}\diamond H_{2}\rightarrow H^{\prime}_{1}/_{R}\diamond H^{\prime}_{2}/_{R}. Therefore, (H1H2)/RH1/RH2/RH1H2G/R(H^{\prime}_{1}\diamond H^{\prime}_{2})/_{R}\cong H^{\prime}_{1}/_{R}\diamond H^{\prime}_{2}/_{R}\cong H_{1}\diamond H_{2}\cong G/_{R}. By Lemma 5.5 we have H1H2GH^{\prime}_{1}\diamond H^{\prime}_{2}\cong G. ∎

Lemma 5.19.

Suppose there is an isomorphism φ:G1GkH1H\varphi:G_{1}\diamond\dots\diamond G_{k}\rightarrow H_{1}\diamond\dots\diamond H_{\ell} where φ(x1,,xk)=(φ1(x1,,xk),,φ(x1,,xk))\varphi(x_{1},\dots,x_{k})=(\varphi_{1}(x_{1},\dots,x_{k}),\dots,\varphi_{\ell}(x_{1},\dots,x_{k})) and all factors are connected and such that Gi/R,Hi/RG_{i}/_{R},H_{i}/_{R} are nontrivial. Let ψ:G1/RGk/RH1/RH/R\psi:G_{1}/_{R}\diamond\dots\diamond G_{k}/_{R}\rightarrow H_{1}/_{R}\diamond\dots\diamond H_{\ell}/_{R} be the induced isomorphism

ψ([x1],,[xk])=(ψ1([x1],,[xk]),,ψl([x1],,[xk]))\psi([x_{1}],\dots,[x_{k}])=(\psi_{1}([x_{1}],\dots,[x_{k}]),...,\psi_{l}([x_{1}],\dots,[x_{k}]))

If some GiG_{i} is prime, then at most one of the functions ψj\psi_{j} depends on [xi][x_{i}].

Proof.

Grouping and permuting factors, it suffices only to prove the lemma in the case when G1G_{1} is prime and k=l=2k=l=2. We rewrite φ:G1G2H1H2\varphi:G_{1}\diamond G_{2}\rightarrow H_{1}\diamond H_{2} as φ(x,y)=(φ1(x,y),φ2(x,y))\varphi(x,y)=(\varphi_{1}(x,y),\varphi_{2}(x,y)). As a consequence we have ψ:G1/RG2/RH1/RH2/R\psi:G_{1}/_{R}\diamond G_{2}/_{R}\rightarrow H_{1}/_{R}\diamond H_{2}/_{R}, where ψ([x],[y])=(ψ1([x],[y]),ψ2([x],[y]))\psi([x],[y])=(\psi_{1}([x],[y]),\psi_{2}([x],[y])). As G1,G2,H1,H2G_{1},G_{2},H_{1},H_{2} are connected, each of G1/R,G2/R,H1/R,H2/RG_{1}/_{R},G_{2}/_{R},H_{1}/_{R},H_{2}/_{R} is connected and RR-thin. We prove that if ψ1\psi_{1} and ψ2\psi_{2} depend on [x][x], then G1G_{1} is not prime, a contradiction with the assumption made.

Lemma 5.15 implies that if both ψ1\psi_{1} and ψ2\psi_{2} depend on [x][x], then G1/RG_{1}/_{R} is not prime. Take a prime factorization G1/R=A1AnG_{1}/_{R}=A_{1}\diamond\dots\diamond A_{n}. This gives a labeling [x]=(a1,,an)[x]=(a_{1},\dots,a_{n}) of RR-classes of G1G_{1} with vertices of A1AnA_{1}\diamond\dots\diamond A_{n}. Then ψ\psi can be viewed as an isomorphism ψ:A1AnG2/RH1/RH2/R\psi:A_{1}\diamond\dots\diamond A_{n}\diamond G_{2}/_{R}\rightarrow H_{1}/_{R}\diamond H_{2}/_{R}. By Lemma 5.15 for each i[n]i\in[n], exactly one of ψ1\psi_{1} and ψ2\psi_{2} depends on aia_{i}. We order the factors of G1/RG_{1}/_{R} = A1AnA_{1}\diamond\dots\diamond A_{n} so that ψ1\psi_{1} depends on a1,,asa_{1},\dots,a_{s}, but not on as+1,,ana_{s+1},\dots,a_{n}, and ψ2\psi_{2} depends on as+1,,ana_{s+1},\dots,a_{n} but not on a1,,asa_{1},\dots,a_{s}. Then we have

ψ(a1,,as,as+1,,,an,[y])=(ψ1(a1,,as,[y]),ψ2(as+1,,an,[y]).\psi(a_{1},\dots,a_{s},a_{s+1},,\dots,a_{n},[y])=(\psi_{1}(a_{1},\dots,a_{s},[y]),\psi_{2}(a_{s+1},\dots,a_{n},[y]).

We know that (a1,,an)=[x]V(G1/R)(a_{1},\dots,a_{n})=[x]\in V(G_{1}/_{R}) is an RR-class of G1G_{1}, so it makes sense to speak of its cardinality |(a1,,an)||(a_{1},\dots,a_{n})|. By Lemma 5.18 graph G1G_{1} has a nontrivial factorization (i.e., be non-prime) if we can define functions ω1:A1As\omega_{1}:A_{1}\diamond\dots\diamond A_{s}\rightarrow\mathbb{N} and ω2:As+1An\omega_{2}:A_{s+1}\diamond\dots\diamond A_{n}\rightarrow\mathbb{N}, for which |(a1,,as,as+1,,an)|=ω1(a1,,as)ω2(as+1,,an)|(a_{1},\dots,a_{s},a_{s+1},\dots,a_{n})|=\omega_{1}(a_{1},\dots,a_{s})\cdot\omega_{2}(a_{s+1},\dots,a_{n}). Let [y]V(G2/R)[y]\in V(G_{2}/_{R}) be an RR-class of G2G_{2}. Observe that the isomorphism φ:G1G2H1H2\varphi:G_{1}\diamond G_{2}\rightarrow H_{1}\diamond H_{2} maps each RR-class ((a1,,an,[y])((a_{1},\dots,a_{n},[y]) of G1G2G_{1}\diamond G_{2} bijectively to the RR-class (ψ1(a1,,as,[y]),ψ2(as+1,,an,[y]))(\psi_{1}(a_{1},\dots,a_{s},[y]),\psi_{2}(a_{s+1},\dots,a_{n},[y])) of H1H2H_{1}\diamond H_{2}. Therefore

|(a1,,as,as+1,,an)|=|ψ1(a1,,as,[y])||ψ2(as+1,,an,[y])||[y]||(a_{1},\dots,a_{s},a_{s+1},\dots,a_{n})|=\frac{|\psi_{1}(a_{1},\dots,a_{s},[y])|\cdot|\psi_{2}(a_{s+1},\dots,a_{n},[y])|}{|[y]|}

Since |(a1,,as,as+1,,an)||(a_{1},\dots,a_{s},a_{s+1},\dots,a_{n})| is an integer, |[y]||[y]| divides |ψ1(a1,,as,[y])||ψ2(as+1,,an,[y])||\psi_{1}(a_{1},\dots,a_{s},[y])|\cdot|\psi_{2}(a_{s+1},\dots,a_{n},[y])|. So there are d1d_{1} and d2d_{2} such that d1d2=dd_{1}\cdot d_{2}=d and d1d_{1} divides |ψ1(a1,,as,[y])||\psi_{1}(a_{1},\dots,a_{s},[y])| and d2d_{2} divides |ψ2(as+1,,an,[y])||\psi_{2}(a_{s+1},\dots,a_{n},[y])|. Set ω1(a1,,as)=|ψ1(a1,,as,[y])|d1\omega_{1}(a_{1},\dots,a_{s})=\frac{|\psi_{1}(a_{1},\dots,a_{s},[y])|}{d_{1}} and ω2(as+1,,an)=|ψ2(as+1,,an,[y])|d2\omega_{2}(a_{s+1},\dots,a_{n})=\frac{|\psi_{2}(a_{s+1},\dots,a_{n},[y])|}{d_{2}}. It is easy to see that functions ω1,ω2\omega_{1},\omega_{2} are as required. ∎

Proof of Theorem 5.17.

Let G=G1GkG=G_{1}\diamond\dots\diamond G_{k} be a factorization of GG into prime factors. It will be convenient to represent G/RG^{\diamond\ell}/_{R} as

G/R=(G1,1/RG1,k/R)(G,1/RG,k/R),G^{\diamond\ell}/_{R}=(G_{1,1}/_{R}\diamond\dots\diamond G_{1,k}/_{R})\diamond\dots\diamond(G_{\ell,1}/_{R}\diamond\dots\diamond G_{\ell,k}/_{R}), (6)

where Gi,t=Gj,tG_{i,t}=G_{j,t} for all i,j[],t[k]i,j\in[\ell],t\in[k]. Relable each vertex (v1,,v)V(G)(v_{1},\dots,v_{\ell})\in V(G^{\diamond\ell}) as

(v1,,v)=((v1,1,,v1,k),,(v,1,,v,k)).(v_{1},\dots,v_{\ell})=\big{(}(v_{1,1},\dots,v_{1,k}),\dots,(v_{\ell,1},\dots,v_{\ell,k})\big{)}.

By Lemma 5.19, for any automorphism ψ\psi of G/RG^{\diamond\ell}/_{R} there is a permutaion π\pi of []×[k][\ell]\times[k] such that ψ\psi can be split into kk\ell automorphisms:

ψ([v1],,[v])\displaystyle\psi([v_{1}],\dots,[v_{\ell}]) =ψ(([v1,1],,[v1,k]),,([v,1],,[v,k]))\displaystyle=\psi(([v_{1,1}],\dots,[v_{1,k}]),\dots,([v_{\ell,1}],\dots,[v_{\ell,k}]))
=((ψ1,1([vπ(1,1)]),,ψ1,k([vπ(1,k)])),\displaystyle=\Big{(}\big{(}\psi_{1,1}([v_{\pi(1,1)}]),\dots,\psi_{1,k}([v_{\pi(1,k)}])\big{)},
\displaystyle\;\;\;\;\;\;\vdots
(ψ,1([vπ(,1)]),,ψ,k([vπ(,k)])))\displaystyle\;\;\;\;\;\;\big{(}\psi_{\ell,1}([v_{\pi(\ell,1)}]),\dots,\psi_{\ell,k}([v_{\pi(\ell,k)}])\big{)}\Big{)}

where the equality follows by putting together all ψi,j\psi_{i,j} for j[k]j\in[k] to obtain the automorphism ψi\psi_{i} on Gi/RG_{i}/_{R}. ∎

5.4 Reduced form of HH^{\diamond\ell}

As Faben and Jerum showed in [FJ13], the pp-reduced form of HH^{\diamond\ell} is obtained by removing from a relational structure or a graph vertices that are not fixed under a pp-automorphism. On the other hand, we will often use the pp-reduced form of HH^{\diamond\ell}, and need to make sure that some vertices remain in that pp-reduced form. In this section our goal is to show that if HH is pp-rigid, then we can guarantee that at least some vertices from certain specified sets are not eliminated when constructing the pp-reduced form. Recall the definition of the relation \sim from Section 3.3.

Lemma 5.20.

For a simple graph HH, A permutation π\pi of its R-class [a][a] can be transform to an automorphism of HH. Therefore for a,bV(H)a,b\in V(H), if aRbaRb then aba\sim b.

Proof.

Let π\pi be a permutation of [a][a]. As is easily seen, the following mapping is an automorphism of HH.

φ(v)={π(v)v[a],vv[a].\varphi(v)=\left\{\begin{array}[]{cl}\pi(v)&v\in[a],\\ v&v\not\in[a].\end{array}\right.

Observe that if aRbaRb, then there is a permutation π\pi of [a][a] such that π(a)=b\pi(a)=b, hence there is a ϕ\phi such that φ(a)=b\varphi(a)=b. ∎

Let H~\widetilde{H^{\diamond\ell}} be a subgraph of HH^{\diamond\ell} obtained by eliminating local pp-automorphisms. Note that H~\widetilde{H^{\diamond\ell}} is NOT the reduced form of HH^{\diamond\ell}, as some pp-automorphisms may remain. It means that from an RR-class [x][x] of HH^{\diamond\ell} with size |[x]|=ap+r|[x]|=ap+r, 0rp0\leq r\leq p, we remove apap elements of [x][x]. Denote the result by [x]~\widetilde{[x]}. Note that [x]~[x]\widetilde{[x]}\subseteq[x], and |[x][x]~|0(modp)|[x]-\widetilde{[x]}|\equiv 0\pmod{p}. Also, x,yE(H~)\left\langle x,y\right\rangle\in E(\widetilde{H^{\diamond\ell}}) if and only if [x],[y]E(H/R)\left\langle[x],[y]\right\rangle\in E(H^{\diamond\ell}/_{R}). More formally

V(H~)\displaystyle V(\widetilde{H^{\diamond\ell}}) =xV(H)[x]~,\displaystyle=\bigcup_{x\in V(H^{\diamond\ell})}\widetilde{[x]},
E(H~)\displaystyle E(\widetilde{H^{\diamond\ell}}) ={x,y|[x],[y]E(H/R)}.\displaystyle=\{\left\langle x,y\right\rangle|\left\langle[x],[y]\right\rangle\in E({H^{\diamond\ell}}/_{R})\}.

The following lemma is a direct implication of the definition of H~\widetilde{H^{\diamond\ell}}. Observe that if |[a]|p|[a]|\geq p then by Lemma 5.20 HH is not pp-rigid.

Lemma 5.21.

If HH is a pp-rigid graph, then H~/R\widetilde{H^{\diamond\ell}}/_{R} is isomoprhic to H/RH^{\diamond\ell}/_{R}.

Proof.

We prove the lemma by the following claims.

Claim 1. The RR-classes of HH^{\diamond\ell} are the sets [x]~\widetilde{[x]}.

Proof of Claim 1..

It suffices to prove that if a,b[x]~a,b\in\widetilde{[x]}, then NH~(a)=NH~(b)N_{\widetilde{H^{\diamond\ell}}}(a)=N_{\widetilde{H^{\diamond\ell}}}(b). By the definition, if a,b[x]~a,b\in\widetilde{[x]}, then [a]=[b][a]=[b], Hence

cNH~(a)a,cE(H~)\displaystyle c\in N_{\widetilde{H^{\diamond\ell}}}(a)\Leftrightarrow\left\langle a,c\right\rangle\in E({\widetilde{H^{\diamond\ell}}}) [a],[c]E(H/R)\displaystyle\Leftrightarrow\left\langle[a],[c]\right\rangle\in E({{H^{\diamond\ell}}}/_{R})
[b],[c]E(H/R)b,cE(H~)cNH~(b).\displaystyle\Leftrightarrow\left\langle[b],[c]\right\rangle\in E({{H^{\diamond\ell}}}/_{R})\Leftrightarrow\left\langle b,c\right\rangle\in E({\widetilde{H^{\diamond\ell}}})\Leftrightarrow c\in N_{\widetilde{H^{\diamond\ell}}}(b).

Claim 2. The function φ:H/RH~/R\varphi:H^{\diamond\ell}/_{R}\rightarrow\widetilde{H^{\diamond\ell}}/_{R} where φ([x])=[x]~\varphi([x])=\widetilde{[x]} is an isomrphism.

Proof of Claim 2..

Clearly, the function φ\varphi in bijective and surjective. We just need to prove that the function φ\varphi is edge preserving.

Assume [a],[b]E(H/R)\left\langle[a],[b]\right\rangle\in E({{H^{\diamond\ell}}}/_{R}). Then, φ([a])=[a]~[a]\varphi([a])=\widetilde{[a]}\subseteq[a] and φ([b])=[b]~[b]\varphi([b])=\widetilde{[b]}\subseteq[b]. So, there are a[a]~a\in\widetilde{[a]} and b[b]~b\in\widetilde{[b]} such that a,bE(H)\left\langle a,b\right\rangle\in E(H^{\diamond\ell}), also, a,bE(H~)\left\langle a,b\right\rangle\in E(\widetilde{H^{\diamond\ell}}). Hence there are a[a]~,b[b]~a\in\widetilde{[a]},b\in\widetilde{[b]} such that a,bE(H~)\left\langle a,b\right\rangle\in E(\widetilde{H^{\diamond\ell}}), therefore, [a],[b]E(H~/R)\left\langle[a],[b]\right\rangle\in E(\widetilde{H^{\diamond\ell}}/_{R}). ∎

We have an isomorphism from H~\widetilde{H^{\diamond\ell}} to HH^{\diamond\ell}. The result follows. ∎

Theorem 5.22.

Let HH be a pp-rigid graph and AV(H)A\subseteq V(H^{\diamond\ell}) a union of RR-classes of HH^{\diamond\ell}. Then

  1. 1.

    A~/R=A/R\widetilde{A}/_{R}=A/_{R}.

  2. 2.

    For any graph (G,x)(G,x), 𝗁𝗈𝗆((G,x),(H,A))𝗁𝗈𝗆((G,x),(H~,A~))(modp)\mathsf{hom}((G,x),(H^{\diamond\ell},A))\equiv\mathsf{hom}((G,x),(\widetilde{H^{\diamond\ell}},\widetilde{A}))\pmod{p}.

  3. 3.

    If AA is a pp-subalgebra of HH^{\diamond\ell}, then A~\widetilde{A} is a pp-subalgebra of H~\widetilde{H^{\diamond\ell}}.

Proof.
  1. 1.

    By the definition of local pp-automorphisms A~/RA/R\widetilde{A}/_{R}\subseteq A/_{R}. On the other hand, by Lemma 5.21 H~\widetilde{H^{\diamond\ell}} contains elements of every RR-class of HH^{\diamond\ell}. The result follows.

  2. 2.

    Note first that if 𝐚R𝐛\mathbf{a}R\mathbf{b} for 𝐚,𝐛H\mathbf{a},\mathbf{b}\in H^{\diamond\ell} then 𝐚𝐛\mathbf{a}\sim\mathbf{b}, that is, for any graph (G,x)(G,x) it holds that 𝗁𝗈𝗆((G,x),(H,𝐚))=𝗁𝗈𝗆((G,x),(H,𝐛))\mathsf{hom}((G,x),(H^{\diamond\ell},\mathbf{a}))=\mathsf{hom}((G,x),(H^{\diamond\ell},\mathbf{b})). Let BB be an RR-class of HH^{\diamond\ell} and B~=BV(H)\widetilde{B}=B\cap V(H^{\diamond\ell}). Then |BB~||B-\widetilde{B}| is a multiple of pp. Therefore

    𝗁𝗈𝗆((G,x),(H,B))\displaystyle\mathsf{hom}((G,x),(H^{\diamond\ell},B)) =𝐚B𝗁𝗈𝗆((G,x),(H,𝐚))\displaystyle=\sum_{\mathbf{a}\in B}\mathsf{hom}((G,x),(H^{\diamond\ell},\mathbf{a}))
    =𝗁𝗈𝗆((G,x),(H,B~))+𝐚BB~𝗁𝗈𝗆((G,x),(H,𝐚))\displaystyle=\mathsf{hom}((G,x),(H^{\diamond\ell},\widetilde{B}))+\sum_{\mathbf{a}\in B-\widetilde{B}}\mathsf{hom}((G,x),(H^{\diamond\ell},\mathbf{a}))
    =𝗁𝗈𝗆((G,x),(H,B~)).\displaystyle=\mathsf{hom}((G,x),(H^{\diamond\ell},\widetilde{B})).
  3. 3.

    Suppose that AA is a pp-subalgebra of HH^{\diamond\ell}. By Lemma 4.1 there exists (G,x)(G,x) such that 𝗁𝗈𝗆((G,x),(H,𝐚))0(modp)\mathsf{hom}((G,x),(H^{\diamond\ell},\mathbf{a}))\not\equiv 0\pmod{p} if and only if 𝐚A\mathbf{a}\in A. By what is observed above for 𝐚V(H~)\mathbf{a}\in V(\widetilde{H^{\diamond\ell}}) we have 𝗁𝗈𝗆((G,x),(H~,𝐚))0(modp)\mathsf{hom}((G,x),(\widetilde{H^{\diamond\ell}},\mathbf{a}))\not\equiv 0\pmod{p} if and only if 𝐚A\mathbf{a}\in A. Therefore (G,x)(G,x) defines A~\widetilde{A}.

6 Counting graph homomorphisms

6.1 Reductions for bipartite graphs

In this section we prove the Faben-Jerrum Conjecture. Fix a prime pp. Let \mathcal{H} be a graph. By Lemma 2.2 \mathcal{H} can be assumed to be pp-rigid. Also, by the results of [LGCF21] it suffices to consider the case when \mathcal{H} is bipartite. Thus, we assume that \mathcal{H} is a pp-rigid bipartite graph that is not complete. Here we use the techniques developed in the previous sections to prove that #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) is 𝖬𝗈𝖽p\mathsf{Mod}_{p}P-complete.

One of the results we use is Theorem 5.17 about automorphisms of \diamond-powers of \mathcal{H}. However, Theorem 5.17 is proved assuming that \mathcal{H} is prime and has two sorts of vertices, left and right. We first prove that we can use this theorem.

Let 𝖻𝗂𝗉\mathcal{H}^{\mathsf{bip}} denote the graph \mathcal{H} viewed as a 2-sorted structure. Note that if \mathcal{H} is pp-rigid, so is 𝖻𝗂𝗉\mathcal{H}^{\mathsf{bip}}. Also, in this case =(𝖻𝗂𝗉)\mathcal{H}^{\diamond\ell}=(\mathcal{H}^{\mathsf{bip}})^{\ell}.

Lemma 6.1 (Lemma 3.28, [LGCF21], rephrased).

If \mathcal{H} is a pp-rigid bipartite graph then #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) and #p𝖢𝖲𝖯(𝖻𝗂𝗉)\#_{p}\mathsf{CSP}(\mathcal{H}^{\mathsf{bip}}) are polynomial time interreducible.

Since we only work with 𝖻𝗂𝗉\mathcal{H}^{\mathsf{bip}}, to simplify notation we will omit 𝖻𝗂𝗉{\mathsf{bip}} from 𝖻𝗂𝗉\mathcal{H}^{\mathsf{bip}}.

By Theorem 4.5 #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}^{*}) is polynomial time reducible to \mathcal{H}. Again, to simplify the notation we use \mathcal{H} instead of \mathcal{H}^{*}

Proposition 6.2.

Let \mathcal{H} a bipartite graph, and let =1k\mathcal{H}=\mathcal{H}_{1}\diamond\dots\diamond\mathcal{H}_{k} be a prime factorization of \mathcal{H}. Then for every automorphism φ\varphi of /R\mathcal{H}^{\ell}/_{R} there are permutations π1,,πk\pi_{1},\dots,\pi_{k} of [][\ell] such that

φ(a1,1,,a1,k,,a,1,,a,k)=(aπ1(1),1,,aπk(1),k,,aπ1(),1,,aπk(),k).\varphi(a_{1,1},\dots,a_{1,k},\dots,a_{\ell,1},\dots,a_{\ell,k})=(a_{\pi_{1}(1),1},\dots,a_{\pi_{k}(1),k},\dots,a_{\pi_{1}(\ell),1},\dots,a_{\pi_{k}(\ell),k}).

where (ai,1,,ai,k)(a_{i,1},\dots,a_{i,k}) is an element of the iith copy of /R\mathcal{H}/_{R}.

Proof.

By Theorem 5.17 there are isomorphisms φ1,1,,φ,k\varphi_{1,1},\dots,\varphi_{\ell,k} and a permutation π\pi of []×[k][\ell]\times[k] such that

φ(a1,1,,a1,k,,a,1,,a,k)=(φ1,1(aπ(1,1)),,φ,k(aπ(,k))).\varphi(a_{1,1},\dots,a_{1,k},\dots,a_{\ell,1},\dots,a_{\ell,k})=(\varphi_{1,1}(a_{\pi(1,1)}),\dots,\varphi_{\ell,k}(a_{\pi(\ell,k)})).

Now observe that as /R\mathcal{H}/_{R} has all the constant relations, for any (a1,,ak)H/R(a_{1},\dots,a_{k})\in H/_{R} we have

φ(a1,,ak,a1,,ak,,a1,,ak)=(a1,,ak,a1,,ak,,a1,,ak).\varphi(a_{1},\dots,a_{k},a_{1},\dots,a_{k},\dots,a_{1},\dots,a_{k})=(a_{1},\dots,a_{k},a_{1},\dots,a_{k},\dots,a_{1},\dots,a_{k}). (7)

Firstly, this implies that every φi,j\varphi_{i,j} is the identity mapping. This means that φ\varphi is basically the permutation π\pi of coordinates. If for some i[],j[k]i\in[\ell],j\in[k], π(i,j)=(i,j)\pi(i,j)=(i^{\prime},j^{\prime}) and jjj^{\prime}\neq j then choosing any (a1,,ak)(a_{1},\dots,a_{k}) such that aiaja_{i}\neq a_{j} we get a contradiction. The result follows. ∎

Proposition 6.2 provides strong restrictions on the possible pp-automorphisms of \mathcal{H}^{\ell}.

Corollary 6.3.

If <p\ell<p then every pp-automorphism of \mathcal{H}^{\ell} is local.

Proof.

Let ψ\psi be a non-local pp-automorphism of \mathcal{H}^{\ell} and φ\varphi the corresponding automorphism of /R\mathcal{H}^{\ell}/_{R}. By Proposition 6.2 there are permutations π1,,πk\pi_{1},\dots,\pi_{k} of [][\ell] such that

φ(a1,1,,a1,k,,a,1,,a,k)=(aπ1(1),1,,aπk(1),k,,aπ1(),1,,aπk(),).\varphi(a_{1,1},\dots,a_{1,k},\dots,a_{\ell,1},\dots,a_{\ell,k})=(a_{\pi_{1}(1),1},\dots,a_{\pi_{k}(1),k},\dots,a_{\pi_{1}(\ell),1},\dots,a_{\pi_{k}(\ell),\ell}).

for any (a1,1,,a,k)(a_{1,1},\dots,a_{\ell,k})\in\mathcal{H}^{\ell}. As ψ\psi is a pp-automorphism, so is φ\varphi. Therefore every πi\pi_{i} is either the identity mapping or has order pp. The latter is impossible as <p\ell<p, and φ\varphi has to be the identity mapping. ∎

Lemma 6.4.

1. Let aHa\in H. Then N(a)N_{\mathcal{H}}(a) is a subalgebra of \mathcal{H}.
2. Let AHA\subseteq H be a pp-subalgebra of \mathcal{H}. Then N(A)N_{\mathcal{H}}(A) is a pp-subalgebra of \mathcal{H}.

Proof.

Let EE be the edge relation of \mathcal{H}.
1. Since \mathcal{H} has the constant relation RaR_{a}, Q(x)=y(E(x,y)Ra(y)Q(x)=\exists y(E(x,y)\wedge R_{a}(y) pp-defines (and by Theorem 4.4) pp-mpp-defines N(a)N_{\mathcal{H}}(a).
2. In this case the argument is similar. Let AA is pp-mpp-defined by A(x)=py1,,ysΦ(x,y1,,ys)A(x)=\exists^{\oplus p}y_{1},\dots,y_{s}\Phi(x,y_{1},\dots,y_{s}). Then Q(x)=zpy1,,ys(E(x,z)Φ(z,y1,,ys))Q(x)=\exists z\exists^{\oplus p}y_{1},\dots,y_{s}(E(x,z)\wedge\Phi(z,y_{1},\dots,y_{s})) defines N(A)N_{\mathcal{H}}(A). ∎

6.2 Weighted #𝖡𝖨𝖲\#\mathsf{BIS} and thick 𝖹\mathsf{Z}-graphs

To prove hardness we reduce the Weighted #p𝖡𝖨𝖲\#_{p}\mathsf{BIS} problem to #p𝖢𝖲𝖯(H)\#_{p}\mathsf{CSP}(H). For a graph 𝒢\mathcal{G} let 𝖨𝖲(𝒢)\mathsf{IS}(\mathcal{G}) denote the set of its independent sets. Also, for a bipartite graph 𝒢\mathcal{G} let L𝒢,R𝒢L_{\mathcal{G}},R_{\mathcal{G}} denote the two parts of the bipartition. Let α,β0(modp)\alpha,\beta\not\equiv 0\pmod{p}. Then #p𝖡𝖨𝖲(α,β)\#_{p}\mathsf{BIS}(\alpha,\beta) is the problem defined as follows: given a bipartite graph 𝒢\mathcal{G}, find the value

𝒵α,β(𝒢)=I𝖨𝖲(𝒢)α|IL𝒢|β|IR𝒢|\mathcal{Z}_{\alpha,\beta}(\mathcal{G})=\sum_{I\in\mathsf{IS}(\mathcal{G})}\alpha^{|I\cap L_{\mathcal{G}}|}\cdot\beta^{|I\cap R_{\mathcal{G}}|}

modulo pp. The problem of computing the function 𝒵α,β(𝒢)\mathcal{Z}_{\alpha,\beta}(\mathcal{G}) is proven to be #pP\#_{p}P-hard in [GLS18].

A bipartite graph 𝒢\mathcal{G} is said to be a thick Z-graph if its vertices can be partitioned into four sets A,B,C,DA,B,C,D, where A,CL𝒢,B,DR𝒢A,C\subseteq L_{\mathcal{G}},B,D\subseteq R_{\mathcal{G}}, such that the sets AB,CB,CDA\cup B,C\cup B,C\cup D induce complete bipartite subgraphs of 𝒢\mathcal{G}, and there are no edges between vertices from ADA\cup D, see Figure 1.

Refer to caption
Figure 1: Thick 𝖹\mathsf{Z}-graph

An induced subgraph 𝖹\mathcal{H}^{\mathsf{Z}} of \mathcal{H} that is a thick Z-graph with parts A,B,C,DA,B,C,D is said to be non-degenerate if there exist graphs with distinguished vertices (𝒦L,x),(𝒦R,x)(\mathcal{K}_{L},x),(\mathcal{K}_{R},x) such that

𝗁𝗈𝗆((𝒦L,x),(,A))α10(modp),𝗁𝗈𝗆((𝒦L,x),(,C))α20(modp),𝗁𝗈𝗆((𝒦R,x),(,D))β10(modp),𝗁𝗈𝗆((𝒦R,x),(,B))β20(modp),\displaystyle\begin{split}\mathsf{hom}((\mathcal{K}_{L},x),(\mathcal{H},A))\equiv\alpha_{1}&\not\equiv 0\pmod{p},\\ \mathsf{hom}((\mathcal{K}_{L},x),(\mathcal{H},C))\equiv\alpha_{2}&\not\equiv 0\pmod{p},\\ \mathsf{hom}((\mathcal{K}_{R},x),(\mathcal{H},D))\equiv\beta_{1}&\not\equiv 0\pmod{p},\\ \mathsf{hom}((\mathcal{K}_{R},x),(\mathcal{H},B))\equiv\beta_{2}&\not\equiv 0\pmod{p},\end{split} (8)

and

𝗁𝗈𝗆((𝒦L,x),(,v))0(modp),for vL(AC),𝗁𝗈𝗆((𝒦R,x),(,v)0(modp)for vR(BD).\displaystyle\begin{split}\mathsf{hom}((\mathcal{K}_{L},x),(\mathcal{H},v))&\equiv 0\pmod{p},\qquad\text{for $v\in L_{\mathcal{H}}-(A\cup C)$},\\ \mathsf{hom}((\mathcal{K}_{R},x),(\mathcal{H},v)&\equiv 0\pmod{p}\qquad\text{for $v\in R_{\mathcal{H}}-(B\cup D)$}.\end{split} (9)
Theorem 6.5.

Let there exist an induced subgraph of \mathcal{H} that is a non-degenerate thick Z-graph with parameters α1,α2,β1,β2\alpha_{1},\alpha_{2},\beta_{1},\beta_{2}, then #p𝖡𝖨𝖲(α1α21,β1β21)\#_{p}\mathsf{BIS}(\alpha_{1}\alpha_{2}^{-1},\beta_{1}\beta_{2}^{-1}) (multiplication and inversion here is (modp)\pmod{p}) is polynomial time reducible to #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}).

Proof.

Let 𝒢=(L𝒢R𝒢,E)\mathcal{G}=(L_{\mathcal{G}}\cup R_{\mathcal{G}},E) be a bipartite graph, an instance of #p𝖡𝖨𝖲\#_{p}\mathsf{BIS}. We construct a graph 𝒢\mathcal{G}^{\prime}, an instance of #p𝖢𝖲𝖯()\#_{p}\mathsf{CSP}(\mathcal{H}) as follows:

  • For each vertex xL𝒢x\in L_{\mathcal{G}} and each vertex yR𝒢y\in R_{\mathcal{G}}, we make vertices lxl^{x} and ryr^{y}, respectively. If xyE{xy}\in E, then we add an edge between lxl^{x} and ryr^{y} in 𝒢\mathcal{G}^{\prime}.

  • For xL𝒢x\in L_{\mathcal{G}} let 𝒦L(x)\mathcal{K}_{L}(x) denote a copy of 𝒦L\mathcal{K}_{L} attached to lxl^{x}, that is, xx in (𝒦L,x)(\mathcal{K}_{L},x) is identified with lxl^{x}. For yR𝒢y\in R_{\mathcal{G}} a copy 𝒦R(y)\mathcal{K}_{R}(y) is attached in the same way.

Refer to caption
Figure 2: Structure of graph 𝒢\mathcal{G}^{\prime}.

The vertices from A,DA,D will help to encode independent sets of 𝒢\mathcal{G}. Specifically, with every independent set II of 𝒢\mathcal{G} we associate a set of homomorphisms φ:𝒢\varphi:\mathcal{G}^{\prime}\to\mathcal{H} such that for every vertex xL𝒢x\in L_{\mathcal{G}}, xIx\in I if and only if φ(lx)A\varphi(l^{x})\in A (recall that xx is also a vertex of GG^{\prime} identified with lxl^{x} in (𝒦L(x),lx)(\mathcal{K}_{L}(x),l^{x})); and similarly, for every yR𝒢y\in R_{\mathcal{G}}, yIy\in I if and only if φ(y)D\varphi(y)\in D. Finally, the structure of 𝖹\mathcal{H}^{\mathsf{Z}} makes sure that every homomorphism from 𝒢\mathcal{G}^{\prime} to \mathcal{H} 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 #p𝖡𝖨𝖲\#_{p}\mathsf{BIS}.

Now, we give a formal definition of GG^{\prime}:

V(𝒢)\displaystyle V(\mathcal{G}^{\prime}) =(xL𝒢V(𝒦L(x)))(yR𝒢V(𝒦R(y))),\displaystyle=\Big{(}\bigcup_{x\in L_{\mathcal{G}}}V(\mathcal{K}_{L}(x))\Big{)}\cup\Big{(}\bigcup_{y\in R_{\mathcal{G}}}V(\mathcal{K}_{R}(y))\Big{)},
E(𝒢)\displaystyle E(\mathcal{G}^{\prime}) =(xL𝒢E(𝒦L(x)))(yR𝒢E(𝒦R(y))){lxry|xyE}\displaystyle=\Big{(}\bigcup_{x\in L_{\mathcal{G}}}E(\mathcal{K}_{L}(x))\Big{)}\cup\Big{(}\bigcup_{y\in R_{\mathcal{G}}}E(\mathcal{K}_{R}(y))\Big{)}\cup\{{l^{x}r^{y}}|{xy}\in E\}

For each φ𝖧𝗈𝗆(𝒢,)\varphi\in\mathsf{Hom}(\mathcal{G}^{\prime},\mathcal{H}), define

Iφ={xL𝒢:φ(lx)A}{yR𝒢:φ(ry)D}.I_{\varphi}=\{x\in L_{\mathcal{G}}:\varphi(l^{x})\in A\}\cup\{y\in R_{\mathcal{G}}:\varphi(r^{y})\in D\}.

Claim 1. IφI_{\varphi} is an independent set.

Proof of Claim 1.

Assume that for some φ𝖧𝗈𝗆(𝒢,)\varphi\in\mathsf{Hom}(\mathcal{G}^{\prime},\mathcal{H}) the set IφI_{\varphi} is not an independent set in 𝒢\mathcal{G}, i.e.  there are two vertices a,bIφa,b\in I_{\varphi} such that abE(𝒢){ab}\in E(\mathcal{G}). Without loss of generality, let aL𝒢a\in L_{\mathcal{G}} and bR𝒢b\in R_{\mathcal{G}}. By the construction of IφI_{\varphi}, φ(a)A\varphi(a)\in A and φ(b)D\varphi(b)\in D and by definition of 𝖹\mathcal{H}^{\mathsf{Z}} there is no edge between AA and DD, that is φ\varphi is not a homomorphism. A contradiction. ∎

Let I\bumpeq_{I} be a relation on 𝖧𝗈𝗆(G,H)\mathsf{Hom}(G^{\prime},H) given by φIφ\varphi\bumpeq_{I}\varphi^{\prime} if and only if Iφ=IφI_{\varphi}=I_{\varphi^{\prime}}.

Obviously I\bumpeq_{I} is an equivalence relation on 𝖧𝗈𝗆(𝒢,H)\mathsf{Hom}(\mathcal{G}^{\prime},H). We denote the class of 𝖧𝗈𝗆(𝒢,H)/I\mathsf{Hom}(\mathcal{G}^{\prime},H)\mathbin{/}_{\bumpeq_{I}} containing φ\varphi by φ/I\varphi/_{\bumpeq_{I}}. Clearly, the I\bumpeq_{I}-classes correspond to the independent sets of 𝒢\mathcal{G}. We will need the corresponding mapping

𝔉:𝖧𝗈𝗆(𝒢,)/I𝖨𝖲(𝒢),where𝔉([φ])=Iφ\mathfrak{F}:\mathsf{Hom}(\mathcal{G}^{\prime},\mathcal{H})\mathbin{/}_{\bumpeq_{I}}\to\mathsf{IS}(\mathcal{G}),\quad\text{where}\quad\mathfrak{F}([\varphi])=I_{\varphi}

First, we will prove that 𝔉\mathfrak{F} is bijective, then compute the cardinalities of classes φ/I\varphi/_{\bumpeq_{I}}.

Claim 2. The mapping 𝔉\mathfrak{F} is bijective.

Proof of Claim 2.

By the definition of 𝔉\mathfrak{F}, it is injective. To show surjectivity let I𝖨𝖲(𝒢)I\in\mathsf{IS}(\mathcal{G}) be an independent set. We construct a homomorphism φ𝖧𝗈𝗆(𝒢,)\varphi\in\mathsf{Hom}(\mathcal{G}^{\prime},\mathcal{H}) such that Iφ=II_{\varphi}=I. Pick arbitrary aA,bB,cC,dDa\in A,b\in B,c\in C,d\in D, and :

  • For every vertex xILGx\in I\cap L_{G} set φ(lx)=a\varphi(l^{x})=a.

  • For every vertex x¯LGI\bar{x}\in L_{G}-I set φ(lx¯)=c\varphi(l^{\bar{x}})=c.

  • For every vertex yIRGy\in I\cap R_{G} set φ(ry)=d\varphi(r^{y})=d.

  • For every vertex y¯RGI\bar{y}\in R_{G}-I set φ(ry¯)=b\varphi(r^{\bar{y}})=b.

By construction of φ\varphi, if xyE(G){xy}\in E(G) and φ(lx)A\varphi(l^{x})\in A, then φ(ry)B\varphi(r^{y})\in B. Similarly, if φ(ry)D\varphi(r^{y})\in D, then φ(lx)=C\varphi(l^{x})=C. If none of the endpoints of an edge xy{xy} belongs to II then φ(lx)C\varphi(l^{x})\in C and φ(ry)B\varphi(r^{y})\in B. By the assumption on (𝒦L,x),(𝒦R,x)(\mathcal{K}_{L},x),(\mathcal{K}_{R},x), mapping φ\varphi can be extended to a homomorphism from 𝒢\mathcal{G}^{\prime} to \mathcal{H}. Hence 𝔉\mathfrak{F} is surjective. ∎

Claim 3. |φ/I|α1|L𝒢Iφ|α2|L𝒢I|β1|R𝒢Iφ|β2|R𝒢I|(modp)|\varphi/_{\bumpeq_{I}}|\equiv\alpha_{1}^{|L_{\mathcal{G}}\cap I_{\varphi}|}\;\;\alpha_{2}^{|L_{\mathcal{G}}-I|}\;\;\beta_{1}^{|R_{\mathcal{G}}\cap I_{\varphi}|}\;\;\beta_{2}^{|R_{\mathcal{G}}-I|}\pmod{p}.

Proof of Claim 3.

We find the number of homomorphisms φφ/I\varphi^{\prime}\in\varphi/_{\bumpeq_{I}}. The graph 𝒢\mathcal{G}^{\prime} consists of copies of (𝒦L(x),lx)(\mathcal{K}_{L}(x),l^{x}) and (𝒦R(y),ry)(\mathcal{K}_{R}(y),r^{y}). By Claim 2, and by (9) and (8)

|φ/I|\displaystyle|\varphi/_{\bumpeq_{I}}| =(xL𝒢Iφ𝗁𝗈𝗆((𝒦L(x),lx),(,A)))(xL𝒢Iφ𝗁𝗈𝗆((𝒦L(x),lx),(,C)))\displaystyle=\Big{(}\prod_{x\in L_{\mathcal{G}}\cap I_{\varphi}}\mathsf{hom}((\mathcal{K}_{L}(x),l^{x}),(\mathcal{H},A))\Big{)}\cdot\Big{(}\prod_{x\in L_{\mathcal{G}}-I_{\varphi}}\mathsf{hom}((\mathcal{K}_{L}(x),l^{x}),(\mathcal{H},C))\Big{)}
×(yR𝒢Iφ𝗁𝗈𝗆((𝒦R(y),rx),(,D)))(yR𝒢Iφ𝗁𝗈𝗆((𝒦R(y),rx),(,B)))\displaystyle\times\Big{(}\prod_{y\in R_{\mathcal{G}}\cap I_{\varphi}}\mathsf{hom}((\mathcal{K}_{R}(y),r^{x}),(\mathcal{H},D))\Big{)}\cdot\Big{(}\prod_{y\in R_{\mathcal{G}}-I_{\varphi}}\mathsf{hom}((\mathcal{K}_{R}(y),r^{x}),(\mathcal{H},B))\Big{)}
α1|L𝒢Iφ|α2|L𝒢Iφ|β1|R𝒢Iφ|β2|R𝒢Iφ|(modp)\displaystyle\equiv\alpha_{1}^{|L_{\mathcal{G}}\cap I_{\varphi}|}\;\;\alpha_{2}^{|L_{\mathcal{G}}-I_{\varphi}|}\;\;\beta_{1}^{|R_{\mathcal{G}}\cap I_{\varphi}|}\;\;\beta_{2}^{|R_{\mathcal{G}}-I_{\varphi}|}\pmod{p}

Assume that I\bumpeq_{I} has MM classes and φi\varphi_{i} is a representative of the ii-th class. Let NN^{\prime} be the number of homomorphisms φ\varphi such that φ(lx)AC\varphi(l^{x})\not\in A\cup C or φ(ry)BD\varphi(r^{y})\not\in B\cup D. Then

|𝖧𝗈𝗆(G,H)|=N+i=1M|φi/I|\displaystyle|\mathsf{Hom}(G^{\prime},H)|=N^{\prime}+\sum_{i=1}^{M}|\varphi_{i}/_{\bumpeq_{I}}| i=1Mα1|LGIφi|α2|LGIφi|β1|RGIφi|β2|RGIφi|\displaystyle\equiv\sum_{i=1}^{M}\alpha_{1}^{|L_{G}\cap I_{\varphi_{i}}|}\;\;\alpha_{2}^{|L_{G}-I_{\varphi_{i}}|}\;\;\beta_{1}^{|R_{G}\cap I_{\varphi_{i}}|}\;\;\beta_{2}^{|R_{G}-I_{\varphi_{i}}|}
N+I𝖨𝖲(G)α1|LGI|α2|LGI|β1|RGI|β2|RGI|\displaystyle\equiv N^{\prime}+\sum_{I\in\mathsf{IS}(G)}\alpha_{1}^{|L_{G}\cap I|}\;\;\alpha_{2}^{|L_{G}-I|}\;\;\beta_{1}^{|R_{G}\cap I|}\;\;\beta_{2}^{|R_{G}-I|}
N+α2|LG|β2|RR|I𝖨𝖲(G)α1|LGI|α2|LG|α2|LGI|β1|RGI|β2|RG|β2|RGI|\displaystyle\equiv N^{\prime}+\alpha_{2}^{|L_{G}|}\beta_{2}^{|R_{R}|}\sum_{I\in\mathsf{IS}(G)}\alpha_{1}^{|L_{G}\cap I|}\;\;\alpha_{2}^{-|L_{G}|}\alpha_{2}^{|L_{G}-I|}\;\;\beta_{1}^{|R_{G}\cap I|}\;\;\beta_{2}^{-|R_{G}|}\beta_{2}^{|R_{G}-I|}
N+α2|LG|β2|RR|I𝖨𝖲(G)(α1α21)|LGI|(β1β21)|RGI|\displaystyle\equiv N^{\prime}+\alpha_{2}^{|L_{G}|}\beta_{2}^{|R_{R}|}\sum_{I\in\mathsf{IS}(G)}(\alpha_{1}\alpha_{2}^{-1})^{|L_{G}\cap I|}\;\;(\beta_{1}\beta_{2}^{-1})^{|R_{G}\cap I|}
N+α2|LG|β2|RG|𝒵(α1α21),(β1β21)(G)(modp).\displaystyle\equiv N^{\prime}+\alpha_{2}^{|L_{G}|}\beta_{2}^{|R_{G}|}\mathcal{Z}_{(\alpha_{1}\alpha_{2}^{-1}),(\beta_{1}\beta_{2}^{-1})}(G)\pmod{p}.

Finally, by (9) N0(modp)N^{\prime}\equiv 0\pmod{p}. ∎

6.3 p>2p>2

We will consider squares of \mathcal{H}, and so Corollary 6.3 indicates that the cases p>2p>2 and p=2p=2 have to be considered separately. While Lemma 6.6 below holds for both cases, after it we split the proof into two parts. Let \mathcal{H} be as in Section 6.1. The goal is to prove the existence of a non-degenerate thick Z-subgraph of \mathcal{H}.

We start with showing that there exists a thick Z-subgraph of \mathcal{H} such that both parts of the bipartition are pp-subalgebras.

Lemma 6.6.

There are subsets A,CL,B,DRA,C\subseteq L_{\mathcal{H}},B,D\subseteq R_{\mathcal{H}} such that AC,BDA\cup C,B\cup D are pp-subalgebras of \mathcal{H} and the subgraph induced by ABCDA\cup B\cup C\cup D is a thick Z-graph. Moreover, AC,BDA\cup C,B\cup D are unions of RR-classes.

Proof.

We prove by induction on the number of vertices in \mathcal{H}. If |L|=|R|=2|L_{\mathcal{H}}|=|R_{\mathcal{H}}|=2, graph \mathcal{H} is either disconnected, or complete, or a Z-graph. Then it suffices to show that if \mathcal{H} is not complete or is a thick Z-graph, then there are LL,RRL^{\prime}\subseteq L_{\mathcal{H}},R^{\prime}\subseteq R_{\mathcal{H}} such that L,RL^{\prime},R^{\prime} are pp-subalgebras of \mathcal{H}, one of the inclusions is strict, and the subgraph induced by LRL^{\prime}\cup R^{\prime} is not complete. If a connected bipartite graph \mathcal{H} is not complete, then either it is a thick Z-graph, or there are v,wHv,w\in H (assume v,wLv,w\in L_{\mathcal{H}}) such that N(v)RN_{\mathcal{H}}(v)\neq R_{\mathcal{H}} and N(v)N(w)N(v)\emptyset\neq N_{\mathcal{H}}(v)\cap N_{\mathcal{H}}(w)\neq N_{\mathcal{H}}(v). Then R=N(v)R^{\prime}=N_{\mathcal{H}}(v), L=N(N(v))L^{\prime}=N_{\mathcal{H}}(N_{\mathcal{H}}(v)) are subalgebras of \mathcal{H} and the subgraph induced by LRL^{\prime}\cup R^{\prime} is not a complete bipartite graph. ∎

For the rest of Section 6.3 we assume p>2p>2.

Proposition 6.7.

\mathcal{H} contains a non-degenerate thick Z-subgraph.

Proof.

Let \mathcal{H}^{\prime} be the thick Z-subgraph found in Lemma 6.6. In particular, A,B,C,DA,B,C,D are such that AC,BDA\cup C,B\cup D are pp-subalgebras of \mathcal{H} and are unions of R-classes. We need to prove the existence of structures (𝒦L,x),(𝒦R,x)(\mathcal{K}_{L},x),(\mathcal{K}_{R},x) from the definition of non-degeneracy. We prove it for (𝒦L,x)(\mathcal{K}_{L},x), as for (𝒦R,x)(\mathcal{K}_{R},x) a proof is identical.

Set 𝒥=2\mathcal{J}=\mathcal{H}^{2}, M=(A×C)(C×A)M=(A\times C)\cup(C\times A), and M=(AC)×(AC)M^{\prime}=(A\cup C)\times(A\cup C). As we demonstrate in Claim 4, it suffices to show that for some (𝒢,x)(\mathcal{G},x) it holds that 𝗁𝗈𝗆((𝒢,x),(𝒥,M))0(modp)\mathsf{hom}((\mathcal{G},x),(\mathcal{J},M))\not\equiv 0\pmod{p}. Indeed, if this is the case, by Proposition 2.4 we would conclude that 2𝗁𝗈𝗆((𝒢,x),(,A)),2𝗁𝗈𝗆((𝒢,x),(,C))0(modp)2\mathsf{hom}((\mathcal{G},x),(\mathcal{H},A)),2\mathsf{hom}((\mathcal{G},x),(\mathcal{H},C))\not\equiv 0\pmod{p}, and (𝒦L,x)(\mathcal{K}_{L},x) with the required properties can be easily constructed from (𝒢,x)(\mathcal{G},x). 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 MM needs to be automorphism stable, and there must be no pp-automorphism φ\varphi of 𝒥\mathcal{J} such that φ(a)M\varphi(a)\in M for some aMa\in M. Unfortunately, 𝒥\mathcal{J} and MM do not satisfy any of these conditions. We will modify them to enforce the conditions.

Firstly, by Theorem 5.22, 𝒥,M\mathcal{J},M can be replaced by 𝒥~{\widetilde{\mathcal{J}}} and M~\widetilde{M}, respectively, obtained by reducing 𝒥\mathcal{J} using local pp-automorphisms, such that 𝒥/R=𝒥~/R\mathcal{J}/_{R}={\widetilde{\mathcal{J}}}/_{R}, M/R=M~/RM/_{R}=\widetilde{M}/_{R}. Moreover, for any (𝒢,x)(\mathcal{G},x)

𝗁𝗈𝗆((𝒢,x),(𝒥~,M~))𝗁𝗈𝗆((𝒢,x),(𝒥,M))(modp).\mathsf{hom}((\mathcal{G},x),({\widetilde{\mathcal{J}}},{\widetilde{M}}))\equiv\mathsf{hom}((\mathcal{G},x),(\mathcal{J},M))\pmod{p}.

Claim 1. 𝒥~{\widetilde{\mathcal{J}}} is pp-rigid.

Proof of Claim X..

By Corollary 6.3 every pp-automorphism of 𝒥\mathcal{J} is local. As 𝒥~/R=𝒥/R{\widetilde{\mathcal{J}}}/_{R}=\mathcal{J}/_{R} the same holds for 𝒥~{\widetilde{\mathcal{J}}}. By the construction 𝒥~{\widetilde{\mathcal{J}}} does not have local pp-automorphisms. The claim follows. ∎

Claim 2. The set M~{\widetilde{M}} is automorphism stable for 𝒥~{\widetilde{\mathcal{J}}}.

Proof of Claim Y..

We need to show that for some aM~a\in{\widetilde{M}}, 𝖲𝗍𝖺𝖻(a,M~)\mathsf{Stab}(a,{\widetilde{M}}) is a subgroup of 𝖠𝗎𝗍(𝒥~)\mathsf{Aut}({\widetilde{\mathcal{J}}}). In fact we show that for any aM~a\in{\widetilde{M}}, 𝖲𝗍𝖺𝖻(a,M~)=𝖠𝗎𝗍(𝒥~)\mathsf{Stab}(a,{\widetilde{M}})=\mathsf{Aut}({\widetilde{\mathcal{J}}}). In order to do that it suffices to proof that for any φ𝖠𝗎𝗍(𝒥~)\varphi\in\mathsf{Aut}({\widetilde{\mathcal{J}}}) it holds φ(a)M~\varphi(a)\in{\widetilde{M}}.

We first show that no element of M~{\widetilde{M}} is isomorphic to an element of M~M~{\widetilde{M}}^{\prime}-{\widetilde{M}}. Clearly, for every automorphism of 𝒥~/R{\widetilde{\mathcal{J}}}/_{R} and every yM~/Ry\in{\widetilde{M}}^{\prime}/_{R} the degree of vv in (BD)2/R(B\cup D)^{2}/_{R} and that of φ(y)\varphi(y) are equal. As is easily seen, this degree of yM~/Ry\in{\widetilde{M}}/_{R} equals |D/R|(|B/R|+|D/R|)|D/_{R}|\cdot(|B/_{R}|+|D/_{R}|), while for yA/R×A/Ry\in A/_{R}\times A/_{R} and yC/R×C/Ry\in C/_{R}\times C/_{R} it is |D/R|2|D/_{R}|^{2} and (|B/R|+|D/R|)2(|B/_{R}|+|D/_{R}|)^{2}, respectively. It remains to recall that if any xM~x\in{\widetilde{M}} is isomorphic to yM~M~y\in{\widetilde{M}}^{\prime}-{\widetilde{M}}, then x/Rx/_{R} is isomorphic to y/Ry/_{R}.

Next, as is easily seen, M~{\widetilde{M}}^{\prime} is a pp-subalgebra of 𝒥~{\widetilde{\mathcal{J}}}. Indeed, since ACA\cup C is a pp-subalgebra of \mathcal{H}, there is (𝒢,x)(\mathcal{G},x) such that 𝗁𝗈𝗆((𝒢,x),(,a))0(modp)\mathsf{hom}((\mathcal{G},x),(\mathcal{H},a))\not\equiv 0\pmod{p} if and only if aACa\in A\cup C. Then by Proposition 2.4(2) the same (𝒢,x)(\mathcal{G},x) witnesses that MM^{\prime} is a pp-subalgebra of 𝒥\mathcal{J}. Finally, for any aM~a\in\widetilde{M}^{\prime} it holds

𝗁𝗈𝗆((𝒢,x),(𝒥~,a))𝗁𝗈𝗆((𝒢,x),(𝒥,a))(modp),\mathsf{hom}((\mathcal{G},x),({\widetilde{\mathcal{J}}},a))\equiv\mathsf{hom}((\mathcal{G},x),(\mathcal{J},a))\pmod{p},

and so 𝗁𝗈𝗆((𝒢,x),(𝒥~,a))0(modp)\mathsf{hom}((\mathcal{G},x),({\widetilde{\mathcal{J}}},a))\not\equiv 0\pmod{p} if and only if aM~a\in{\widetilde{M}}^{\prime}.

That M~{\widetilde{M}}^{\prime} is a pp subalgebra means that for no bM~b\in{\widetilde{M}}^{\prime} and no φ𝖠𝗎𝗍(𝒥~)\varphi\in\mathsf{Aut}({\widetilde{\mathcal{J}}}), φ(b)M~\varphi(b)\not\in{\widetilde{M}}^{\prime}. Claim 2 follows. ∎

Claim 3. M~{\widetilde{M}} is a union of RR-classes.

Proof of Claim 3..

By the proof of Claim 2, for any aM~a\in{\widetilde{M}} and φ𝖠𝗎𝗍(𝒥~)\varphi\in\mathsf{Aut}({\widetilde{\mathcal{J}}}), φ(a)M~\varphi(a)\in{\widetilde{M}}. On the other hand, if bRabRa then the mapping that swaps a,ba,b leaving all the other vertices in place is an automorphism of 𝒥~{\widetilde{\mathcal{J}}}. ∎

Claim 4. For any (𝒢,x)(\mathcal{G},x), 𝗁𝗈𝗆((𝒢,x),(𝒥~,M~))=2𝗁𝗈𝗆((𝒢,x),(,A))𝗁𝗈𝗆((𝒢,x),(,C))\mathsf{hom}((\mathcal{G},x),({\widetilde{\mathcal{J}}},\widetilde{M}))=2\mathsf{hom}((\mathcal{G},x),(\mathcal{H},A))\cdot\mathsf{hom}((\mathcal{G},x),(\mathcal{H},C)).

Proof of Claim 3.

By Theorem 5.22 it suffices to prove the claim for 𝒥\mathcal{J} and MM. By Proposition 2.4 every homomorphism φ:𝒢𝒥\varphi:\mathcal{G}\to\mathcal{J} can be represented as φ(y)=(φ1(y),φ2(y))\varphi(y)=(\varphi_{1}(y),\varphi_{2}(y)), where φ1,φ2\varphi_{1},\varphi_{2} are homomorphisms 𝒢\mathcal{G}\to\mathcal{H}. Conversely, if φ1,φ2:𝒢\varphi_{1},\varphi_{2}:\mathcal{G}\to\mathcal{H} are homomorphisms, then the mapping given by φ(y)=(φ1(y),φ2(y)\varphi(y)=(\varphi_{1}(y),\varphi_{2}(y) is a homomorphism from 𝒢\mathcal{G} to 𝒥\mathcal{J}. Finally, φ(x)M\varphi(x)\in M if and only if φ1(x)A,φ2(x)C\varphi_{1}(x)\in A,\varphi_{2}(x)\in C or φ1(x)C,φ2(x)A\varphi_{1}(x)\in C,\varphi_{2}(x)\in A. Since swapping coordinates of 𝒥\mathcal{J} is an automorphism of 𝒦\mathcal{K} the number of homomorphisms of the two kinds is the same. ∎

By Lemma 3.2(1) there is (𝒢,x)(\mathcal{G},x) such that 𝗁𝗈𝗆((𝒢,x),(𝒥~,M~))0(modp)\mathsf{hom}((\mathcal{G},x),({\widetilde{\mathcal{J}}},{\widetilde{M}}))\not\equiv 0\pmod{p}. Then by Claim 3 we also have 𝗁𝗈𝗆((𝒢,x),(,A)),𝗁𝗈𝗆((𝒢,x),(,C))0(modp)\mathsf{hom}((\mathcal{G},x),(\mathcal{H},A)),\mathsf{hom}((\mathcal{G},x),(\mathcal{H},C))\not\equiv 0\pmod{p}. To obtain a required gadget (𝒦L,x)(\mathcal{K}_{L},x) we need to ensure that 𝗁𝗈𝗆((𝒦L,x),(,a))0(modp)\mathsf{hom}((\mathcal{K}_{L},x),(\mathcal{H},a))\equiv 0\pmod{p} whenever aACa\not\in A\cup C. Since ACA\cup C is a pp-subalgebra, there is (𝒢,x)(\mathcal{G}^{\prime},x) such that 𝗁𝗈𝗆((𝒢,x),(,a))1(modp)\mathsf{hom}((\mathcal{G}^{\prime},x),(\mathcal{H},a))\equiv 1\pmod{p} whenever aACa\in A\cup C, and 𝗁𝗈𝗆((𝒢,x),(,a))0(modp)\mathsf{hom}((\mathcal{G}^{\prime},x),(\mathcal{H},a))\equiv 0\pmod{p} otherwise. The structure (𝒦L,x)=(𝒢,x)(𝒢,x)(\mathcal{K}_{L},x)=(\mathcal{G},x)\odot(\mathcal{G}^{\prime},x) satisfies the required conditions. ∎

6.4 p=2p=2

In this subsection we assume p=2p=2 and \mathcal{H} is as in Section 6.1. Note that, as the underlying bipartite graph of \mathcal{H} is 2-rigid, \mathcal{H} is R-thin and in any prime factorization \mathcal{H} all the factors are pairwise non-isomorphic. The goal is again to prove the existence of a non-degenerate thick Z-subgraph of \mathcal{H}. By Lemma 6.6 \mathcal{H} has a thick induced Z-subgraph \mathcal{H}^{\prime}. Let the parts of \mathcal{H}^{\prime} are A,B,C,DA,B,C,D as before. We only give a proof for A,CA,C and (𝒦L,x)(\mathcal{K}_{L},x), as the proof for B,D,(𝒦R,x)B,D,(\mathcal{K}_{R},x) is identical.

Let =1K\mathcal{H}=\mathcal{H}_{1}\diamond\dots\diamond\mathcal{H}_{K} be a prime factorization of \mathcal{H}. By Proposition 6.2 every automorphism φ\varphi of 2\mathcal{H}^{2} has the form

φ(a1,1,,a1,k,a2,1,,a2,k)=(aπ1(1),1,,aπk(1),k,aπ1(2),1,,aπk(2),k).\varphi(a_{1,1},\dots,a_{1,k},a_{2,1},\dots,a_{2,k})=(a_{\pi_{1}(1),1},\dots,a_{\pi_{k}(1),k},a_{\pi_{1}(2),1},\dots,a_{\pi_{k}(2),k}).

where (ai,1,,ai,k)(a_{i,1},\dots,a_{i,k}) is an element of the iith copy of \mathcal{H} and π1,,πk\pi_{1},\dots,\pi_{k} are permutations of [2][2], that is, either identity mappings or involutions. Let Iφ={i[k]πi is an involution}I_{\varphi}=\{i\in[k]\mid\pi_{i}\text{ is an involution}\}.

We plan to use Lemma 3.2(1), and for that we need to find a 𝐚=(a1,,ak,c1,,ck)A×C\mathbf{a}=(a_{1},\dots,a_{k},c_{1},\dots,c_{k})\in A\times C such that 𝖲𝗍𝖺𝖻(𝐚,A×C)\mathsf{Stab}(\mathbf{a},A\times C) is as small as possible. Suppose for some 𝐚A×C\mathbf{a}\in A\times C and an automorphism φ\varphi of 2\mathcal{H}^{2} we have φ(𝐚)A×C\varphi(\mathbf{a})\in A\times C. If φ\varphi is not an identity mapping, IφI_{\varphi}\neq\emptyset. Choose 𝐚\mathbf{a} and φ\varphi such that IφI_{\varphi} is maximal possible. Without loss of generality, Iφ=[s]I_{\varphi}=[s], that is,

φ(a1,1,,a1,k,a2,1,,a2,k)=(a2,1,,a2,s,a1,s+1,,a1,k,a1,1,,a1,s,a2,s+1,,a2,k).\varphi(a_{1,1},\dots,a_{1,k},a_{2,1},\dots,a_{2,k})=(a_{2,1},\dots,a_{2,s},a_{1,s+1},\dots,a_{1,k},a_{1,1},\dots,a_{1,s},a_{2,s+1},\dots,a_{2,k}).

Note that Iφ[k]I_{\varphi}\neq[k], because in this case (a1,,ak)AC(a_{1},\dots,a_{k})\in A\cap C, which is impossible, as AA and CC are disjoint.

By the choice of 𝐚,φ\mathbf{a},\varphi we have (c1,,cs,as+1,,ak)A(c_{1},\dots,c_{s},a_{s+1},\dots,a_{k})\in A and (a1,,as,cs+1,,ck)C(a_{1},\dots,a_{s},c_{s+1},\dots,c_{k})\in C. Therefore, 𝐛=(c1,,cs,as+1,,ak,c1,,cs,cs+1,,ck)A×C\mathbf{b}=(c_{1},\dots,c_{s},a_{s+1},\dots,a_{k},c_{1},\dots,c_{s},c_{s+1},\dots,c_{k})\in A\times C is a fixed point of φ\varphi. Let ¯2\bar{\mathcal{H}}^{2} denote the structure 2\mathcal{H}^{2} reduced using the automorphism φ\varphi. In other words, ¯2\bar{\mathcal{H}}^{2} is the induced structure on the set S={(a1,1,,a1,k,a2,1,,a2,k)2a1,i=a2,i,i[s]}S=\{(a_{1,1},\dots,a_{1,k},a_{2,1},\dots,a_{2,k})\in\mathcal{H}^{2}\mid a_{1,i}=a_{2,i},\ i\in[s]\}. Also, let M=(A×C)SM=(A\times C)\cap S. Note that MM\neq\emptyset because 𝐛M\mathbf{b}\in M.

Lemma 6.8.

For any 𝐜M\mathbf{c}\in M, the only automorphism ψ\psi of ¯2\bar{\mathcal{H}}^{2} such that ψ(𝐜)M\psi(\mathbf{c})\in M is the identity mapping.

Proof.

Any nontrivial homomorphism ψ\psi of 2\mathcal{H}^{2} has the form

ψ(a1,1,,a1,k,a2,1,,a2,k)=(aπ1(1),1,,aπk(1),k,aπ1(2),1,,aπk(2),k).\psi(a_{1,1},\dots,a_{1,k},a_{2,1},\dots,a_{2,k})=(a_{\pi_{1}(1),1},\dots,a_{\pi_{k}(1),k},a_{\pi_{1}(2),1},\dots,a_{\pi_{k}(2),k}).

Suppose that πi\pi_{i} is an involution for some i{s+1,,k}i\in\{s+1,\dots,k\} and there is 𝐜M\mathbf{c}\in M such that ψ(𝐜)M\psi(\mathbf{c})\in M. But then for the automorphism ψ\psi^{\prime} of 2\mathcal{H}^{2} given by

ψ(a1,1,,a1,k,a2,1,,a2,k)=(aπ1(1),1,,aπk(1),k,aπ1(2),1,,aπk(2),k),\psi^{\prime}(a_{1,1},\dots,a_{1,k},a_{2,1},\dots,a_{2,k})=(a_{\pi^{\prime}_{1}(1),1},\dots,a_{\pi^{\prime}_{k}(1),k},a_{\pi^{\prime}_{1}(2),1},\dots,a_{\pi^{\prime}_{k}(2),k}),

where π1,,πs\pi^{\prime}_{1},\dots,\pi^{\prime}_{s} are involutions and πi=πi\pi^{\prime}_{i}=\pi_{i} for i{s+1,,k}i\in\{s+1,\dots,k\} we have ψ(𝐜)A×C\psi^{\prime}(\mathbf{c})\in A\times C. Since IφIψI_{\varphi}\subset I_{\psi^{\prime}} we get a contradiction with the choice of 𝐚,φ\mathbf{a},\varphi. ∎

Lemma 6.8 implies that 𝖲𝗍𝖺𝖻(𝐜,M)\mathsf{Stab}(\mathbf{c},M) contains only the identity mapping, and therefore is a subgroup of 𝖠𝗎𝗍(¯2)\mathsf{Aut}(\bar{\mathcal{H}}^{2}). Therefore MM is automorphism stable. By Lemma 3.2(1) there is (𝒢,x)(\mathcal{G},x) such that 𝗁𝗈𝗆((𝒢,x),(¯2,M))1(mod2)\mathsf{hom}((\mathcal{G},x),(\bar{\mathcal{H}}^{2},M))\equiv 1\pmod{2}. Therefore

1𝗁𝗈𝗆((𝒢,x),(¯2,M))𝗁𝗈𝗆((𝒢,x),(2,A×C))=𝗁𝗈𝗆((𝒢,x),(,A))𝗁𝗈𝗆((𝒢,x),(,C)).1\equiv\mathsf{hom}((\mathcal{G},x),(\bar{\mathcal{H}}^{2},M))\equiv\mathsf{hom}((\mathcal{G},x),(\mathcal{H}^{2},A\times C))=\mathsf{hom}((\mathcal{G},x),(\mathcal{H},A))\cdot\mathsf{hom}((\mathcal{G},x),(\mathcal{H},C)).

Since ACA\cup C is a 2-subalgebra we obtain a structure (𝒦L,x)(\mathcal{K}_{L},x) 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 (GH)/RG/RH/R(G\diamond H)/_{R}\cong G/_{R}\diamond H/_{R}, and ψ:(GH)/RG/RH/R\psi:(G\diamond H)/_{R}\rightarrow G/_{R}\diamond H/_{R} with ψ([x,y])=([x],[y])\psi([x,y])=([x],[y]) is an isomorphism. Also [(x,y)]=[x]×[y][(x,y)]=[x]\times[y].

Proof.

Consider a vertex [(x,y)][(x,y)] of (GH)/R(G\diamond H)/_{R}, By Remark 5.7, we have

(x,y)[(x,y)]\displaystyle(x^{\prime},y^{\prime})\in[(x,y)] NGH((x,y))=NGH((x,y))\displaystyle\Leftrightarrow N_{G\diamond H}((x^{\prime},y^{\prime}))=N_{G\diamond H}((x,y))
NG(x)×NH(y)=NG(x)×NH(y)\displaystyle\Leftrightarrow N_{G}(x^{\prime})\times N_{H}(y^{\prime})=N_{G}(x)\times N_{H}(y)
NG(x)=NG(x) and NH(y)=NH(y)\displaystyle\Leftrightarrow N_{G}(x^{\prime})=N_{G}(x)\mbox{ and }N_{H}(y^{\prime})=N_{H}(y)
x[x] and y[y]\displaystyle\Leftrightarrow x^{\prime}\in[x]\mbox{ and }y^{\prime}\in[y]
(x,y)[x]×[y].\displaystyle\Leftrightarrow(x^{\prime},y^{\prime})\in[x]\times[y].

Thus [(x,y)]=[x]×[y][(x,y)]=[x]\times[y]. To complete the proof, we show that ψ([(x,y)])=([x],[y])\psi([(x,y)])=([x],[y]) is an isomorphism. Using the fact that x,yE(G)\left\langle x,y\right\rangle\in E(G) if and only if [x][y]E(G/R)[x][y]\in E(G/_{R}):

[(x,y)],[(x,y)]E((GH)/R)\displaystyle\left\langle[(x,y)],[(x^{\prime},y^{\prime})]\right\rangle\in E((G\diamond H)/_{R}) (x,y),(x,y)E(GH)\displaystyle\Leftrightarrow\left\langle(x,y),(x^{\prime},y^{\prime})\right\rangle\in E(G\diamond H)
x,xE(G) and y,yE(H)\displaystyle\Leftrightarrow\left\langle x,x^{\prime}\right\rangle\in E(G)\mbox{ and }\left\langle y,y^{\prime}\right\rangle\in E(H)
[x],[x]E(G/R) and [y],[y]E(H/R)\displaystyle\Leftrightarrow\left\langle[x],[x^{\prime}]\right\rangle\in E(G/_{R})\mbox{ and }\left\langle[y],[y^{\prime}]\right\rangle\in E(H/_{R})
[(x,y)],[(x,y)]E((GH)/R)\displaystyle\Leftrightarrow\left\langle[(x,y)],[(x^{\prime},y^{\prime})]\right\rangle\in E((G\diamond H)/_{R})

7.2 A proof of Proposition 5.14

Proposition 7.2 (Proposition 5.14).

If A,BA,B are RR-thin graphs without isolated vertices, then

S(AB)={SL(A)SL(B)+SR(A)SR(B)if A,B are bipartiteSL(A)S(B)+SR(A)S(B)if A is bipartite and B is non-bipartiteS(A)SL(B)+S(A)SR(B)if B is bipartite and A is non-bipartiteS(A)S(B)if G,H are non-bipartiteS(A\diamond B)=\left\{\begin{array}[]{cl}S_{L}(A)\;\small\Box\;S_{L}(B)+S_{R}(A)\;\small\Box\;S_{R}(B)&\mbox{if }A,B\mbox{ are bipartite}\\ S_{L}(A)\;\small\Box\;S(B)+S_{R}(A)\;\small\Box\;S(B)&\mbox{if }A\mbox{ is bipartite and }B\mbox{ is non-bipartite}\\ S(A)\;\small\Box\;S_{L}(B)+S(A)\;\small\Box\;S_{R}(B)&\mbox{if }B\mbox{ is bipartite and }A\mbox{ is non-bipartite}\\ S(A)\;\small\Box\;S(B)&\mbox{if }G,H\mbox{ are non-bipartite}\end{array}\right.
Proof.

The case when AA and BB are non-bipartite is proved in Proposition 8.15 [HIK11]. We prove Proposition 5.14 for the following two cases:

  1. (i)

    AA is bipartite and BB is non-bipartite,

  2. (ii)

    AA and BB are bipartite.

Consider Case (i). As is easily seen, S(AB)S(A\diamond B) is bipartite. We prove that the LS(AB)L_{S(A\diamond B)} is equal to SL(A)S(B)S_{L}(A)\;\small\Box\;S(B). The proof for the right part is similar.

First, we show SL(A)S(B)LS(AB)S_{L}(A)\;\small\Box\;S(B)\subseteq L_{S(A\diamond B)}. Take an edge in E(SL(A)S(B))E(S_{L}(A)\;\small\Box\;S(B)), say (a,b),(a,b)\left\langle(a,b),(a^{\prime},b)\right\rangle with a,aSL(A)\left\langle a,a^{\prime}\right\rangle\in S_{L}(A). We must show that (a,b),(a,b)\left\langle(a,b),(a^{\prime},b)\right\rangle is not dispensable in (AB)s(A\diamond B)^{s}. Suppose it is. Then there would be a vertex z=(c,c′′)z=(c^{\prime},c^{\prime\prime}) in G=LABG=L_{A\diamond B} such that the dispensability conditions (1) and (2) hold for x=(a,b),y=(a,b)x=(a,b),y=(a^{\prime},b), and z=(c,c′′)z=(c^{\prime},c^{\prime\prime}). The various cases are considered below. Each leads to a contradiction.

Suppose NG(x)NG(z)NG(y)N_{G}(x)\subset N_{G}(z)\subset N_{G}(y). This means NA(a)×NB(b)NA(c)×NB(c′′)NA(a)×NB(b)N_{A}(a)\times N_{B}(b)\subset N_{A}(c^{\prime})\times N_{B}(c^{\prime\prime})\subset N_{A}(a^{\prime})\times N_{B}(b), so NB(c′′)=NB(b)N_{B}(c^{\prime\prime})=N_{B}(b). Then the fact that NB(b)N_{B}(b)\neq\emptyset permits cancellation of the common factor NB(b)N_{B}(b), so NA(a)NA(c)NA(a)N_{A}(a)\subset N_{A}(c^{\prime})\subset N_{A}(a^{\prime}), and a,a\left\langle a,a^{\prime}\right\rangle in LAsL_{A^{s}} is dispensable. We will reach the same contradiction if NG(y)NG(z)NG(x)N_{G}(y)\subset N_{G}(z)\subset N_{G}(x).

Finally, suppose there is a z=(c,c′′)z=(c^{\prime},c^{\prime\prime}) for which both NG(x)NG(y)NG(x)NG(z)N_{G}(x)\cap N_{G}(y)\subset N_{G}(x)\cap N_{G}(z) and NG(y)NG(x)NG(y)NG(z)N_{G}(y)\cap N_{G}(x)\subset N_{G}(y)\cap N_{G}(z). Rewrite this as

NG((a,b))NG((a,b))\displaystyle N_{G}((a,b))\cap N_{G}((a^{\prime},b)) NG((a,b))NG((c,c′′))\displaystyle\subset N_{G}((a,b))\cap N_{G}((c^{\prime},c^{\prime\prime}))
NG((a,b))NG((a,b))\displaystyle N_{G}((a^{\prime},b))\cap N_{G}((a,b)) NG((a,b))NG((c,c′′)),\displaystyle\subset N_{G}((a^{\prime},b))\cap N_{G}((c^{\prime},c^{\prime\prime})),

which is the same as

(NA(a)NA(a))×NB(b)\displaystyle(N_{A}(a)\cap N_{A}(a^{\prime}))\times N_{B}(b) (NA(a)NA(c))×(NB(b)NB(c′′))\displaystyle\subset(N_{A}(a)\cap N_{A}(c^{\prime}))\times(N_{B}(b)\cap N_{B}(c^{\prime\prime}))
(NA(a)NA(a))×NB(b)\displaystyle(N_{A}(a^{\prime})\cap N_{A}(a))\times N_{B}(b) (NA(a)NA(c))×(NB(b)NB(c′′))\displaystyle\subset(N_{A}(a^{\prime})\cap N_{A}(c^{\prime}))\times(N_{B}(b)\cap N_{B}(c^{\prime\prime}))

Thus NB(b)NB(b)NB(c′′)N_{B}(b)\subset N_{B}(b)\cap N_{B}(c^{\prime\prime}), so NB(B)=NB(b)NB(c′′)N_{B}(B)=N_{B}(b)\cap N_{B}(c^{\prime\prime}), whence

NA(a)NA(a)\displaystyle N_{A}(a)\cap N_{A}(a^{\prime}) NA(a)NA(c)\displaystyle\subset N_{A}(a)\cap N_{A}(c^{\prime})
NA(a)NA(a)\displaystyle N_{A}(a^{\prime})\cap N_{A}(a^{\prime}) NA(a)NA(c)\displaystyle\subset N_{A}(a^{\prime})\cap N_{A}(c^{\prime})

Thus a,a\left\langle a,a^{\prime}\right\rangle in LAsL_{A^{s}} is dispensable, a contradiction.

Note that the proof for the Case (ii). where we need to prove that SL(A)SL(B)LS(AB)S_{L}(A)\;\small\Box\;S_{L}(B)\subseteq L_{S(A\diamond B)} is exactly the same.

We now show LS(AB)SL(A)S(B)L_{S(A\diamond B)}\subseteq S_{L}(A)\;\small\Box\;S(B), considering Case (i). By Lemma 5.13, all edges of LS(AB)L_{S(A\diamond B)} are Cartesian, so we just need to show that (a,b),(a,b)E(LS(AB))\left\langle(a,b),(a^{\prime},b)\right\rangle\in E(L_{S(A\diamond B)}) implies a,aE(S(A))\left\langle a,a^{\prime}\right\rangle\in E(S(A)) (The same argument will work for edges of form (a,b),(a,b)\left\langle(a,b),(a,b^{\prime})\right\rangle).

Suppose for the sake of contradiction that(a,b),(a,b)E(LS(AB))\left\langle(a,b),(a^{\prime},b)\right\rangle\in E(L_{S(A\diamond B)}), but a,aE(S(A))\left\langle a,a^{\prime}\right\rangle\not\in E(S(A)), Thus a,a\left\langle a,a^{\prime}\right\rangle is dispensable in LAsL_{A^{s}}, so there is a cV(A)c\in V(A) for which both of the following conditions hold:

  • 1.

    NA(a)NA(a)NA(a)NA(c)N_{A}(a)\cap N_{A}(a^{\prime})\subset N_{A}(a)\cap N_{A}(c) or NA(a)NA(c)NA(a)N_{A}(a)\subset N_{A}(c)\subset N_{A}(a^{\prime}),

  • 2.

    NA(a)NA(a)NA(a)NA(c)N_{A}(a^{\prime})\cap N_{A}(a)\subset N_{A}(a^{\prime})\cap N_{A}(c) or NA(a)NA(c)NA(a)N_{A}(a^{\prime})\subset N_{A}(c)\subset N_{A}(a),

There are no isolated vertices, so NB(d)N_{B}(d)\neq\emptyset. Now, we can multiply each neighborhood NA(x)N_{A}(x) in Condition 1 and 2 by NB(d)N_{B}(d) on the right and still preserve the proper inclusions. Then the fact that N(AB)((a,b))=NA(a)×NB(b)N_{(A\diamond B)}((a,b))=N_{A}(a)\times N_{B}(b) (where AA is bipartite and BB is non-bipartite) yields the dispensability conditions (1) and (2), where x=(a,b)x=(a,b) and y=(a,b)y=(a^{\prime},b) and z=(c,b)z=(c,b). Thus (a,b),(a,b)E(LS(AB))\left\langle(a,b),(a^{\prime},b)\right\rangle\in E(L_{S(A\diamond B)}), a contradiction. Considering Case (ii). we only have the equation N(AB)((a,b))=NA(a)×NB(b)N_{(A\diamond B)}((a,b))=N_{A}(a)\times N_{B}(b) when aLAa\in L_{A} and bLBb\in L_{B}, therefore what we will get is again (a,b),(a,b)E(LS(AB))\left\langle(a,b),(a^{\prime},b)\right\rangle\in E(L_{S(A\diamond B)}), 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 k4k_{4}-minor-free graphs, modulo 2. CoRR, abs/2006.16632, 2020.
  • [FGRZ21] Jacob Focke, Leslie Ann Goldberg, Marc Roth, and Stanislav Zivný. Counting homomorphisms to k4k_{4}-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.