Abstract 1 Introduction 2 Structures, Homomorphisms, Polymorphisms 3 Polymorphism Conditions 4 The Promise Metaproblem 5 Connection with the Uniform CSP 6 Coset-Generating Polymorphisms 7 NP-Hardness of Detecting Heap Polymorphisms 8 Abelian Heap Polymorphisms 9 Conclusion and Open Problems References Appendix A Proof of Lemma 16

The Complexity of Finding Coset-Generating Polymorphisms and the Promise Metaproblem

Manuel Bodirsky ORCID Institut für Algebra, TU Dresden, Germany    Armin Weiß ORCID FMI, University of Stuttgart, Germany
Abstract

We show that the metaproblem for coset-generating polymorphisms is 𝖭𝖯-complete, answering a question of Chen and Larose: given a finite structure, the computational question is whether this structure has a polymorphism of the form (x,y,z)xy1z with respect to some group; such operations are also called coset-generating, or heaps.

Furthermore, we introduce a promise version of the metaproblem, parametrised by two polymorphism conditions Σ1 and Σ2 and defined analogously to the promise constraint satisfaction problem. We give sufficient conditions under which the promise metaproblem for (Σ1,Σ2) is in 𝖯 and under which it is 𝖭𝖯-hard. In particular, the promise metaproblem is in 𝖯 if Σ1 states the existence of a Maltsev polymorphism and Σ2 states the existence of an abelian heap polymorphism – despite the fact that neither the metaproblem for Σ1 nor the metaproblem for Σ2 is known to be in 𝖯. We also show that the creation-metaproblem for Maltsev polymorphisms, under the promise that a heap polymorphism exists, is in 𝖯 if and only if there is a uniform polynomial-time algorithm for CSPs with a heap polymorphism.

Keywords and phrases:
constraint satisfaction problem, coset-generating polymorphisms, metaproblem, heap, abelian heap, uniform polynomial-time algorithm, 𝖭𝖯-hardness
Category:
Track B: Automata, Logic, Semantics, and Theory of Programming
Funding:
Manuel Bodirsky: Received funding from the ERC (Grant Agreement no. 101071674, POCOCOP). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency.
Armin Weiß: Supported by the German Research Foundation (DFG) grant WE 6835/1-2.
Copyright and License:
[Uncaptioned image] © Manuel Bodirsky and Armin Weiß; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation
Related Version:
Previous Version: https://arxiv.org/abs/2602.00778
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

After the resolution of the finite-domain constraint satisfaction problem (CSP) dichotomy conjecture [32] (announced independently by Bulatov [12] and by Zhuk [34]), one of the central open problems in the area is whether there exists a uniform polynomial-time algorithm for tractable CSPs, i.e., an algorithm that decides in polynomial time whether there exists a homomorphism from a given relational structure 𝔄 to a given relational structure 𝔅, under the assumption that CSP(𝔅) is in 𝖯. Here the structures are given by lists of tuples, that is, one list of tuples for each of the relations. Neither Bulatov’s nor Zhuk’s algorithm runs uniformly in polynomial time, because the running time of these algorithms depends superpolynomially on the size of the input structure 𝔅.

The existence of a uniform polynomial-time algorithm for tractable CSPs is already open under the much stronger assumption that the given structure 𝔅 has a Maltsev polymorphism, i.e., a polymorphism m:B3B satisfying m(x,x,y)=m(y,x,x)=y for all x,yB. An important source of such operations are groups as the operation (x,y,z)xy1z with respect to some group satisfies these identities; such operations have been called coset-generating polymorphisms (terminology used in [15]; for the motivation for this name, see Lemma 9), which are also called heaps (see Section 6). For structures 𝔅 with a Maltsev polymorphism, the polynomial-time tractability of CSP(𝔅) has been shown prior to [12, 34] and with a simpler algorithm (Bulatov and Dalmau [14]). But again, this algorithm is not a uniform polynomial-time algorithm. Nevertheless, the algorithm of Bulatov and Dalmau is semiuniform in the sense that, if the algorithm is not only given 𝔅 but also a Maltsev polymorphism of 𝔅, then it can answer the question whether there exists a homomorphism from 𝔄 to 𝔅 in polynomial time.111Also the polynomial-time algorithms of Zhuk and of Bulatov are semiuniform; instead of a Maltsev polymorphism, they work if a so-called weak near unanimity polymorphism of 𝔅 is part of the input. Chen and Larose [15] pointed out that a uniform polynomial-time algorithm for constraints with a Maltsev polymorphism would thus follow from the existence of a polynomial-time algorithm that takes a structure 𝔅 as input and computes a Maltsev polymorphism of 𝔅; this problem is called the creation-metaproblem (or creation-metaquestion, see [15]) for Maltsev polymorphisms. Conversely, if there exists a uniform polynomial-time algorithm for structures 𝔅 with a Maltsev polymorphism, then the creation-metaproblem for Maltsev polymorphisms is in 𝖯 (a consequence of Theorem 4.7 in [15]; we use 𝖯 also for function-𝖯).

Some of the recently proposed candidates for a uniform polynomial-time algorithm for tractable CSPs were refuted using structures with a coset-generating polymorphism: Datalog reductions to systems of linear equations over (a method proposed in [17]) fail to solve the CSP for a structure with the coset-generating polymorphism for the symmetric group S18 [25], and singleton BLP+AIP fails to solve the CSP for a structure with the coset-generating polymorphism for the dihedral group D8 [33]. It is thus natural to determine the complexity of the creation-metaproblem for coset-generating polymorphisms (i.e., heaps) instead of Maltsev polymorphisms and the corresponding decision problem, which is simply called the metaproblem (or metaquestion). For the latter, the task is to decide whether the polymorphisms of a given finite structure 𝔅 (where the relations are given explicitly by lists of tuples) satisfy a certain polymorphism condition such as having a Maltsev polymorphism, or having a coset-generating polymorphism. And indeed, Chen and Larose [15, Section 8] ask: “Can anything be said about the complexity of deciding the presence of a coset-generating polymorphism?”. In this article we prove (in Section 7) that deciding whether a given structure has a coset-generating polymorphism is an 𝖭𝖯-complete problem, thus answering the question of Chen and Larose.

Theorem 1.

The following problem is 𝖭𝖯-complete:

Input: A finite structure 𝔅.
Question: Does 𝔅 have a coset-generating polymorphism?

While this does not rule out the existence of a uniform polynomial-time algorithm for CSPs with coset-generating polymorphisms, it shows that such a possible algorithm cannot use the approach to first compute the coset-generating polymorphism and then use Bulatov and Dalmau’s semiuniform algorithm [14].

One might ask whether the 𝖭𝖯-hardness result in Theorem 1 still holds for coset-generating polymorphisms with respect to restricted classes of groups. Indeed, our proof only uses groups of order 4p for p5 prime – which, in particular, are all metabelian and, indeed, have an abelian normal subgroup of index 4.

Coset-generating operations f that come from abelian groups are called abelian heaps. If 𝔅 has a polymorphism that is an abelian heap, then a uniform polynomial-time algorithm is known (based on affine integer programming (AIP) introduced in [7]). We show that this algorithm can be used to compute in polynomial time for a given finite structure 𝔅 a Maltsev polymorphism when the existence of an abelian heap polymorphism is promised.

More generally, we introduce the promise-metaproblem, which is defined analogously to the promise CSP (for literature on this very active area, see, e.g., [2, 9]): if Σ1 and Σ2 are polymorphism conditions (formal definitions can be found in Section 2) such that Σ1 implies Σ2, then PMeta(Σ1,Σ2) is the problem of deciding for a given finite structure 𝔅 whether Pol(𝔅) satisfies Σ1, or whether it does not even satisfy Σ2. For instance, if Σ1 is the condition to have an abelian heap polymorphism, and Σ2 is the condition to have a Maltsev polymorphism, then the argument above shows that PMeta(Σ1,Σ2) is in 𝖯 despite the fact that neither of the metaproblems for Σ1 and for Σ2 is known to be in 𝖯. More generally, we strengthen a result of Chen and Larose [15, Corollary 4.9] about the tractability of certain metaproblems and prove that PMeta(Σ1,Σ2) is in 𝖯 if

  • Σ1 is idempotent and there exists a uniform polynomial-time algorithm for CSP(𝔅) for structures 𝔅 with Pol(𝔅)Σ1, and

  • Σ2 is a linear strong Maltsev condition (Proposition 7).222A strong Maltsev condition is simply a finite set of height one conditions, see Section 2 for definitions. This is standard terminology, but we will avoid using it to prevent confusing with the Maltsev identities mentioned in the introduction. Linear strong Maltsev conditions are also called minor conditions in the Promise CSP literature.

Moreover, under the same conditions and provided that there exists a semiuniform polynomial-time algorithm for CSPs with polymorphisms satisfying Σ2, the uniform CSP for Σ1 is in 𝖯 if and only if the creation variant of the promise metaproblem is in 𝖯.333Promise metaproblem should not be confused with meta-problems for promise CSPs, as studied e.g. in [24]. In particular, we conclude that there is a uniform polynomial-time algorithm for CSPs with a coset-generating polymorphism if and only if the promise creation-metaproblem for coset-generating polymorphisms and Maltsev polymorphisms is in 𝖯.

Also one of the main hardness results by Chen and Larose about the metaproblem can be generalized to the larger class of promise metaproblems: we observe that if Σ1 and Σ2 are non-trivial and consistent height one strong Maltsev conditions (see Section 3 for definitions) such that Σ1 implies Σ2, then PMeta(Σ1,Σ2) is 𝖭𝖯-complete (Proposition 6).

For a formal discussion of the complexity of uniform algorithms and metaproblems, we need to be more specific about how relational structures are given to a computer and how to measure the size of these representations. This can be found in Section 2. In Section 4 we introduce the promise metaproblem and promise creation-metaproblem and observe that a hardness result of Chen and Larose has a natural extension to the promise setting (Proposition 6). In Section 5 we discuss the connection between the promise metaproblem and uniform algorithms for the CSP, and prove a generalization of a known tractability result for metaproblems to promise metaproblems (Proposition 7). In Section 6 we give some background on coset-generating polymorphisms, and in Section 7 we prove our main result about the computational complexity of the metaproblem for coset-generating polymorphisms. We conclude and discuss open problems for future research in Section 9.

2 Structures, Homomorphisms, Polymorphisms

Let k and τk. A τ-structure 𝔄 consists of a set A and for every i{1,,k} a relation Ri𝔄Aτi. We refer to τ as the signature of 𝔄 (of size k). All τ-structures considered here will be finite, i.e., A is finite. If a τ-structure is considered as the input or output of some algorithm, we assume that its relations are represented by lists of tuples, i.e., the representation size of 𝔄 is |A|+k+i{1,,k}(τi|Ri𝔄|). A structure is a τ-structure for some signature τ; if we later write that a computational problem takes a structure as an input, we mean that τ and k are part of the input.

A homomorphism between two structures 𝔄 and 𝔅 with the same signature τ of size k is a function h:AB such that for every i{1,,k} we have (h(a1),,h(aτi))Ri𝔅 whenever (a1,,aτi)Ri𝔄. If 𝔄 is a τ-structure and m, then 𝔅:=𝔄m is the τ-structure with domain Am and

Ri𝔅:={((a11,,a1m),,(aτi1,,aτim))(a1j,,aτij)Ri𝔄 for all j{1,,m}}.

A polymorphism of a structure 𝔅 is a homomorphism from 𝔅m to 𝔅, for some m. In other words, a polymorphism is an operation BmB for some m that, applied componentwise, preserves the relations of 𝔅. Note that the set of all polymorphisms of 𝔅 is a clone, i.e., it contains the projections and is closed under composition. A finite structure 𝔅 is called a core if every endomorphism444An endomorphism of 𝔅 is a homomorphism from 𝔅 to 𝔅, i.e., a unary polymorphism. of 𝔅 is an automorphism of 𝔅.

The problem of deciding whether there exists a homomorphism from a τ-structure 𝔄 to a τ-structure 𝔅 is 𝖭𝖯-complete. This problem is sometimes called the uniform CSP (with both 𝔄 and 𝔅 being the input). If 𝔅 is a fixed τ-structure, then CSP(𝔅) is the problem of deciding whether a given τ-structure 𝔄 has a homomorphism to 𝔅; this is often referred to as the non-uniform CSP. The finite-domain CSP dichotomy states that CSP(𝔅) is in 𝖯 if 𝔅 has a 4-ary Siggers polymorphism, i.e., a polymorphism s satisfying for all a,r,eB

s(a,r,e,a)=s(r,a,r,e),

and is 𝖭𝖯-complete otherwise. This specific identity was found by Siggers [30], building on results from [4]. The result proved there also implies that if a structure has a Maltsev polymorphism, then it also has a 4-ary Siggers polymorphism. Note that unlike some older articles, we do not require that Siggers operations are idempotent. We also mention that for finite structures 𝔅 the following are equivalent.

  • 𝔅 has a Siggers polymorphism;

  • 𝔅 has a cyclic polymorphism [3], i.e., a polymorphism c:BkB for some k2 satisfying for all x1,,xkB

    c(x1,,xk)=c(x2,,xk,x1).
  • 𝔅 has a weak near-unanimity polymorphism [27], i.e., a polymorphism w:BkB for some k2 satisfying for all x,yB

    w(y,x,,x)=w(x,y,x,,x)==w(x,,x,y).

For every fixed pair of relational τ-structures 𝔅 and such that 𝔅 has a homomorphism to , the Promise CSP for (𝔅,), denoted by PCSP(𝔅,), is defined as follows.

Input: A finite τ-structure 𝔄.
Output: “Yes” if 𝔄 has a homomorphism to 𝔅, “No” if 𝔄 has no homomorphism to .

If 𝔄 has a homomorphism to but no homomorphism to 𝔅, then the algorithm solving PCSP(𝔅,) might answer arbitrarily. Despite a powerful theory that is available for studying the complexity of promise CSPs [2, 9, 8], the complexity of PCSP(𝔅,) has not been classified for all pairs (𝔅,). For instance, if K is the clique with vertices, then the complexity of PCSP(Kn,Km) has already been studied in [18], and is conjectured to be 𝖭𝖯-hard for all 3n<m, but this remains open. There are problems of the form PCSP(𝔄,𝔅) in 𝖯 where CSP(𝔄) and CSP(𝔅) are 𝖭𝖯-hard [6].

3 Polymorphism Conditions

Let σ be a set of function symbols. A σ-identity is an expression of the form st where s and t are σ-terms over some common set of variables x1,,xn. Such an identity is called

  • linear if each of the two terms contains at most one function symbol from σ;

  • height one if exactly one symbol from σ occurs in each of the terms s and t.

If Σ is a (not necessarily finite) set of σ-identities and 𝒞 is a set of operations over B, then we write 𝒞Σ if we can interpret the function symbols from σ by operations from 𝒞 such that for every identity st from Σ and every instantiation of the variables in s and t by elements b1,,bn from B we have that s(b1,,bn)=t(b1,,bn). Otherwise, we write 𝒞⊧̸Σ. If Σ={st} consists of a single identity, we also write 𝒞st instead of 𝒞{st}. If Σ1 and Σ2 are sets of identities, we write Σ1Σ2 if for every clone 𝒞 with a finite domain we have that 𝒞Σ2 whenever 𝒞Σ1. A set of σ-identities Σ is called

  • idempotent if Σ contains for every fσ the identity f(x,,x)x;

  • trivial if ProjΣ, where Proj is the set of all projections over the set {0,1} (and non-trivial otherwise);

  • consistent if for every non-empty finite set D there exist idempotent operations on D that satisfy Σ (we use the definition from [15]; also see Lemma 3).

We say a function g:DkD is an extension of f:CkC for CD if g|Ck=f where g|Ck denotes the restriction of g to Ck.

Lemma 2.

Let Σ be a set of linear σ-identities such that Σ⊧̸xy and let 𝒞 be a clone on some domain C such that 𝒞Σ. Moreover, let D=C{a} for some aC and let 𝒟 be the set of all operations that extend some f𝒞 (i.e., 𝒟={f^:DkDk,f^|Ck𝒞}). Then 𝒟 is a clone and 𝒟Σ.

Proof.

First, let us observe that 𝒟 is a clone: Clearly, all projections are in 𝒟. Moreover, if f^,g^1,,g^k𝒟, then we have f,g1,,gk𝒞 where f,g1,,gk denote the respective restrictions to C for suitable . Hence, because 𝒞 is a clone, also their composition is in 𝒞 (which is the same as the restriction of f^(g^1,,g^k)); hence, also f^(g^1,,g^k)𝒟 and 𝒟 is a clone.

To show that 𝒟Σ, we define an equivalence relation on the set of linear σ-terms over a countable set of variables 𝒳. Note that a linear σ-term is either a single variable or a term of the form f(x1,,xn) where fσ is an n-ary function symbol and x1,,xn𝒳 (possibly with repetitions). We can also denote such a linear term in the form s(y1,,yk)=f(yi1,,yin) where y1,,yk are pairwise distinct variables and i1,,in{1,,k}.

We define to be the smallest equivalence relation which contains Σ (recall that formally Σ is a set of pairs of linear σ-terms) and which is closed under substituting variables for other variables. Thus, in particular, we have Σ{stst}. Observe that

  1. (1)

    as Σ⊧̸xy, we cannot have both f(x1,,xk)xi and f(x1,,xk)xj if xixj.

We may identify the function symbols in σ with operations in 𝒞 that witness that 𝒞 satisfies Σ. Using this identification, we further observe that,

  1. (2)

    if s(y1,,yk) is a linear term where y1,,yk𝒳 are distinct variables and if s(y1,,yk)yi for some i{1,,k}, then s(c1,,ck)=ci for all c1,,ckC.

Now, for each fσ identified with f:CkC, let us describe an extension f^:DkD such that the resulting set of functions satisfies Σ. In order to do so, fix a map π:DC which is the identity on C. For fσ and a1,,akD we define

f^(a1,,ak):={aiif there exists an injective ξ:{a1,,ak}𝒳
such that f(ξ(a1),,ξ(ak))ξ(ai)
f(π(a1),,π(ak))otherwise.

By (1), it follows that f^ is well-defined (note that the definition depends on π, but π is fixed – however, it does not depend on ξ, because the relation is invariant under substitution of variables). Moreover, if a1,,akC, we have f^(a1,,ak)=f(a1,,ak) (in the case that there exists an injective ξ:{a1,,ak}𝒳 with f(ξ(a1),,ξ(ak))ξ(ai), we rely on (2)).

Finally, the collection of all the f^ for fσ satisfies Σ. For identities involving f(x1,,xk) with f(x1,,xk)xi, this is because we defined f^(a1,,ak)=ai; for other identities, this follows immediately, because the set of all f’s (with fσ) already satisfies Σ.

The purpose of the following lemma is to explain the concept of “consistency” for sets of linear identities; the second statement illustrates why we cannot drop the idempotence assumption in the first statement.

Lemma 3.

An idempotent set of linear identities Σ is consistent if and only if Σ⊧̸xy. A set of height one identities Σ is consistent if and only if Σ⊧̸f(x)g(y).

Proof.

Clearly, if Σxy, then all finite models of Σ have a domain of size one. Hence, if D has cardinality n2, then there is no set of operations on D that satisfies Σ, so Σ is not consistent. On the other hand, if Σ⊧̸xy, by Lemma 2, starting with a one-element domain, we find clones with arbitrary domain size that satisfy Σ. If Σ is idempotent, then we even find idempotent operations that satisfy Σ, so Σ is consistent.

To see the second statement, observe that if Σf(x)g(y) and 𝒞 is a clone such that 𝒞Σ, then 𝒞 must contain a constant unary operation, which can only be idempotent if the domain D of 𝒞 has at most one element. So Σ is not consistent. Conversely, suppose that Σ⊧̸f(x)g(y). It is known that in this case 𝒟ΣΔ, where 𝒟 is the clone of all idempotent operations on a two-element set D (Proposition 3.2.5 in [31]), and Δ are equations that express that all functions mentioned in Σ are idempotent. Let S be a finite superset of D; then applying Lemma 2 sufficiently many times we obtain a clone on S which also satisfies ΣΔ. Hence, Σ is consistent.

Note that the existence of a Siggers polymorphism can be expressed by the height one identity

f(a,r,e,a)f(r,a,r,e)

and the existence of a Maltsev polymorphism can be expressed by the idempotent two-element set of linear identities

ΣMaltsev:={m(x,x,y)y,m(y,x,x)y}. (1)

Both of these sets of identities are non-trivial and consistent.

4 The Promise Metaproblem

If Σ is a set of σ-identities, then the metaproblem for Σ, denoted by Meta(Σ), is the following computational problem.

Input: A finite structure 𝔅.
Output: “Yes” if Pol(𝔅)Σ, “No” otherwise.

The following was shown by Chen and Larose [15].

Theorem 4 (Theorem 6.2 in [15]).

Let Σ be a non-trivial consistent finite set of height one identities. Then Meta(Σ) is 𝖭𝖯-complete.

In particular, deciding whether 𝔅 has a Siggers polymorphism is 𝖭𝖯-complete [15]. Note, however, that this theorem does not make any statement about deciding the existence of an idempotent Siggers polymorphism or the existence of a Maltsev polymorphism (since the idempotence of an operation cannot be expressed by a set of height one identities).

If 𝔅 is additionally promised to be a core, then it is easy to see that there exists a Siggers polymorphism if and only if there exists an idempotent Siggers polymorphism. We do not know whether there exists a polynomial-time algorithm to test whether 𝔅 has an idempotent Siggers polymorphism, and the same question is open for Maltsev polymorphisms.

Similarly to the case of the CSP, we can relax the problem to a promise version as follows. Let Σ1 and Σ2 be sets of σ-identities such that Σ1Σ2. Then the promise metaproblem for (Σ1,Σ2), denoted by PMeta(Σ1,Σ2), is the following computational problem.

Input: A finite structure 𝔅.
Output: “Yes” if Pol(𝔅)Σ1, “No” if Pol(𝔅)⊧̸Σ2.

Moreover, if the set τσ of symbols that appear in Σ2 is finite, then the promise creation-metaproblem for (Σ1,Σ2), denoted by PCMeta(Σ1,Σ2), is the following computational problem.

Input: A finite structure 𝔅.
Output: A map f:τPol(𝔅) witnessing that Pol(𝔅)Σ2, if Pol(𝔅)Σ1.
If Pol(𝔅)⊧̸Σ1, the output may be anything.

Thus, the output consists of an interpretation of each function symbol in τ. The following observation explains the name PCMeta.

Observation 5.

If Σ2 is finite and PCMeta(Σ1,Σ2) is in 𝖯, then PMeta(Σ1,Σ2) is in 𝖯.

This follows simply by applying the algorithm for PCMeta(Σ1,Σ2) and then testing whether the returned family of operations satisfies Σ2 (this is indeed in 𝖯 as Σ2 is finite and not part of the input here). An inspection of Chen and Larose’s proof of Theorem 4 shows that it proves the following stronger result.

Proposition 6.

Let Σ1 and Σ2 be finite sets of height one identities such that Σ1Σ2, Σ1 is consistent, and Σ2 is non-trivial. Then PMeta(Σ1,Σ2) is 𝖭𝖯-hard.

Note that we only state 𝖭𝖯-hardness in Proposition 6, because formally 𝖭𝖯 only contains decision problems, not promise problems (Meta(Σ1), in contrast, is of course in 𝖭𝖯).

Proof sketch.

The result is shown by a reduction from graph 3-colorability. For a given finite graph G, Chen and Larose [15, Lemma 6.6] construct a relational structure 𝔅 which has the property that G is 3-colorable if and only if 𝔅 is not a core. Moreover, if G is 3-colorable, then the construction is such that the polymorphisms of the core of 𝔅 satisfy all consistent idempotent sets of linear identities (see [15, Lemma 6.6 (2)]). Thus, the polymorphism clone of the core of 𝔅 and therefore also Pol(𝔅) itself satisfy all consistent sets of height one identities. If G is not 3-colorable, then Pol(𝔅) has the property that it does not satisfy any non-trivial height one identity (a consequence of [15, Fact 4]). This shows the statement.

5 Connection with the Uniform CSP

The question whether certain tractability conditions for CSPs uniformize has been asked and studied by Kolaitis and Vardi [22]. Let Σ be a set of identities. The uniform CSP for Σ is defined as follows.

Input: A pair of finite structures (𝔄,𝔅) of the same signature such that Pol(𝔅)Σ.
Output: “Yes” if there is a homomorphism from 𝔄 to 𝔅, “No” otherwise.

If 𝔅 does not satisfy Σ, then an algorithm for this problem might answer arbitrarily. If Σ is the set of identities that states the existence of a Maltsev (or Siggers, etc.) polymorphism, then the computational problem introduced above is called the uniform CSP for Maltsev constraints (or for Siggers constraints, etc.). It is an open problem whether there is a polynomial-time algorithm that solves the uniform CSP for Siggers constraints; this is stated as Problem 1 in Zhuk [32] (there, the problem is stated using weak near unanimity polymorphisms, which, however, is equivalent as explained in Section 2).

The following polynomial-time tractability result generalizes the second part of Theorem 4.7 in [15], which is the special case where Σ1=Σ2. Be aware that Σ1 is neither required to be finite nor linear.

Proposition 7.

Let Σ1 be an idempotent set of identities such that the uniform CSP for Σ1 is in 𝖯, and let Σ2 be a finite set of linear identities such that Σ1Σ2. Then PCMeta(Σ1,Σ2) and PMeta(Σ1,Σ2) are in 𝖯.

Proof.

Let 𝔅 be a finite structure and let be the expansion of 𝔅 whose signature contains a symbol R= for the equality relation and a symbol Rb for every element bB which denotes the unary relation {b}. Note that if 𝔅 has polymorphisms satisfying Σ1, then, as they are idempotent, these polymorphisms are also polymorphisms of . Therefore, Σ1. Since Σ1Σ2 and each polymorphism of must be idempotent, it follows that Σ1Σ2Δ and Σ2Δ, where Δ is a set of equations that express that all functions mentioned in Σ2 are idempotent. Conversely, if 𝔅⊧̸Σ2, then certainly 𝔅⊧̸Σ2Δ and ⊧̸Σ2Δ. Therefore, from now on we can safely replace Σ2 by Σ2Δ and, hence, assume that Σ2 is idempotent.

We may suppose without loss of generality that Σ2 is the union of a set of height one identities and the identities of the form f(x,,x)x.

The following construction is essentially the indicator structure from [21]. For each function symbol of arity k that appears in Σ2, we create a copy of 𝔅k (i.e., the structure with domain Bk and the relations as defined in Section 2). Let be the structure obtained from the disjoint union over all these copies as follows. For every bB, we add to Rb all tuples of the form (b,,b) in the copies of 𝔅. We additionally add for every identity f(xi1,,xik)g(xj1,,xj) in Σ2 and every function α:{xi1,,xik,xj1,,xj}B the constraint c=d where c=(α(xi1),,α(xik)) belongs to the copy of 𝔅k created for f, and d=(α(xj1),,α(xj)) belongs to the copy of 𝔅 created for g (adding the constraint c=d means we include (c,d) to R=).

Observe that if there is a homomorphism h from to , then Pol(𝔅)Σ2: each restriction of h to a copy of 𝔅k is a polymorphism of 𝔅 of arity k, and the additional equality constraints ensure that the respective operations satisfy the given identities Σ2. Let A denote the uniform polynomial-time algorithm for Σ1. Run A to determine whether there is a homomorphism . If A rejects, then return “No”. To see that this is the correct answer, suppose for contradiction that Pol(𝔅)Σ1. Then the answer of the algorithm A must be correct. Hence, there is no homomorphism from to and, therefore, Pol(𝔅)⊧̸Σ2, a contradiction to the assumption that Σ1 implies Σ2.

If A accepts, we proceed like for the well-known self-reduction of SAT. If A accepts, pick an element x from . For every bB, do the following:

  • Add the constraint Rb(x), i.e., add x to Rb.

  • Run A on the resulting instance.

  • If A accepts, then proceed in the same way with another element of .

If for some variable, A rejects for all elements bB, then we return “No”. Note that this answer must be correct: if Pol(𝔅)Σ1, then it is impossible that we run into this case by the correctness of A if the promise is fulfilled. If Pol(𝔅)⊧̸Σ1, then the answer “No” is correct.

Otherwise, eventually all elements x of are contained in Rb for some bB. Thus, given the promise Pol(𝔅)Σ1, the map xb is a solution to PCMeta(Σ1,Σ2).

To solve PMeta(Σ1,Σ2), it remains to verify in polynomial time whether the map that sends x to b is a homomorphism from to 𝔅 (see Observation 5). If no, return “No”, otherwise return “Yes”. These answers are clearly correct.

A semiuniform algorithm for the CSP for Σ (where Σ is some set of identities) is an algorithm that takes as input a pair of finite structures (𝔄,𝔅) of the same signature τ such that Pol(𝔅)Σ together with a map f:τPol(𝔅) witnessing that Pol(𝔅)Σ and outputs whether there is a homomorphism from 𝔄 to 𝔅.

The following can be seen as a form of converse of Proposition 7: there, the existence of a uniform algorithm for the CSP for Σ1 implies that PCMeta(Σ1,Σ2) is in 𝖯; here, the assumption that PCMeta(Σ1,Σ2) is in 𝖯, together with a polynomial-time semiuniform algorithm for Σ2, implies that the uniform algorithm for Σ1 is in 𝖯.

Proposition 8.

Let Σ1 and Σ2 be sets of σ-identities such that Σ1Σ2 and the set τσ of symbols that appear in Σ2 is finite. If PCMeta(Σ1,Σ2) is in 𝖯 and there is a polynomial-time semiuniform algorithm for the CSP for Σ2, then the uniform CSP for Σ1 is in 𝖯.

Proof.

Given a pair (𝔄,𝔅) of structures of the same signature such that Pol(𝔅)Σ1. By assumption, we can compute f:τPol(𝔅) witnessing that Pol(𝔅)Σ2. We can then use the semiuniform algorithm for the CSP for Σ2 to decide in polynomial time whether there is a homomorphism from 𝔄 to 𝔅.

6 Coset-Generating Polymorphisms

A coset-generating operation on a set A is an operation m:A3A that can be written as m(x,y,z)=xy1z for some operations and 1 such that (A,,1,e) forms a group for some element eA. In the following, we use juxtaposition instead of . Let G be a group. We write HG if H is a subgroup of G. The following is well-known and the motivation why these operations are called coset-generating; for the convenience of the reader we give a proof.

Lemma 9.

Let k. Then a relation RGk is preserved by the operation m:G3G defined by m(x,y,z)=xy1z if and only if R=gH for some gGk and HGk (i.e., R is a coset of a subgroup of Gk).

Proof.

Let H be a subgroup of Gk. Let gGk and h1,h2,h3H. As usual, we may apply m to elements of Gk componentwise; then

m(gh1,gh2,gh3)=gh1(gh2)1gh3=gh1h21h3gH

so m indeed preserves all cosets of H.

Conversely, suppose that RGk is preserved by m. Choose yR arbitrarily. We claim that y1R is a subgroup H of Gk. This will show that R=yH is a coset of a subgroup of Gk. Arbitrarily choose a,by1R. Then x:=yaR and z:=ybR. Hence, m(x,y,z)=yay1yb=yabR, so aby1R and y1R is closed under the group operation. Moreover, m(y,ya,y)=y(ya)1y=ya1R, so a1y1R and y1R is also closed under taking inverses.

A structure 𝔅 with a polymorphism which is a coset-generating operation is called a coset structure (with respect to G). CSPs for coset structures will be called coset CSPs. As xx1y=y=yx1x, every coset-generating operation is a Maltsev operation. Therefore, every coset structure has a Maltsev polymorphism, but the converse is not true (see, e.g., the Maltsev polymorphisms that appear in [5]), or the “No”-instances resulting from the reduction in Theorem 13. However, we have the following well-known fact.

Lemma 10.

A relational structure 𝔅 is a coset structure if and only if it has a Maltsev polymorphism m that additionally satisfies for all x,y,u,v,wB the following associativity identity

m(u,x,m(v,y,w)) =m(m(u,x,v),y,w). (2)

Proof.

If 𝔅 is a coset structure and f:(x,y,z)xy1z is the coset-generating polymorphism of 𝔅, then f is a Maltsev operation that clearly satisfies the associativity condition (2). Conversely, if m is a Maltsev operation that satisfies (2), then we can pick an arbitrary element eB, and define g:(x,y)m(x,e,y). It is straightforward to verify that (B;g) is a group with identity element e (the inverse of an element x is given by m(e,x,e)), and that m is the coset-generating polymorphism with respect to this group.

Ternary Maltsev operations m that satisfy (2) are also called heaps [10] (the concept goes back to Prüfer [28] and Baer [1] in the 1920s). Thus, coset-generating polymorphisms (terminology used in [15]) and heaps are the same concept; in the following, we use both terms interchangeably, but prefer “coset-generating” in the context of polymorphisms, and “heaps” in the abstract setting of clones. Note that sometimes also the identity m(u,x,m(v,y,w))=m(u,m(y,v,x),w) is required for heaps. However, this is implied by the other identities, which follows from our Lemma 10 and can also be found in [11, Lemma 2.3].

We write Σheap for the identities that state the existence of a heap operation (i.e., (1) together with (2)). Using Proposition 7 and Proposition 8, we obtain the following corollary.

Corollary 11.

PCMeta(Σheap,ΣMaltsev) is in 𝖯 if and only if there is a uniform polynomial-time algorithm for coset CSPs.

In the light of Proposition 6 and [15], it might be interesting to know whether Σheap can be enforced by some consistent set of linear identities. As we see next, this is not the case.

Proposition 12.

Let Σ be a set of linear identities with Σ⊧̸xy. Then there is a structure 𝔅 without a coset-generating polymorphism such that Pol(𝔅)Σ. In particular, being a coset structure cannot be defined by linear identities.

Proof.

Let 𝔄 be a structure with domain A such that Pol(𝔄)Σ and n:=|A|2 (such an 𝔄 exists because Σ⊧̸xy). Define a structure 𝔅 with domain B=A{b} and with relations Ri𝔅=Ri𝔄; furthermore, add the unary relation AB. Now, Pol(𝔅) clearly consists of all extensions of polymorphisms of 𝔄 (meaning that the restriction of each fPol(𝔅) of arity k to Ak is in Pol(𝔄)). Therefore, by Lemma 2, Pol(𝔅)Σ.

It remains to see that 𝔅 does not contain a coset-generating operation. Suppose otherwise. Then the corresponding group would have order n+1. The size of each relation RBr of 𝔅 needs to divide (n+1)r: the relation R must be a coset of a subgroup of a group with domain Br by Lemma 9, and hence |R| must divide |B|r by Lagrange’s theorem. However, the unary relation A contains n elements, which is coprime to (n+1)r – thus, Pol(𝔅) cannot contain a coset-generating operation.

7 NP-Hardness of Detecting Heap Polymorphisms

The following is our main result and answers the question of Chen and Larose [15] mentioned in the introduction.

Theorem 13 (see Theorem 1).

The following problem is 𝖭𝖯-complete:

Input: A finite structure 𝔅
Question: Is 𝔅 a coset structure?
Corollary 14.

The creation-metaproblem for coset-generating polymorphisms is not in 𝖯 unless 𝖯=𝖭𝖯.

Proof.

A polynomial-time algorithm for the creation-metaproblem can be used to solve the metaproblem in 𝖯 by running the algorithm and then checking whether the output is indeed a coset-generating polymorphism. The latter can be done in polynomial time using the identities from Lemma 10 (see Observation 5). The statement therefore follows from Theorem 13.

 Remark 15.

By Corollary 14, if there exists a uniform polynomial-time algorithm for coset CSPs, it cannot use the approach of first computing the coset-generating polymorphism and then apply the semiuniform algorithm from [13].

Note that there still might be a uniform 𝖯-time algorithm for coset CSPs. Indeed, [15, Corollary 4.9] does not apply to this situation, because the property to be a coset structure cannot be defined by linear identities, as we have seen in Proposition 12.

Our proof of Theorem 13 is based on a reduction from the following graph problem, which has been shown to be 𝖭𝖯-complete in [16, Theorem 4.9] (where the problem is called (2,1) graph coloring; see also [26]).

Lemma 16.

The following problem is 𝖭𝖯-complete:

Input: A finite undirected simple graph G=(V,E)
Question: Can E be written as the disjoint union of a matching and the edge set of a bipartite graph?

In other words, the question in the computational problem is whether one can remove a matching so that the remaining graph becomes bipartite. For convenience of the reader, we give a proof in the appendix.

To reduce the computational problem from Lemma 16 to the question whether a given structure has a coset-generating polymorphism, we need some basic notions from group theory.

Group basics.

For n{0}, we write Cn for the cyclic group of order n. If G and H are groups, then we write G×H for the direct product of G and H. Given groups G,H and a homomorphism ϕ from H to the automorphism group Aut(G) of G (or equivalently, an action of H on G via automorphisms) the semi-direct product GϕH is the group with elements {(g,h)gG,hH} and multiplication defined by

(g1,h1)(g2,h2)=(g1ϕ(h1)(g2),h1h2).

In this case, G (identified with G×{1}) is a normal subgroup of GϕH. Then the map π that sends each element f of GϕH to the coset fG of G is a group homomorphism GϕH(GϕH)/GH. The map ι:h(1,h) is an embedding of H into GϕH such that the composition H𝜄GϕH𝜋H is the identity (note that ι is not unique with this property). For simplicity, we simply write GH instead of GϕH and specify ϕ only verbally. For instance, if G=Cp and H=C2k, then GϕH with the action by inversion means that ϕ is the homomorphism from C2k to Aut(Cp) which sends the generator a of C2k to the map xx1Aut(Cp).

Another example that is relevant later is G=Cp for p1mod4 and again H=C4, where GϕH with a faithful action means that ϕ is an injective homomorphism from C4 to Aut(Cp). This means that ϕ maps the generator a of C4 to the map xxkAut(Cp) for k=±(p1)/4. Note that the two different choices of k give isomorphic groups.

In order to prove our main theorem, we focus on dihedral groups. The dihedral group D2n of order 2n for n1, is given by the following group presentation:

D2n=d,sdn=s2=1,ds=sd1.

It is well-known that D2n is isomorphic to the symmetry group of a regular n-gon and, thus, can be understood geometrically (see, e.g., [20, Theorem I.6.13]). Each element of D2n has a unique normal form skd with k{0,1} and {0,,n1}. If k=1, then skd corresponds to a reflection, otherwise to a rotation. From this normal form, we can see that D2n is isomorphic to the semidirect product CnC2 with the action by inversion.

Lemma 17.

Let m. For the dihedral group D4m=d,sd2m=s2=1,ds=sd1 the cosets of subgroups of order two are precisely as follows:

{{dk,sd}k,{0,,2m1}}{{a,adm}aD4m}.

Proof.

The lemma follows from the fact that the subgroups of D4m of order two are the subgroups generated by sdk for k{0,,2m1} (reflections at different axes) and the subgroup generated by dm (rotation by 180 degrees).

In particular, the graph Γ=(V,E) defined by V:=D4m and

E:={{u,v}{u,v} is a coset of a subgroup of D4m}

can be written as the union of the complete bipartite graph K2m,2m and a perfect matching on both sides.

 Remark 18.

For an odd integer r, the corresponding graph for the dihedral group of order 2r is the complete bipartite graph Kr,r (as the dihedral group then does not contain a rotation by 180 degrees).

Proof of Theorem 13.

We reduce the problem from Lemma 16 to our problem.

Let Γ=(V,E) be a given graph with n=|V|. We may assume without loss of generality that Γ has a vertex of degree at least four (otherwise, we can add such a vertex to Γ). First, compute a prime p5 with n2p (this is clearly possible by checking whether any of the integers between n/2 and n is prime and by the Bertrand–Chebyshev theorem the existence of such a prime is guaranteed).

The domain of the structure 𝔅 will be B:={1,,4p}; we consider V as a subset of B. For the signature τ of 𝔅, it will be convenient to use the finite set E as the index set for the entries of the tuple τ, rather than {1,,|E|}; define τE as τ:=(1,,1). For {u,v}E, we have R{u,v}𝔅:={u,v} (thus, in particular, 𝔅 has only unary relations, each of which contains exactly two elements; moreover, the elements of BV are not contained in any relation). Clearly, given Γ, the structure 𝔅 can be computed in logarithmic space. We claim that 𝔅 has a coset-generating polymorphism if and only if the edges of Γ can be partitioned into a bipartite graph and a matching.

First, assume that 𝔅 has a coset-generating polymorphism. Then, by Lemma 9, its relations are cosets of subgroups of some group G of order 4p. It is well known555See e.g. the groupprops wiki https://groupprops.subwiki.org/wiki/Classification_of_groups_of_order_four_times_a_prime_congruent_to_1_modulo_4 (accessed on April 27, 2026) that, since p5 is prime, there are up to isomorphism, at most five groups of order 4p, namely

  1. 1.

    C2×C2×Cp,

  2. 2.

    C4×CpC4p,

  3. 3.

    C2×D2pD4p,

  4. 4.

    CpC4 with the action by inversion (dicyclic group), and

  5. 5.

    possibly CpC4 with a faithful action (if p1mod4).

Clearly, each of these groups has order 4p; the fact that every group of order 4p is isomorphic to one of the groups in this list can be shown by elementary group theory (essentially the Sylow theorems; see, e.g. [23, Chapter 1, Section 6]). In particular, one first shows that in every such group the (unique) p-Sylow subgroup is normal (see [23, Exercise 28]).

In the abelian cases (Item 1 and 2) and in the case GCpC4 with the action by inversion (Item 4), there are at most three subgroups of order two; therefore, each element can be contained in at most three relations. Hence, these cases are ruled out, because we required that Γ has a vertex of degree four.

In the case CpC4 with the faithful action (Item 5), the subgroups of order two are all contained in the unique subgroup isomorphic to D2p (this is because under the projection CpC4C4 an element of order two must map to the element of order two in C4; thus, all order-two elements are contained in the unique subgroup of CpC4 that is isomorphic to CpC2). Therefore, according to Remark 18, Γ would have to be a subgraph of the disjoint union of two copies of Kp,p (one for each coset of D2p) – in particular, Γ is bipartite.

Therefore, the only possible group is D4p. In this case, by Lemma 17, we know how the cosets of subgroups of order two look like. In particular, E can be written as the union of a bipartite graph and a matching.

Conversely, assume that Γ can be written as the union of a bipartite graph and a matching. Write V=CD where C and D are the two sides of the bipartite graph – meaning that the edges within C as well as the edges within D form a matching. Then we can choose an injection f:VD4p such that

  • f(C)d,

  • f(D)sd, and

  • for every edge {u,v} with both u,vC or both u,vD we have f(u)=f(v)dp.

This is possible because |C|,|D||d| and the edges within C and D form a matching. Hence, by Lemma 17, all relations of 𝔅 are cosets of subgroups of D4p; thus, 𝔅 has a coset-generating polymorphism.

Observe that the structure 𝔅 in this proof always has a Maltsev polymorphism: indeed, any map m:B3B satisfying the Maltsev identities leaves the defined relations invariant as they are all unary and contain exactly two elements.

8 Abelian Heap Polymorphisms

In the context of the metaproblem for coset-generating polymorphisms, Chen and Larose [15] also state “One can also ask these questions for restricted classes of groups.” In particular, the complexity of the following computational problem remains open.

Input: A structure 𝔅
Question: Is 𝔅 a coset structure for some abelian group?

It is easy to see that a structure 𝔅 is a coset structure for some abelian group if and only if it is preserved by a heap operation m which is abelian666It is well known and easy to show that abelian heap operations are abelian in the sense of universal algebra (we refrain from giving the definition, since we only need it in this footnote), and every heap operation which is abelian in the sense of universal algebra is an abelian heap operation; this justifies the terminology., i.e., satisfies

m(x,y,z)m(z,y,x).

We write Σabheap for the identities that state the existence of an abelian heap operation.

Corollary 19.

PMeta(Σabheap,ΣMaltsev) is in 𝖯.

Proof.

If 𝔅 has an abelian heap polymorphism, then by Lemma 10 it is preserved by (x,y,z)xy+z with respect to some abelian group G. Hence, for every n2 it is also preserved by (x1,y1,x2,y2,,xn)x1y1+x2y2++xn, which is an example of a so-called alternating polymorphism. It is known that for such 𝔅, the AIP algorithm mentioned in the introduction is a uniform polynomial-time algorithm [2, Theorem 7.19]. Hence, the statement follows from Proposition 7.

Note that PMeta(Σabheap,ΣMaltsev) is in 𝖯 despite the fact that the polynomial-time tractability of Meta(Σabheap) and of Meta(ΣMaltsev) is open.

9 Conclusion and Open Problems

In this work we have introduced the promise version of the metaproblem in constraint satisfaction, and showed that several known results about the complexity of the metaproblem and connection to the existence of uniform polynomial-time CSP algorithms extend naturally to this larger setting. We identified a pair of polymorphism conditions (Σ1,Σ2) whose promise metaproblem is in 𝖯, but where the metaproblem for Σ1 and the metaproblem for Σ2 are not known to be in 𝖯. We then proved that the problem of deciding whether a given finite structure has a coset-generating (i.e., heap) polymorphism is 𝖭𝖯-complete, solving an open problem of Chen and Larose [15].

Before the present work, there were several plausible scenarios how the question for the uniform complexity for coset CSPs might be settled:

  1. (A)

    there could be a polynomial-time algorithm that given a finite structure promised to have a coset-generating polymorphism actually computes a corresponding group. If this is the case, then one obtains a uniform polynomial-time algorithm for such CSPs by using Bulatov and Dalmau’s semiuniform algorithm for CSPs with Maltsev constraints [14];

  2. (B)

    the group structure could be difficult to compute, yet one could compute in polynomial time a Maltsev polymorphism (and, again, the algorithm from [14] can be used to decide the CSP);

  3. (C)

    there could be no polynomial-time algorithm to compute a Maltsev polymorphism, but still coset CSPs could be uniformly decidable in polynomial time by another algorithm;

  4. (D)

    the uniform CSP for coset structures could be hard – here, besides being 𝖭𝖯-complete, there are other hardness results imaginable: for instance, it might be hard for graph isomorphism or hard for group isomorphism.

In this work we ruled out possibility (A) by Corollary 14 (unless 𝖯=𝖭𝖯) and possibility (C) by Corollary 11. In particular, if there is a uniform polynomial-time algorithm for coset CSPs, then a Maltsev polymorphism can be computed in 𝖯, but no coset-generating polymorphism can be computed in general (unless 𝖯=𝖭𝖯).

We ask the following questions that are related to this work.

  • Is there a uniform polynomial-time algorithm for coset CSPs?

  • What is the answer to this question restricted to domains of size 4p, where p is a prime? (This question is motivated by our proof of Theorem 1.)

  • What is the complexity of deciding whether a given structure has an abelian heap polymorphism?

  • What is the complexity of deciding whether a given structure has an abelian Maltsev polymorphism?

The complexity of the metaproblem and the uniform CSP for many natural finite sets of linear identities remains open. We wonder whether the class of (promise) metaproblems for fixed sets of identities is perhaps a candidate for a class that exhibits a complexity non-dichotomy.

References

  • [1] Reinhold Baer. Zur Einführung des Scharbegriffs. Journal für die reine und angewandte Mathematik, 160:199–207, 1929.
  • [2] Libor Barto, Jakub Bulín, Andrei A. Krokhin, and Jakub Opršal. Algebraic approach to promise constraint satisfaction. J. ACM, 68(4):28:1–28:66, 2021. doi:10.1145/3457606.
  • [3] Libor Barto and Marcin Kozik. Absorbing subalgebras, cyclic terms and the constraint satisfaction problem. Logical Methods in Computer Science, 8/1(07):1–26, 2012. doi:10.2168/LMCS-8(1:7)2012.
  • [4] Libor Barto, Marcin Kozik, and Todd Niven. The CSP dichotomy holds for digraphs with no sources and no sinks (a positive answer to a conjecture of Bang-Jensen and Hell). SIAM Journal on Computing, 38(5), 2009. doi:10.1137/070708093.
  • [5] Manuel Bodirsky and Andrew Moorhead. Conservative Maltsev constraint satisfaction problems, 2025. doi:10.48550/arXiv.2505.11395.
  • [6] Joshua Brakensiek and Venkatesan Guruswami. An algorithmic blend of LPs and ring equations for promise CSPs. In Timothy M. Chan, editor, Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2019, San Diego, California, USA, January 6-9, 2019, pages 436–455. SIAM, 2019. doi:10.1137/1.9781611975482.28.
  • [7] Joshua Brakensiek and Venkatesan Guruswami. Symmetric polymorphisms and efficient decidability of promise CSPs. In Shuchi Chawla, editor, Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms, SODA 2020, Salt Lake City, UT, USA, January 5-8, 2020, pages 297–304. SIAM, 2020. doi:10.1137/1.9781611975994.18.
  • [8] Joshua Brakensiek and Venkatesan Guruswami. Promise constraint satisfaction: Algebraic structure and a symmetric boolean dichotomy. SIAM Journal on Computing, 50(6):1663–1700, 2021. doi:10.1137/19M128212X.
  • [9] Joshua Brakensiek, Venkatesan Guruswami, Marcin Wrochna, and Stanislav Zivný. The power of the combined basic linear programming and affine relaxation for promise constraint satisfaction problems. SIAM J. Comput., 49(6):1232–1248, 2020. doi:10.1137/20M1312745.
  • [10] Simion Breaz, Tomasz Brzeziński, Bernard Rybołowicz, and Paolo Saracco. Heaps of modules and affine spaces. Annali di Matematica Pura ed Applicata (1923 -), 203(1):403–445, 2024.
  • [11] Tomasz Brzeziński. Trusses: Paragons, ideals and modules. Journal of Pure and Applied Algebra, 224(6):106258, 2020.
  • [12] Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 319–330, 2017. doi:10.1109/FOCS.2017.37.
  • [13] Andrei A. Bulatov and Víctor Dalmau. Towards a dichotomy theorem for the counting constraint satisfaction problem. In Proceedings of the Annual Symposium on Foundations of Computer Science (FOCS), pages 562–574, 2003.
  • [14] Andrei A. Bulatov and Víctor Dalmau. A simple algorithm for Mal’tsev constraints. SIAM Journal on Computing, 36(1):16–27, 2006. doi:10.1137/050628957.
  • [15] Hubie Chen and Benoît Larose. Asking the metaquestions in constraint tractability. TOCT, 9(3):11:1–11:27, 2017. doi:10.1145/3134757.
  • [16] Lenore Cowen, Wayne Goddard, and C. Esther Jesurum. Defective coloring revisited. J. Graph Theory, 24(3):205–219, 1997. doi:10.1002/(SICI)1097-0118(199703)24:3\‚<205::AID-JGT2\␣>3.0.CO;2-T.
  • [17] Victor Dalmau and Jakub Opršal. Local consistency as a reduction between constraint satisfaction problems, 2023. arXiv:2301.05084.
  • [18] M. R. Garey and D. S. Johnson. The complexity of near-optimal graph coloring. J. ACM, 23(1):43–49, January 1976. doi:10.1145/321921.321926.
  • [19] Michael Garey and David Johnson. A guide to NP-completeness. CSLI Press, Stanford, 1978.
  • [20] Thomas W. Hungerford. Algebra. Graduate texts in mathematics 73. Springer, New York, 1. print. edition, 1980.
  • [21] Peter Jeavons, David Cohen, and Marc Gyssens. Closure properties of constraints. Journal of the ACM, 44(4):527–548, 1997. doi:10.1145/263867.263489.
  • [22] Phokion G. Kolaitis and Moshe Y. Vardi. Conjunctive-query containment and constraint satisfaction. J. Comput. Syst. Sci., 61(2):302–332, 2000. doi:10.1006/jcss.2000.1713.
  • [23] Serge Lang. Algebra. Springer, 2002. Revised third edition.
  • [24] Alberto Larrauri. Ineffectiveness for search and undecidability of PCSP meta-problems. In 66th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2025, Sydney, Australia, December 14-17, 2025, pages 1313–1350. IEEE, 2025. doi:10.1109/FOCS63196.2025.00070.
  • [25] Moritz Lichter and Benedikt Pago. Limitations of affine integer relaxations for solving constraint satisfaction problems. In 52nd International Colloquium on Automata, Languages, and Programming, ICALP 2025, Aarhus, Denmark, July 8-11, 2025, volume 334 of LIPIcs, pages 166:1–166:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ICALP.2025.166.
  • [26] Carlos V. G. C. Lima, Dieter Rautenbach, Uéverton S. Souza, and Jayme Luiz Szwarcfiter. Bipartizing with a matching. In COCOA 2018, Proceedings, volume 11346 of Lecture Notes in Computer Science, pages 198–213. Springer, 2018. doi:10.1007/978-3-030-04651-4_14.
  • [27] Miklós Maróti and Ralph McKenzie. Existence theorems for weakly symmetric operations. Algebra Universalis, 59(3):463–489, 2008.
  • [28] H. Prüfer. Theorie der Abelschen Gruppen. I. Grundeigenschaften. Mathematische Zeitschrift, 20:165–187, 1924. URL: http://eudml.org/doc/167792.
  • [29] Thomas J. Schaefer. The complexity of satisfiability problems. In Proceedings of the Symposium on Theory of Computing (STOC), pages 216–226, 1978. doi:10.1145/800133.804350.
  • [30] Mark H. Siggers. A strong Mal’cev condition for varieties omitting the unary type. Algebra Universalis, 64(1):15–20, 2010. doi:10.1007/s00012-010-0082-3.
  • [31] Albert Vucaj. Clones over finite sets and Minor Conditions. PhD thesis, Dresden University of Technology, Germany, 2023.
  • [32] Dmitriy Zhuk. A proof of the CSP dichotomy conjecture. J. ACM, 67(5):30:1–30:78, 2020. doi:10.1145/3402029.
  • [33] Dmitriy Zhuk. Singleton algorithms for the constraint satisfaction problem, 2025. doi:10.48550/arXiv.2509.18434.
  • [34] Dmitriy N. Zhuk. A proof of CSP dichotomy conjecture. In 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, pages 331–342, 2017. arXiv:1704.01914.

Appendix A Proof of Lemma 16

For convenience of the reader, we restate and give a proof of Lemma 16.

Lemma 20 (Lemma 16 restated).

The following problem is 𝖭𝖯-complete:

Input: A finite undirected simple graph G=(V,E)
Question: Can E be written as the disjoint union of a matching and the edge set of a bipartite graph?
Figure 1: For each variable Xk (k{1,,n}) we have one of these subgraphs in the proof of Lemma 16. Here the vertices u1,,uq correspond to those vertices vi,j where the literal Li,j is the variable Xk. Note that q3.

Proof.

Let us show a reduction from positive not-all-equal 3SAT [19, 29]. Consider an instance

Φ={{Li,1,Li,2,Li,3}i{1,,m}}

of this problem with m clauses and n variables X1,,Xn (i.e., Li,j{X1,,Xn} for all i{1,,m} and j{1,2,3}). One may assume without loss of generality that each variable appears in at least three clauses (by simply duplicating clauses). We construct a graph (V,E) with vertex set

V={vi,ji{1,,m},j{1,2,3}}{xk,k{1,,n},{1,2}}

(i.e. we have one vertex for each literal and two additional vertices for every variable) and edge set E such that

  • {vi,1,vi,2,vi,3} becomes a clique for every i{1,,m},

  • there is an edge {xk,1,xk,2} for every k{1,,n},

  • whenever Li,j=Xk, there are the edges {vi,j,xk,1} and {vi,j,xk,2}.

Thus,

E ={{vi,j,vi,k}i{1,,m},jk{1,2,3}}
{{xk,1,xk,2}k{1,,n}}
{{vi,j,xk,}i{1,,m},j{1,2,3},k{1,,n},{1,2} with Li,j=Xk}.

The edges of the second and third type associated to a single variable Xk are illustrated in Figure 1 – the edges of the first type connect these respective gadgets associated to different variables. Clearly, this graph can be computed in polynomial time from the given instance Φ.

We claim that Φ has a solution if and only if the given graph can be written as a disjoint union of a matching and the edge set of a bipartite graph. In order to see this, first note that each of the cliques {vi,1,vi,2,vi,3} can be written as a union of a bipartite graph and a matching (e.g., the edges {vi,j,vi,2} for j{1,3} form a bipartite graph, and the edges {vi,1,vi,3} form a matching). Moreover, any such edge decomposition must have one vertex of each triangle on one side of the bipartite graph and the other two vertices on the other side (and there is precisely one matching edge).

Now assume that Φ has a satisfying assignment σ:{X1,,Xn}{0,1} (i.e., for every i{1,,m} we have 1σ(Li,1)+σ(Li,2)+σ(Li,3)2). Setting

A={vi,jσ(Li,j)=1}{xk,σ(Xk)=0}

and B=VA gives us a bipartite decomposition of the graph after removing the matching consisting of all the edges {xk,1,xk,2} for k{1,,n} and {vi,jvi,k} whenever σ(Li,j)=σ(Li,k) with i{1,,m} and jk{1,2,3}.

To see the other direction of the correctness proof, observe that in any decomposition of E into a matching and bipartite graph, all the edges {xk,1,xk,2} must be part of the matching. This is because by our assumption xk,1 and xk,2 have at least three common neighbours, see Figure 1. (Each of the respective triangles containing the edge {xk,1,xk,2} must contain one matching edge. Since there are at least three of these triangles, the only possibility is the edge {xk,1,xk,2}.)

Now, let V=AB be a bipartite decomposition of V after removing a suitable matching. From the previous observation, we conclude that if Li,j=Lμ,ν, then vi,j and vμ,ν are either both in A or both in B, because they are connected by a path of length two that cannot contain a matching edge. Therefore, the assignment σ:{X1,,Xn}{0,1} with σ(Xk)=1 if and only if xk,1A is a satisfying assignment.