# An Algebraic Hardness Criterion for Surjective Constraint Satisfaction

The constraint satisfaction problem (CSP) on a relational structure B is to decide, given a set of constraints on variables where the relations come from B, whether or not there is a assignment to the variables satisfying all of the constraints; the surjective CSP is the variant where one decides the existence of a surjective satisfying assignment onto the universe of B. We present an algebraic condition on the polymorphism clone of B and prove that it is sufficient for the hardness of the surjective CSP on a finite structure B, in the sense that this problem admits a reduction from a certain fixed-structure CSP. To our knowledge, this is the first result that allows one to use algebraic information from a relational structure B to infer information on the complexity hardness of surjective constraint satisfaction on B. A corollary of our result is that, on any finite non-trivial structure having only essentially unary polymorphisms, surjective constraint satisfaction is NP-complete.

## Authors

• 11 publications
• ### Algebraic Global Gadgetry for Surjective Constraint Satisfaction

The constraint satisfaction problem (CSP) on a finite relational structu...
05/22/2020 ∙ by Hubie Chen, et al. ∙ 0

• ### Asking the metaquestions in constraint tractability

The constraint satisfaction problem (CSP) involves deciding, given a set...
04/04/2016 ∙ by Hubie Chen, et al. ∙ 0

• ### Sensitive instances of the Constraint Satisfaction Problem

We investigate the impact of modifying the constraining relations of a C...
05/01/2020 ∙ by Libor Barto, et al. ∙ 0

• ### Hardness of Network Satisfaction for Relation Algebras with Normal Representations

We study the computational complexity of the general network satisfactio...
12/18/2019 ∙ by Manuel Bodirsky, et al. ∙ 0

• ### A dichotomy theorem for nonuniform CSPs simplified

In a non-uniform Constraint Satisfaction problem CSP(G), where G is a se...
07/16/2020 ∙ by Andrei A. Bulatov, et al. ∙ 0

• ### Searching for an algebra on CSP solutions

The Constraint Satisfaction Problem (CSP) is a problem of computing a ho...
08/28/2017 ∙ by Rustem Takhanov, et al. ∙ 0

• ### Voting algorithms for unique games on complete graphs

An approximation algorithm for a Constraint Satisfaction Problem is call...
10/22/2021 ∙ by Antoine Méot, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

The constraint satisfaction problem (CSP)

is a computational problem in which one is to decide, given a set of constraints on variables, whether or not there is an assignment to the variables satisfying all of the constraints. This problem appears in many guises throughout computer science, for instance, in database theory, artificial intelligence, and the study of graph homomorphisms. One obtains a rich and natural family of problems by defining, for each relational structure

, the problem to be the case of the CSP where the relations used to specify constraints must come from . An increasing literature studies the algorithmic and complexity behavior of this problem family, focusing on finite and finite-like structures [1, 12, 2]

; a primary research issue is to determine which such problems are polynomial-time tractable, and which are not. To this end of classifying problems, a so-called

algebraic approach has been quite fruitful [5]. In short, this approach is founded on the facts that the complexity of a problem depends (up to polynomial-time reducibility) only on the set of relations that are primitive positive definable from , and that this set of relations can be derived from the clone of polymorphisms of . Hence, the project of classifying all relational structures according to the complexity of can be formulated as a classification question on clones; this permits the employment of algebraic notions and techniques in this project. (See the next section for formal definitions of the notions discussed in this introduction.)

A natural variant of the CSP is the surjective CSP, where an instance is again a set of constraints, but one is to decide whether or not there is a surjective satisfying assignment to the variables. For each relational structure , one may define to be the surjective CSP on , in analogy to the definition of . Note that one can equivalently define to be the problem of deciding, given as input a relational structure , whether or not there is a surjective homomorphism from to . An early result on this problem family was the complexity classification of all two-element structures [7, Proposition 6.11],  [8, Proposition 4.7]. There is recent interest in understanding the complexity of these problems, which perhaps focuses on the cases where the structure is a graph; we refer the reader to the survey [3] for further information and pointers, and also can reference the related articles [13, 10, 11]. The introduction in the survey [3] suggests that the problems “seem to be very difficult to classify in terms of complexity”, and that “standard methods to prove easiness or hardness fail.” Indeed, in contrast to the vanilla CSP, there is no known way to reduce the complexity classification of the problems to a classification of clones. In particular, there is no known result showing that the complexity of a problem depends only on the relations that are primitive positive definable from . Thus far, there has been no success in using algebraic information based on the polymorphisms of to deduce complexity hardness consequences for the problem . (The claims given here are relative to the best of our knowledge).

In this article, we give (to our knowledge) the first result which allows one to use algebraic information from the polymorphisms of a structure to infer information about the complexity hardness of . Let us assume that the structures under discussion are finite relational structures. It is known and straightforward to verify that the problem polynomial-time reduces to the problem , where denotes the expansion of by constants [3, Section 2]. We give a sufficient condition for the problem to polynomial-time reduce to the problem , and hence for the equivalence of these two problems (up to polynomial-time reducibility). From a high level, our sufficient condition requires a certain relationship between the diagonal and the image of an operation, for each operation in the polymorphism clone of . Any structure whose polymorphisms are all essentially unary satisfies our sufficient condition, and a corollary of our main theorem is that, for any such structure (having a non-trivial universe), the problem is NP-complete. In the classification of two-element structures [7, Proposition 6.11], each structure on which is proved NP-complete has only essentially unary polymorphisms (this can be inferred from existing results [6, Theorem 5.1]). Hence, the just-named corollary yields a new algebraic proof of the hardness results needed for this classification; we find this proof to be a desirable, concise alternative to the relational argumentation carried out in previously known proofs of this classification [7, Proposition 6.11],  [8, Proposition 4.7].

We hope that our result might lead to further interaction between the study of surjective constraint satisfaction and universal algebra, and in particular that the techniques that we present might be used to prove new hardness results or to simplify known hardness proofs.

## 2 Preliminaries

For a natural number , we use to denote the set . We use to denote the power set of a set .

### 2.1 Logic and computational problems

We make basic use of the syntax and semantics of relational first-order logic. A signature is a set of relation symbols; each relation symbol has an associated arity (a natural number), denoted by . A structure over signature consists of a universe which is a set, and an interpretation for each relation symbol . In this article, we assume that signatures under discussion are finite, and focus on finite structures; a structure is finite if its universe is finite. When is a structure over signature , we define to be the expansion of “by constants”, that is, the expansion which is defined on signature , where each has unary arity and is assumed not to be in , and where .

By an atom, we refer to a formula of the form where is a relation symbol, , and the are variables; by a variable equality, we refer to a formula of the form where and are variables. A pp-formula (short for primitive positive formula) is a formula built using atoms, variable equalities, conjunction , and existential quantification . A quantifier-free pp-formula is a pp-formula that does not contain existential quantification, that is, a pp-formula that is a conjunction of atoms and variable equalities. A relation is pp-definable over a structure if there exists a pp-formula such that a tuple is in if and only if ; when such a pp-formula exists, it is called a pp-definition of over .

We now define the computational problems to be studied. For each structure , define to be the problem of deciding, given a conjunction of atoms (over the signature of ), whether or not there is a map to defined on the variables of such that . For each structure , define to be the problem of deciding, given a pair where is a set of variables and is a conjunction of atoms (over the signature of ) with variables from , whether or not there is a surjective map such that .

Note that these two problems are sometimes formulated as relational homomorphism problems; for example, one can define as the problem of deciding, given a structure over the signature of , whether or not there is a surjective homomorphism from to . This is an equivalent formulation: an instance of can be translated naturally to the structure with universe and where if and only if is present in ; this structure admits a surjective homomorphism to if and only if is a yes instance of as we have defined it. One can also naturally invert this passage, to translate from the homomorphism formulation to ours. Let us remark that in our formulation of , when is an instance, it is permitted that contain variables that are not present in ; indeed, whether or not the instance is a yes instance may be sensitive to the exact number of such variables, and this is why this variable set is given explicitly.

We now make a simple observation which essentially says that one could alternatively define by allowing the formula to be a quantifier-free pp-formula, as variable equalities may be efficiently eliminated in a way that preserves the existence of a surjective satisfying assignment.

###### Proposition 2.1

There exists a polynomial-time algorithm that, given a pair where is a quantifier-free pp-formula with variables from , outputs a pair where is a conjunction of atoms with variables from and having the following property: for any structure (whose signature contains the relation symbols present in ), there exists a surjective map such that if and only if there exists a surjective map such that .

Proof. The algorithm repeatedly eliminates variable equalities one at a time, until no more exist. Precisely, given a pair , it iterates the following two steps as long as contains a variable equality. The first step is to simply obtain by removing from all variable equalities that equate the same variable, and then replace by . The second step is to check if contains a variable equality between two different variables; if so, the algorithm picks such an equality , obtains by replacing all instances of with , and then replaces by . The output of the algorithm is the final value of . It is straightforwardly verified that this final value has the desired property (by checking that each of the two steps preserve the property).

### 2.2 Algebra

All operations under consideration are assumed to be of finite arity greater than or equal to . We use to denote the image of an operation . The diagonal of an operation , denoted by , is the unary operation defined by . Although not the usual definition, it is correct to say that an operation is essentially unary if and only if there exists such that .

When are tuples on having the same arity and is an operation, the tuple is the arity tuple obtained by applying coordinatewise. The entries of a tuple of arity are denoted by . Let be a relation, and let be an operation; we say that is a polymorphism of or that is preserved by if for any choice of tuples , it holds that . An operation is a polymorphism of a structure if is a polymorphism of each relation of ; we use to denote the set of all polymorphisms of . It is known that, for any structure , the set is a clone, which is a set of operations that contains all projections and is closed under composition.

We will make use of the following characterization of pp-definability relative to a structure .

###### Theorem 2.2

[9, 4] A non-empty relation is pp-definable over a finite structure if and only if each operation is a polymorphism of .

## 3 Hardness result

Throughout this section, will be a finite set; we set and use to denote a fixed enumeration of the elements of .

We give a complexity hardness result on under the assumption that the polymorphism clone of satisfies a particular property, which we now define. We say that a clone on a set is diagonal-cautious if there exists a map such that:

• for each operation , it holds that , and

• for each tuple , if , then .

Roughly speaking, this condition yields that, when the diagonal of an operation is not surjective, then the image of is contained in a proper subset of that is given by as a function of .

###### Example 3.1

When a clone consists only of essentially unary operations, it is diagonal-cautious via the map , as for an essentially unary operation , it holds that .

###### Example 3.2

When each operation in a clone has a surjective diagonal, the clone is diagonal-cautious via the map given in the previous example.

The following lemma is the key to our hardness result; it provides a quantifier-free pp-formula which will be used as a gadget in the hardness proof.

###### Lemma 3.3

Suppose that is a finite structure whose universe has size strictly greater than , and suppose that is diagonal-cautious via . There exists a quantifier-free pp-formula such that:

• If it holds that , then .

• For each , it holds that .

• If it holds that , then there exists a unary polymorphism of such that .

Proof. Let

be tuples from such that the following three conditions hold:

• It holds that .

• For each , it holds that .

• It holds that .

Visualizing the tuples as rows (as above), condition is equivalent to the assertion that each tuple from occurs exactly once as a column; condition enforces that the first columns are the tuples with constant values (respectively); and, condition enforces that the th column is a rainbow column in that each element of occurs exactly once in that column.

Let be the -ary relation . It is well-known and straightforward to verify that the relation is preserved by all polymorphisms of . By Theorem 2.2, we have that has a pp-definition over . We may and do assume that is in prenex normal form, in particular, we assume where is a conjunction of atoms and equalities.

Since , there exist tuples such that, for each , it holds that . By condition , there exist values such that, for each , it holds that . Define as . We associate the variable tuples and , so that may be viewed as a formula with variables from . We verify that has the three conditions given in the lemma statement, as follows.

(1): Suppose that . Then is of the form where is a polymorphism of . We have

 {b1,…,bn,c,d1,…,dm}⊆image(f)⊆G(^f(b∗1),…,^f(b∗n))=G(b1,…,bn).

The second containment follows from the definition of diagonal-cautious, and the equality follows from .

(2): We had that, for each , it holds that . By the choice of the and the definition of , it holds (for each ) that . Condition (2) then follows immediately from conditions and .

(3): Suppose that . By definition of , we have that there exists a tuple beginning with that satisfies on . By the definition of , we have that there exists a tuple beginning with such that . There exists a polymorphism of such that . By condition , we have that .

Let us make some remarks. The relation in the just-given proof is straightforwardly verified (via Theorem 2.2) to be the smallest pp-definable relation (over ) that contains all of the tuples . The definition of yields that the relation defined by (over ) is a subset of ; the verification of condition (2) yields that each of the tuples is contained in the relation defined by . Therefore, the formula defines precisely the relation . A key feature of the lemma, which is critical for our application to surjective constraint satisfaction, is that the formula is quantifier-free. We believe that it may be of interest to search for further applications of this lemma.

The following is our main theorem.

###### Theorem 3.4

Suppose that is a finite structure such that is diagonal-cautious. Then the problem many-one polynomial-time reduces to .

Proof. The result is clear if the universe of has size , so assume that it has size strictly greater than . Let be the quantifier-free pp-formula given by Lemma 3.3. Let be an instance of which uses variables . The reduction creates an instance of as follows. It first creates a quantifier-free pp-formula that uses variables

 U′=U∪{v1,…,vn}∪⋃u∈U{yu1,…,yum}.

Here, each of the variables given in the description of is assumed to be distinct from the others, so that . Let be the formula obtained from by replacing each atom of the form by the variable equality . The formula is defined as . The output of the reduction is the algorithm of Proposition 2.1 applied to .

To prove the correctness of this reduction, we need to show that there exists a map such that if and only if there exists a surjective map such that .

For the forward direction, define to be the extension of such that for each . It holds that is surjective and that . By property (2) in the statement of Lemma 3.3, there exists an extension of such that .

For the backward direction, we argue as follows. We claim that . If not, then by the definition of diagonal-cautious, it holds that ; by property (1) in the statement of Lemma 3.3 and by the definition of , it follows that for each , contradicting that is surjective. By property (3) in the statement of Lemma 3.3, there exists a unary polymorphism of such that ; by the just-established claim, is a bijection. Since the set of unary polymorphisms of a structure is closed under composition and since is by assumption finite, the inverse of is also a polymorphism of . Hence it holds that , where denotes the composition of with . Since maps each variable to , we can infer that .

###### Corollary 3.5

Suppose that is a finite structure whose universe has size strictly greater than . If each polymorphism of is essentially unary, then is NP-complete.

Proof. The problem is in NP whenever is a finite structure, so it suffices to prove NP-hardness. By Example 3.1, we have that is diagonal-cautious. Hence, we can apply Theorem 3.4, and it suffices to argue that is NP-hard. Since is by definition the expansion of with constants, the polymorphisms of are exactly the idempotent polymorphisms of ; here then, the polymorphisms of are the projections. It is well-known that a structure having only projections as polymorphisms has a NP-hard CSP [5] (note that in this case, Theorem 2.2 yields that every relation over the structure’s universe is pp-definable).

#### Acknowledgements.

The author thanks Matt Valeriote, Barny Martin, and Yuichi Yoshida for useful comments and feedback. The author was supported by the Spanish Project FORMALISM (TIN2007-66523), by the Basque Government Project S-PE12UN050(SAI12/219), and by the University of the Basque Country under grant UFI11/45.

## References

• [1] L. Barto and M. Kozik. Constraint satisfaction problems of bounded width. In Proceedings of FOCS’09, 2009.
• [2] Manuel Bodirsky. Complexity classification in infinite-domain constraint satisfaction. CoRR, abs/1201.0856, 2012.
• [3] Manuel Bodirsky, Jan Kára, and Barnaby Martin. The complexity of surjective homomorphism problems - a survey. Discrete Applied Mathematics, 160(12):1680–1690, 2012.
• [4] V. G. Bodnarčuk, L. A. Kalužnin, V. N. Kotov, and B. A. Romov. Galois theory for post algebras, part I and II. Cybernetics, 5:243–252, 531–539, 1969.
• [5] A. Bulatov, P. Jeavons, and A. Krokhin. Classifying the Complexity of Constraints using Finite Algebras. SIAM Journal on Computing, 34(3):720–742, 2005.
• [6] Hubie Chen. A rendezvous of logic, complexity, and algebra. ACM Computing Surveys, 42(1), 2009.
• [7] N. Creignou, S. Khanna, and M. Sudan. Complexity Classification of Boolean Constraint Satisfaction Problems. SIAM Monographs on Discrete Mathematics and Applications. Society for Industrial and Applied Mathematics, 2001.
• [8] Nadia Creignou and Jean-Jacques Hébrard. On generating all solutions of generalized satisfiability problems. ITA, 31(6):499–511, 1997.
• [9] D. Geiger. Closed Systems of Functions and Predicates. Pacific Journal of Mathematics, 27:95–100, 1968.
• [10] Petr A. Golovach, Daniël Paulusma, and Jian Song. Computing vertex-surjective homomorphisms to partially reflexive trees. Theor. Comput. Sci., 457:86–100, 2012.
• [11] Pavol Hell. Graph partitions with prescribed patterns. Eur. J. Comb., 35:335–353, 2014.
• [12] P. Idziak, P. Markovic, R. McKenzie, M. Valeriote, and R. Willard. Tractability and learnability arising from algebras with few subpowers. SIAM J. Comput., 39(7):3023–3037, 2010.
• [13] Hannes Uppman. Max-sur-csp on two elements. In CP, pages 38–54, 2012.