An Algebraic Hardness Criterion for Surjective Constraint Satisfaction
aa r X i v : . [ c s . L O ] J un An Algebraic Hardness Criterion for Surjective ConstraintSatisfaction
Hubie ChenDepartamento LSIFacultad de Inform´aticaUniversidad del Pa´ıs VascoSan Sebasti´an, Spain and
IKERBASQUE, Basque Foundation for ScienceBilbao, Spain
Abstract
The constraint satisfaction problem (CSP) on a relational structure B is to decide, givena set of constraints on variables where the relations come from B , whether or not there is aassignment to the variables satisfying all of the constraints; the surjective CSP is the variantwhere 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 itis sufficient for the hardness of the surjective CSP on a finite structure B , in the sense thatthis problem admits a reduction from a certain fixed-structure CSP. To our knowledge, thisis 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 . Acorollary of our result is that, on any finite non-trivial structure having only essentially unarypolymorphisms, surjective constraint satisfaction is NP-complete. The constraint satisfaction problem (CSP) is a computational problem in which one is to decide, given a setof constraints on variables, whether or not there is an assignment to the variables satisfying all of the con-straints. 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 prob-lems by defining, for each relational structure B , the problem CSP ( B ) to be the case of the CSP where therelations used to specify constraints must come from B . An increasing literature studies the algorithmic andcomplexity behavior of this problem family, focusing on finite and finite-like structures [1, 12, 2]; a primaryresearch issue is to determine which such problems are polynomial-time tractable, and which are not. Tothis end of classifying problems, a so-called algebraic approach has been quite fruitful [5]. In short, thisapproach is founded on the facts that the complexity of a problem CSP ( B ) depends (up to polynomial-timereducibility) only on the set of relations that are primitive positive definable from B , and that this set of re-lations can be derived from the clone of polymorphisms of B . Hence, the project of classifying all relationalstructures according to the complexity of CSP ( B ) can be formulated as a classification question on clones;1his permits the employment of algebraic notions and techniques in this project. (See the next section forformal 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 oneis to decide whether or not there is a surjective satisfying assignment to the variables. For each relationalstructure B , one may define SCSP ( B ) to be the surjective CSP on B , in analogy to the definition of CSP ( B ) .Note that one can equivalently define SCSP ( B ) to be the problem of deciding, given as input a relationalstructure A , whether or not there is a surjective homomorphism from A to B . An early result on this problemfamily was the complexity classification of all two-element structures [7, Proposition 6.11], [8, Proposition4.7]. There is recent interest in understanding the complexity of these problems, which perhaps focuseson the cases where the structure B is a graph; we refer the reader to the survey [3] for further informationand pointers, and also can reference the related articles [13, 10, 11]. The introduction in the survey [3]suggests that the problems SCSP ( B ) “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 noknown way to reduce the complexity classification of the problems SCSP ( B ) to a classification of clones.In particular, there is no known result showing that the complexity of a problem SCSP ( B ) depends onlyon the relations that are primitive positive definable from B . Thus far, there has been no success in usingalgebraic information based on the polymorphisms of B to deduce complexity hardness consequences forthe problem SCSP ( B ) . (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 informationfrom the polymorphisms of a structure B to infer information about the complexity hardness of SCSP ( B ) .Let us assume that the structures under discussion are finite relational structures. It is known and straight-forward to verify that the problem SCSP ( B ) polynomial-time reduces to the problem CSP ( B + ) , where B + denotes the expansion of B by constants [3, Section 2]. We give a sufficient condition for the problem CSP ( B + ) to polynomial-time reduce to the problem SCSP ( B ) , and hence for the equivalence of these twoproblems (up to polynomial-time reducibility). From a high level, our sufficient condition requires a certainrelationship between the diagonal and the image of an operation, for each operation in the polymorphismclone of B . Any structure B whose polymorphisms are all essentially unary satisfies our sufficient condi-tion, and a corollary of our main theorem is that, for any such structure B (having a non-trivial universe),the problem SCSP ( B ) is NP-complete. In the classification of two-element structures [7, Proposition 6.11],each structure on which SCSP ( B ) is proved NP-complete has only essentially unary polymorphisms (thiscan be inferred from existing results [6, Theorem 5.1]). Hence, the just-named corollary yields a new alge-braic proof of the hardness results needed for this classification; we find this proof to be a desirable, concisealternative 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 constraintsatisfaction and universal algebra, and in particular that the techniques that we present might be used toprove new hardness results or to simplify known hardness proofs. For a natural number n , we use n to denote the set { , . . . , n } . We use ℘ ( B ) to denote the power set of a set B . 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 relationsymbols ; each relation symbol R has an associated arity (a natural number), denoted by ar( R ) . A structure B over signature σ consists of a universe B which is a set, and an interpretation R B ⊆ B ar( R ) for eachrelation symbol R ∈ σ . In this article, we assume that signatures under discussion are finite, and focuson finite structures; a structure is finite if its universe is finite. When B is a structure over signature σ , wedefine B + to be the expansion of B “by constants”, that is, the expansion which is defined on signature σ ∪ { C b | b ∈ B } , where each C b has unary arity and is assumed not to be in σ , and where C B + b = { b } .By an atom , we refer to a formula of the form R ( v , . . . , v k ) where R is a relation symbol, k = ar( R ) ,and the v i are variables; by a variable equality , we refer to a formula of the form u = v where u and v are variables. A pp-formula (short for primitive positive formula ) is a formula built using atoms, variableequalities, conjunction ( ∧ ) , and existential quantification ( ∃ ) . A quantifier-free pp-formula is a pp-formulathat does not contain existential quantification, that is, a pp-formula that is a conjunction of atoms andvariable equalities. A relation P ⊆ B m is pp-definable over a structure B if there exists a pp-formula ψ ( x , . . . , x m ) such that a tuple ( b , . . . , b m ) is in P if and only if B , b , . . . , b m | = ψ ; when such a pp-formula exists, it is called a pp-definition of P over B .We now define the computational problems to be studied. For each structure B , define CSP ( B ) to bethe problem of deciding, given a conjunction φ of atoms (over the signature of B ), whether or not there is amap f to B defined on the variables of φ such that B , f | = φ . For each structure B , define SCSP ( B ) to bethe problem of deciding, given a pair ( U, φ ) where U is a set of variables and φ is a conjunction of atoms(over the signature of B ) with variables from U , whether or not there is a surjective map f : U → B suchthat B , f | = φ .Note that these two problems are sometimes formulated as relational homomorphism problems; forexample, one can define SCSP ( B ) as the problem of deciding, given a structure A over the signature of B , whether or not there is a surjective homomorphism from A to B . This is an equivalent formulation:an instance ( U, φ ) of SCSP ( B ) can be translated naturally to the structure A with universe U and where ( u , . . . , u k ) ∈ R A if and only if R ( u , . . . , u k ) is present in φ ; this structure A admits a surjective ho-momorphism to B if and only if ( U, φ ) is a yes instance of SCSP ( B ) as we have defined it. One can alsonaturally invert this passage, to translate from the homomorphism formulation to ours. Let us remark thatin our formulation of SCSP ( B ) , when ( U, φ ) is an instance, it is permitted that U contain variables that arenot present in φ ; indeed, whether or not the instance is a yes instance may be sensitive to the exact numberof 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 SCSP ( B ) by allowing the formula φ to be a quantifier-free pp-formula, as variable equalities may be efficiently elimi-nated 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 ( W, φ ) where φ is a quantifier-free pp-formula with variables from W , outputs a pair ( W ′ , φ ′ ) where φ ′ is a conjunction of atoms withvariables from W ′ and having the following property: for any structure B (whose signature contains therelation symbols present in φ ), there exists a surjective map f : W → B such that B , f | = φ if and only ifthere exists a surjective map f ′ : W ′ → B such that B , f ′ | = φ ′ . Proof . The algorithm repeatedly eliminates variable equalities one at a time, until no more exist. Precisely,given a pair ( W, φ ) , it iterates the following two steps as long as φ contains a variable equality. The firststep is to simply obtain φ ′ by removing from φ all variable equalities u = u that equate the same variable,3nd then replace ( W, φ ) by ( W, φ ′ ) . The second step is to check if φ contains a variable equality u = v between two different variables; if so, the algorithm picks such an equality u = v , obtains φ ′ by replacingall instances of v with u , and then replaces ( W, φ ) by ( W \ { v } , φ ′ ) . The output of the algorithm is the finalvalue of ( W, φ ) . It is straightforwardly verified that this final value has the desired property (by checkingthat each of the two steps preserve the property). (cid:3) All operations under consideration are assumed to be of finite arity greater than or equal to . We use image ( f ) to denote the image of an operation f . The diagonal of an operation f : B k → B , denoted by ˆ f , is the unary operation defined by ˆ f ( b ) = f ( b, . . . , b ) . Although not the usual definition, it is correctto say that an operation f : B k → B is essentially unary if and only if there exists i ∈ k such that f ( b , . . . , b k ) = ˆ f ( b i ) .When t , . . . , t k are tuples on B having the same arity m and f : B k → B is an operation, the tuple f ( t , . . . , t k ) is the arity m tuple obtained by applying f coordinatewise. The entries of a tuple t of arity m are denoted by t = ( t , . . . , t m ) . Let P ⊆ B m be a relation, and let f : B k → B be an operation; wesay that f is a polymorphism of P or that P is preserved by f if for any choice of k tuples t , . . . , t k ∈ P ,it holds that f ( t , . . . , t k ) ∈ P . An operation f : B k → B is a polymorphism of a structure B if f is apolymorphism of each relation of B ; we use Pol ( B ) to denote the set of all polymorphisms of B . It is knownthat, for any structure B , the set Pol ( B ) is a clone , which is a set of operations that contains all projectionsand is closed under composition.We will make use of the following characterization of pp-definability relative to a structure B . Theorem 2.2 [9, 4] A non-empty relation P ⊆ B m is pp-definable over a finite structure B if and only ifeach operation f ∈ Pol ( B ) is a polymorphism of P . Throughout this section, B will be a finite set; we set n = | B | and use b ∗ , . . . , b ∗ n to denote a fixed enumer-ation of the elements of B .We give a complexity hardness result on SCSP ( B ) under the assumption that the polymorphism clone of B satisfies a particular property, which we now define. We say that a clone C on a set B is diagonal-cautious if there exists a map G : B n → ℘ ( B ) such that: • for each operation f ∈ C , it holds that image ( f ) ⊆ G ( ˆ f ( b ∗ ) , . . . , ˆ f ( b ∗ n )) , and • for each tuple ( b , . . . , b n ) ∈ B n , if { b , . . . , b n } 6 = B , then G ( b , . . . , b n ) = B .Roughly speaking, this condition yields that, when the diagonal of an operation f ∈ C is not surjective, thenthe image of f is contained in a proper subset of B that is given by G as a function of ˆ f . Example 3.1
When a clone consists only of essentially unary operations, it is diagonal-cautious via themap G ( b , . . . , b n ) = { b , . . . , b n } , as for an essentially unary operation f , it holds that image ( f ) ⊆{ ˆ f ( b ∗ ) , . . . , ˆ f ( b ∗ n ) } = image ( ˆ f ) . (cid:3) Example 3.2
When each operation in a clone has a surjective diagonal, the clone is diagonal-cautious viathe map G given in the previous example. (cid:3) quantifier-free pp-formula whichwill be used as a gadget in the hardness proof. Lemma 3.3
Suppose that B is a finite structure whose universe B has size strictly greater than , and sup-pose that Pol ( B ) is diagonal-cautious via G . There exists a quantifier-free pp-formula ψ ( v , . . . , v n , x, y , . . . , y m ) such that:(1) If it holds that B , b , . . . , b n , c, d , . . . , d m | = ψ , then b , . . . , b n , c, d , . . . , d m ∈ G ( b , . . . , b n ) .(2) For each c ∈ B , it holds that B , b ∗ , . . . , b ∗ n , c | = ∃ y . . . ∃ y m ψ .(3) If it holds that B , b , . . . , b n | = ∃ x ∃ y . . . ∃ y m ψ , then there exists a unary polymorphism u of B suchthat ( u ( b ∗ ) , . . . , u ( b ∗ n )) = ( b , . . . , b n ) . Proof . Let t = ( t , . . . , t n n ) ... ... t n = ( t n , . . . , t nn n ) be tuples from B ( n n ) such that the following three conditions hold:( α ) It holds that { ( t i , . . . , t ni ) | i ∈ n n } = B n .( β ) For each i ∈ n , it holds that { t i , . . . , t ni } = { b ∗ i } .( γ ) It holds that { t n +1 , . . . , t nn +1 } = B .Visualizing the tuples as rows (as above), condition ( α ) is equivalent to the assertion that each tuple from B n occurs exactly once as a column; condition ( β ) enforces that the first n columns are the tuples withconstant values b ∗ , . . . , b ∗ n (respectively); and, condition ( γ ) enforces that the ( n + 1) th column is a rainbow column in that each element of B occurs exactly once in that column.Let P be the ( n n ) -ary relation { f ( t , . . . , t n ) | f is an n -ary polymorphism of B } . It is well-knownand straightforward to verify that the relation P is preserved by all polymorphisms of B . By Theorem 2.2,we have that P has a pp-definition φ ( w , . . . , w n n ) over B . We may and do assume that φ is in prenexnormal form, in particular, we assume φ = ∃ z . . . ∃ z q θ ( w , . . . , w n n , z , . . . , z q ) where θ is a conjunctionof atoms and equalities.Since t , . . . , t n ∈ P , there exist tuples u , . . . , u n ∈ B q such that, for each k ∈ n , it holds that B , ( t k , u k ) | = θ . By condition ( α ) , there exist values a , . . . , a q ∈ n n such that, for each i ∈ q , it holds that ( u i , . . . , u ni ) = ( t a i , . . . , t na i ) . Define ψ ( w , . . . , w n n ) as θ ( w , . . . , w n n , w a , . . . , w a q ) . We associate thevariable tuples ( w , . . . , w n n ) and ( v , . . . , v n , x, y , . . . , y m ) , so that ψ may be viewed as a formula withvariables from { v , . . . , v n , x, y , . . . , y m } . We verify that ψ has the three conditions given in the lemmastatement, as follows.(1): Suppose that B , b , . . . , b n , c, d , . . . , d m | = ψ . Then ( b , . . . , b n , c, d , . . . , d m ) is of the form f ( t , . . . , t n ) where f is a polymorphism of B . We have { b , . . . , b n , c, d , . . . , d m } ⊆ image ( f ) ⊆ G ( ˆ f ( b ∗ ) , . . . , ˆ f ( b ∗ n )) = G ( b , . . . , b n ) . The second containment follows from the definition of diagonal-cautious , and the equality follows from ( β ) . 52): We had that, for each k ∈ n , it holds that B , ( t k , u k ) | = θ . By the choice of the a i and the definitionof ψ , it holds (for each k ∈ n ) that B , t k | = ψ . Condition (2) then follows immediately from conditions ( α ) and ( β ) .(3): Suppose that B , b , . . . , b n | = ∃ x ∃ y . . . ∃ y m ψ . By definition of ψ , we have that there exists atuple beginning with ( b , . . . , b n ) that satisfies θ on B . By the definition of θ , we have that there existsa tuple t beginning with ( b , . . . , b n ) such that t ∈ P . There exists a polymorphism f of B such that t = f ( t , . . . , t n ) . By condition ( β ) , we have that ( ˆ f ( b ∗ ) , . . . , ˆ f ( b ∗ n )) = ( b , . . . , b n ) . (cid:3) Let us make some remarks. The relation P in the just-given proof is straightforwardly verified (viaTheorem 2.2) to be the smallest pp-definable relation (over B ) that contains all of the tuples t , . . . , t n . Thedefinition of ψ yields that the relation defined by ψ (over B ) is a subset of P ; the verification of condition (2)yields that each of the tuples t , . . . , t n is contained in the relation defined by ψ . Therefore, the formula ψ defines precisely the relation P . A key feature of the lemma, which is critical for our application to surjectiveconstraint satisfaction, is that the formula ψ is quantifier-free. We believe that it may be of interest to searchfor further applications of this lemma.The following is our main theorem. Theorem 3.4
Suppose that B is a finite structure such that Pol ( B ) is diagonal-cautious. Then the problem CSP ( B + ) many-one polynomial-time reduces to SCSP ( B ) . Proof . The result is clear if the universe B of B has size , so assume that it has size strictly greater than . Let ψ ( v , . . . , v n , x, y , . . . , y m ) be the quantifier-free pp-formula given by Lemma 3.3. Let φ be aninstance of CSP ( B + ) which uses variables U . The reduction creates an instance of SCSP ( B ) as follows. Itfirst creates a quantifier-free pp-formula φ ′ that uses variables U ′ = U ∪ { v , . . . , v n } ∪ [ u ∈ U { y u , . . . , y um } . Here, each of the variables given in the description of U ′ is assumed to be distinct from the others, so that | U ′ | = | U | + n + | U | m . Let φ = be the formula obtained from φ by replacing each atom of the form C b ∗ j ( u ) by the variable equality u = v j . The formula φ ′ is defined as φ = ∧ V u ∈ U ψ ( v , . . . , v n , u, y u , . . . , y um ) . Theoutput of the reduction is the algorithm of Proposition 2.1 applied to ( U ′ , φ ′ ) .To prove the correctness of this reduction, we need to show that there exists a map f : U → B such that B + , f | = φ if and only if there exists a surjective map f ′ : U ′ → B such that B , f ′ | = φ ′ .For the forward direction, define f = : U ∪ { v , . . . , v n } → B to be the extension of f such that f = ( v i ) = b ∗ i for each i ∈ n . It holds that f = is surjective and that B , f = | = φ = . By property (2) in thestatement of Lemma 3.3, there exists an extension f ′ : U ′ → B of f = such that B , f ′ | = φ ′ .For the backward direction, we argue as follows. We claim that { f ′ ( v ) , . . . , f ′ ( v n ) } = B . If not,then by the definition of diagonal-cautious, it holds that G ( f ′ ( v ) , . . . , f ′ ( v n )) = B ; by property (1) in thestatement of Lemma 3.3 and by the definition of φ ′ , it follows that f ′ ( u ′ ) ∈ G ( f ′ ( v ) , . . . , f ′ ( v n )) for each u ′ ∈ U ′ , contradicting that f ′ is surjective. By property (3) in the statement of Lemma 3.3, there exists aunary polymorphism u of B such that ( u ( b ∗ ) , . . . , u ( b ∗ n )) = ( f ′ ( v ) , . . . , f ′ ( v n )) ; by the just-establishedclaim, u is a bijection. Since the set of unary polymorphisms of a structure is closed under compositionand since B is by assumption finite, the inverse u − of u is also a polymorphism of B . Hence it holdsthat B , u − ( f ′ ) | = φ ′ , where u − ( f ′ ) denotes the composition of f ′ with u − . Since u − ( f ′ ) maps eachvariable v j to b ∗ j , we can infer that B + , u − ( f ′ ) | = φ . (cid:3) orollary 3.5 Suppose that B is a finite structure whose universe B has size strictly greater than . If eachpolymorphism of B is essentially unary, then SCSP ( B ) is NP-complete. Proof . The problem
SCSP ( B ) is in NP whenever B is a finite structure, so it suffices to prove NP-hardness.By Example 3.1, we have that Pol ( B ) is diagonal-cautious. Hence, we can apply Theorem 3.4, and itsuffices to argue that CSP ( B + ) is NP-hard. Since B + is by definition the expansion of B with constants,the polymorphisms of B + are exactly the idempotent polymorphisms of B ; here then, the polymorphismsof B + are the projections. It is well-known that a structure having only projections as polymorphisms has aNP-hard CSP [5] (note that in this case, Theorem 2.2 yields that every relation over the structure’s universeis pp-definable). (cid:3) Acknowledgements.
The author thanks Matt Valeriote, Barny Martin, and Yuichi Yoshida for useful com-ments and feedback. The author was supported by the Spanish Project FORMALISM (TIN2007-66523), bythe Basque Government Project S-PE12UN050(SAI12/219), and by the University of the Basque Countryunder grant UFI11/45.
References [1] L. Barto and M. Kozik. Constraint satisfaction problems of bounded width. In
Proceedings ofFOCS’09 , 2009.[2] Manuel Bodirsky. Complexity classification in infinite-domain constraint satisfaction.
CoRR ,abs/1201.0856, 2012.[3] Manuel Bodirsky, Jan K´ara, and Barnaby Martin. The complexity of surjective homomorphism prob-lems - a survey.
Discrete Applied Mathematics , 160(12):1680–1690, 2012.[4] V. G. Bodnarˇcuk, L. A. Kaluˇznin, V. N. Kotov, and B. A. Romov. Galois theory for post algebras, partI and II.
Cybernetics , 5:243–252, 531–539, 1969.[5] A. Bulatov, P. Jeavons, and A. Krokhin. Classifying the Complexity of Constraints using Finite Alge-bras.
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 SatisfactionProblems . SIAM Monographs on Discrete Mathematics and Applications. Society for Industrial andApplied Mathematics, 2001.[8] Nadia Creignou and Jean-Jacques H´ebrard. On generating all solutions of generalized satisfiabilityproblems.
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¨el Paulusma, and Jian Song. Computing vertex-surjective homomorphisms topartially reflexive trees.
Theor. Comput. Sci. , 457:86–100, 2012.[11] Pavol Hell. Graph partitions with prescribed patterns.
Eur. J. Comb. , 35:335–353, 2014.712] P. Idziak, P. Markovic, R. McKenzie, M. Valeriote, and R. Willard. Tractability and learnability arisingfrom algebras with few subpowers.