Algebraic Global Gadgetry for Surjective Constraint Satisfaction
aa r X i v : . [ c s . CC ] J u l Algebraic Global Gadgetry for Surjective ConstraintSatisfaction
Hubie ChenBirkbeck, University of London [email protected]
Abstract
The constraint satisfaction problem (CSP) on a finite relational structure B isto 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 surjectivesatisfying assignment onto the universe of B .We present an algebraic framework for proving hardness results on surjective CSPs;essentially, this framework computes global gadgetry that permits one to present areduction from a classical CSP to a surjective CSP. We show how to derive a numberof hardness results for surjective CSP in this framework, including the hardness ofthe disconnected cut problem, of the no-rainbow 3-coloring problem, and of thesurjective CSP on all 2-element structures known to be intractable (in this setting).Our framework thus allows us to unify these hardness results, and reveal commonstructure among them; we believe that our hardness proof for the disconnected cutproblem is more succinct than the original. In our view, the framework also makesvery transparent a way in which classical CSPs can be reduced to surjective CSPs. When f : A → B and g : B → C are mappings, we use g ◦ f to denote their composition. Weadhere to the convention that for any set S , there is a single element in S ; this element is referredto as the empty tuple , and is denoted by ǫ . A signature is a set of relation symbols ; each relation symbol R has an associated arity (a naturalnumber), 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 each relation symbol R ∈ σ . We tend to use the letters A , B , . . . to denote structures, and the letters A, B, . . . to denote their respective universes. In thisarticle, we assume that signatures under discussion are finite, and also assume that all structuresunder discussion are finite; a structure is finite when its universe is finite.By an atom (over a signature σ ), we refer to a formula of the form R ( v , . . . , v k ) where R is arelation symbol (in σ ), k = ar( R ) , and the v i are variables. An ∧ -formula (over a signature σ ) is aconjunction β ∧ · · · ∧ β m where each conjunct β i is an atom (over σ ) or a variable equality v = v ′ .1ith respect to a structure B , an ∧ -formula φ over the signature of B is satisfied by an mapping f to B defined on the variables of φ when: • for each atom R ( v , . . . , v k ) in φ , it holds that ( f ( v ) , . . . , f ( v k )) ∈ R B , and • for each variable equality v = v ′ , it holds that f ( v ) = f ( v ′ ) .When this holds, we refer to f as a satisfying assignment of φ (over B ).We now define the computational problems to be studied. For each structure B , define CSP ( B ) to be the problem of deciding, given a ∧ -formula φ (over the signature of B ), whether or not thereexists a satisfying assignment, that is, a map f to B , defined on the variables of φ , that satisfies φ over B . For each structure B , define SCSP ( B ) to be the problem of deciding, given a pair ( U, φ ) where U is a set of variables and φ is a ∧ -formula (over the signature of B ) with variables from U , whether or not there exists a surjective satisfying assignment on U , that is, a surjective map f : U → B that satisfies φ over B . Unless mentioned otherwise, when discussing NP-hardness and NP-completeness, we refer tothese notions as defined with respect to polynomial-time many-one reductions.
Let B be a relational structure. A set of mappings F , each of which is from a finite set S to B , is ∧ -definable over B if there exists a ∧ -formula φ , whose variables are drawn from S , such that F isthe set of satisfying assignments f : S → B of φ , with respect to B . Let S be a finite set; when T isa set of mappings, each of which is from S to B , we use h T i B to denote the smallest ∧ -definable setof mappings from S to B (over B ) that contains T . (Such a smallest set exists, since one clearly has ∧ -definability of the intersection of two ∧ -definable sets of mappings all sharing the same type.)Let T be a set of mappings from a finite set I to a finite set B . A partial polymorphism of T is apartial mapping p : B J → B such that, for any selection s : J → T of maps, letting c i ∈ B J denotethe mapping taking each j ∈ J to ( s ( j ))( i ) :if the mapping from I to B sending each i ∈ I to the value p ( c i ) is defined at each point i ∈ I ,then it is contained in T .Conventionally, one speaks of a partial polymorphism of a relation Q ⊆ B k ; we here give a moregeneral formulation, as it will be convenient for us to deal here with arbitrary index sets I . When Q ⊆ B k is a relation, we apply the just-given definition by viewing each element of Q as a setof mappings from the set { , . . . , k } to B ; likewise, when p : B k → B is a partial mapping with k ≥ a natural number, we apply this definition by viewing each element of B k as a mapping from { , . . . , k } to B . A partial mapping p : B J → B is a partial polymorphism of a relational structureif it is a partial polymorphism of each of the relations of the structure.The following is a known result; it connects ∧ -definability to closure under partial polymor-phisms. We remark that, given an instance of a problem
SCSP ( B ) , variable equalities may be efficiently eliminated in away that preserves the existence of a surjective satisfying assignment [2, Proposition 2.1]. Likewise, given an instanceof a problem CSP ( B ) , variable equalities may be efficiently eliminated in a way that preserves the existence of a sat-isfying assignment. Thus, in these problems, whether or not one allows variable equalities in instances is a matter ofpresentation, for the complexity issues at hand. heorem 1.1 [8] Let B be a structure. Let T be a set of non-empty mappings from a finite set I to B ; for each i ∈ I , let π i : T → B denote the map defined by π i ( t ) = t ( i ) . The set h T i B is equal to theset T ′ of maps from I to B having a definition of the form i p ( π i ) , where p : B T → B is a partialpolymorphism (of B ) with domain { π i | i ∈ I } . A polymorphism is a partial polymorphism that is a total mapping. A total mapping p : B J → B is essentially unary if there exists j ∈ J and a unary operation u : B → B such that, for eachmapping h : J → B , it holds that p ( h ) = u ( h ( j )) . An automorphism of a structure B is a bijection σ : B → B such that, for each relation R B of B and for each tuple ( b , . . . , b k ) whose arity k is thatof R B , it holds that ( b , . . . , b k ) ∈ R B if and only if ( σ ( b ) , . . . , σ ( b k )) ∈ R B . It is well-known andstraightforward to verify that, for each finite structure B , a bijection σ : B → B is an automorphismif and only if it is a polymorphism.Let p : B J → B be a partial mapping. For each b ∈ B , let b J denote the mapping from J to B that sends each element j ∈ J to b . The diagonal of p , denoted by ˆ p , is the partial unary mappingfrom B to B such that ˆ p ( b ) = p ( b J ) for each b ∈ B . With respect to a structure B , we say that apartial mapping p : B J → B is automorphism-like when there exists j ∈ J and an automorphism γ (of B ) such that, for each mapping h : J → B , if p ( h ) is defined, then it is equal to γ ( h ( j )) . Throughout this section, let B be a finite relational structure, and let B be its universe. Let I bea finite set; let T be a set of mappings from I to B . Let us say that T is surjectively closed over B if each surjective mapping in h T i B is contained in { γ ◦ t | γ is an automorphism of B , t ∈ T } . Thefollowing is essentially a consequence of Theorem 1.1. Proposition 2.1
Let I , T be as described. For each i ∈ I , let π i : T → B denote the mapping definedby π i ( t ) = t ( i ) . The following are equivalent: • The set T is surjectively closed over B . • Each surjective partial polymorphism p : B T → B (of B ) with domain { π i | i ∈ I } is automorphism-like. In what follows, we generally use D to denote a finite set, V to denote a finite set of variables,and G V,D to denote the set of all mappings from V to D ; we will sometimes refer to elements of G V,D as assignments .Define an encoding (for B ) to be a finite set F of mappings, each of which is from a finite power D k of a finite set D to B ; we refer to k as the arity of such a mapping. Formally, an encoding for B is a finite set F such that there exists a finite set D where, for each f ∈ F , there exists k ≥ such that f is a mapping from D k to B . In what follows, we will give a sufficient condition for anencoding to yield a reduction from a classical CSP over a structure with universe D to the problem SCSP ( B ) . Assume F to be an encoding; define a ( V, F ) -application to be a pair ( v, f ) consisting ofa tuple of variables from V and a mapping f ∈ F such that the length of v is equal to the arity of f . Let A V,F denote the set of all ( V, F ) -applications.3 xample 2.2 Let D = { , } , B = { , , } , and let F be the encoding that contains the mappingsfrom D to B as well as the injective mappings from D to B . We have | F | = 9 . (This encodingwill be used in Section 3.2.)Let V be a set of size . As | V | = 4 and | D | = 2 , we have | G V,D | = 2 = 16 . The arity mappingsin F give rise to V, F ) -applications and the arity mappings in F give rise to | V | = 24 ( V, F ) -applications. Thus we have | A V,F | = 27 . (cid:3) For each g ∈ G V,D , when α = (( v , . . . , v k ) , f ) is an application in A V,F , define α [ g ] to be thevalue f ( g ( v ) , . . . , g ( v k )) ; define t [ g ] to be the map from A V,F to B where each application α ismapped to α [ g ] . Define T V = { t [ g ] | g ∈ G V,D } . Proposition 2.3
Let F be an encoding. There exists a polynomial-time algorithm that, given a finiteset V , computes an ∧ -formula (over the signature of B ) defining h T V i B . Definition 2.4
Let F be an encoding. Define a relational structure B to be F -stable if, for eachnon-empty finite set V , it holds that each map in T V is surjective, and T V is surjectively closed(over B ).Note that only the size of V matters in the definition of T V in Definition 2.4, in the sense thatwhen V and V ′ are of the same size, T V and T V ′ are equal up to relabelling of indices. Definition 2.5
Let F be an encoding. An F -induced relation of B is a relation Q ′ ⊆ D s (with s ≥ )such that, letting ( u , . . . , u s ) be a tuple of pairwise distinct variables, there exists: • a relation Q ⊆ B r that is either a relation of B or the equality relation on B , and • a tuple ( α , . . . , α r ) ∈ A rU,F such that Q ′ = { ( g ( u ) , . . . , g ( u s )) | g ∈ G U,D , (( t [ g ])( α ) , . . . , ( t [ g ])( α r )) ∈ Q } . We refer to Q as therelation that induces Q ′ , and to the pair ( Q, ( α , . . . , α r )) as the definition of Q ′ . Definition 2.6
Let F be an encoding. An F -induced template of B is a relational structure D withuniverse D and whose relations are all F -induced relations of B . Theorem 2.7
Let F be an encoding. Suppose that B is F -stable, and that D is an F -induced templateof B . Then, the problem CSP ( D ) polynomial-time many-one reduces to SCSP ( B ) . Proof . Let φ be an instance of CSP ( D ) with variables V . We may assume (up to polynomial-timecomputation) that φ does not include any variable equalities. We create an instance ( A V,F , ψ ) of SCSP ( B ) ; this is done by computing two ∧ -formulas ψ and ψ , and setting ψ = ψ ∧ ψ .Compute ψ to be an ∧ -formula defining h T V i B , where T V = { t [ g ] | g ∈ G V,D } ; such a formulais polynomial-time computable by Proposition 2.3.Compute ψ as follows. For each atom R ′ ( v , . . . , v s ) of φ where R ′ D is induced by a rela-tion R B , let c : { u , . . . , u s } → V be the mapping sending each u i to v i , and include the atom R ( c ( α ) , . . . , c ( α r )) in ψ ; here, ( α , . . . , α r ) is the tuple from Definition 2.5, and c acts on an ap-plication α by being applied individually to each variable in the variable tuple of α , that is, when α = (( u ′ , . . . , u ′ k ) , f ) , we have c ( α ) = (( c ( u ′ ) , . . . , c ( u ′ k )) , f ) . For each atom R ′ ( v , . . . , v s ) of φ where R ′ D is induced by the equality relation on B , let c and ( α , α ) be as above, and include the4tom c ( α ) = c ( α ) in ψ . We make the observation that, from Definition 2.5, a mapping g ∈ G V,D satisfies an atom R ′ ( v , . . . , v s ) of φ if and only if t [ g ] satisfies the corresponding atom or equalityin ψ .We argue that φ is a yes instance of CSP ( D ) if and only if ( A V,F , ψ ) is a yes instance of SCSP ( B ) .Suppose that g ∈ G V,D is a satisfying assignment of φ . The assignment t [ g ] satisfies ψ since t [ g ] ∈ T V . Since the assignment g satisfies each atom of φ , by the observation, the assignment t [ g ] satisfies each atom and equality of ψ , and so t [ g ] is a satisfying assignment of ψ . It also holdsthat t [ g ] is surjective by the definition of F -stable. Thus, we have that t [ g ] is a surjective satisfyingassignment of ψ . Next, suppose that there exists a surjective satisfying assignment t ′ of ψ . Since t ′ satisfies ψ , it holds that t ′ ∈ h T V i B . Since T V is surjectively closed (over B ) by F -stability, thereexists g ∈ G V,D such that t ′ = γ ( t [ g ]) for an automorphism γ of B . Since t ′ is a satisfying assignmentof ψ , so is t [ g ] ; it then follows from the observation that g is a satisfying assignment of φ . (cid:3) Inner symmetry
Each set of the form h T V i B is closed under the automorphisms of B , since each automorphism is apartial polymorphism (recall Theorem 1.1). We here present another form of symmetry that such aset h T V i B may possess, which we dub inner symmetry . Relative to a structure B and an encoding F ,we define an inner symmetry to be a pair σ = ( ρ, τ ) where ρ : D → D is a bijection, and τ : B → B is an automorphism of B such that F = { e σ ◦ f | f ∈ F } ; here, when g : D k → B is a mapping, e σ ( g ) : D k → B is defined as the composition τ ◦ g ◦ ( ρ, . . . , ρ ) , where ( ρ, . . . , ρ ) denotes the mappingfrom D k to D k that applies ρ to each entry of a tuple in D k . When σ is an inner symmetry, wenaturally extend the definition of e σ so that it is defined on each application: when α = ( v, f ) is anapplication, define e σ ( α ) = ( v, e σ ( f )) .The following theorem describes the symmetry on h T V i B induced by an inner symmetry. Theorem 2.8
Let B be a structure, let F be an encoding, and let σ = ( ρ, τ ) be an inner symmetrythereof. Let V be a non-empty finite set. For any map u : A V,F → B , define u ′ : A V,F → B by u ′ ( α ) = u ( e σ ( α )) ; it holds that u ∈ h T V i B if and only if u ′ ∈ h T V i B . Proof . For each g ∈ G V,D , define t ′ [ g ] : A V,F → B to map each α ∈ A V,F to ( e σ ( α ))[ g ] . Define T ′ V as { t ′ [ g ] | g ∈ G V,D } . By definition, T ′ V = { τ ( t [ ρ ( g )]) | g ∈ G V,D } ; since ρ is a bijection, we have that T ′ V = { τ ( t [ h ]) | h ∈ G V,D } . Since τ is an automorphism of B , we obtain h T V i B = h T ′ V i B .Since σ is an inner symmetry, we have F = { e σ ◦ f | f ∈ F } , from which it follows that theaction of e σ on applications in A V,F is a bijection on A V,F . We have t ′ [ g ]( α ) = t [ g ]( e σ ( α )) . For anymap u : A V,F → B , define u ′ : A V,F → B by u ′ ( α ) = u ( e σ ( α )) . For all u : A V,F → B , we have u ′ ∈ T ′ V ⇔ u ∈ T V , implying that u ′ ∈ h T ′ V i B ⇔ u ∈ h T V i B . Since h T V i B = h T ′ V i B , the theoremfollows. (cid:3) Throughout this section, we employ the following conventions. When B is a set and b ∈ B , weuse the notation b to denote the arity function from D to B sending the empty tuple to b . Let V be a set, and let F be an encoding. When b ∈ F , we overload the notation b and also use it todenote the unique ( V, F ) -application in which it appears. Relative to a structure B (understood5rom the context), when α , . . . , α k ∈ A V,F are applications and R is a relation symbol, we write R ( α , . . . , α k ) when, for each g ∈ G V,D , it holds that ( α [ g ] , . . . , α k [ g ]) ∈ R B ; when R is a symmetricbinary relation, we also say that α and α are adjacent. When α is an application in A V,F , and p : B T V → B is a partial mapping, we simplify notation by using p ( α ) to denote the value p ( π α ) (recall the definition of π α from Proposition 2.1). -cycle Let us use C to denote the reflexive -cycle, that is, the structure with universe C = { , , , } andsingle binary relation E C = C \ { (0 , , (2 , , (1 , , (3 , } . The problem SCSP ( C ) was shown tobe NP-complete by [7]; we here give a proof using our framework. When discussing this structure,we will say that two values c, c ′ ∈ C are adjacent when ( c, c ′ ) ∈ E C . Set D = { , , } . We use thenotation [ abc ] to denote the function f : D → C with ( f (0) , f (1) , f (3)) = ( a, b, c ) , so, for example [013] denotes the identity mapping from D to C . Define F as the encoding { , , , , [013] , [010] , [323] , [313] , [112] , [003] , [113] } . We will prove the following.
Theorem 3.1
The reflexive -cycle C is F -stable. We begin by observing the following.
Proposition 3.2
Define ρ : D → D as the bijection that swaps and ; define τ : B → B as thebijection that swaps and . The pair σ = ( ρ, τ ) is an inner symmetry of F and C . Proof . Consider the action of e σ on F . This action e σ transposes and ; [010] and [003] ; [323] and [112] ; and, [313] and [113] . It fixes each other element of F . (cid:3) Proof . (Theorem 3.1) Let V be a non-empty finite set; we need to show that T V is surjectivelyclosed. We use Proposition 2.1. It is straightforward to verify that each surjective partial polymor-phism of the described form that has a surjective diagonal is automorphism-like. We consider apartial polymorphism p : C T V → C whose domain is π α over all ( V, F ) -applications α ∈ A V,F . Weshow that if p has a non-surjective diagonal, then it is not surjective.By considerations of symmetry (namely, by the automorphisms and by the inner symmetries),it suffices to consider the following values for the diagonal values ( p (0) , p (1) , p (2) , p (3)) : (0 , , , , (0 , , , , (0 , , , , (1 , , , , (0 , , , , (0 , , , , (0 , , , , (0 , , , . We consider each ofthese cases.In each of the first cases, we argue as follows. Consider an application ( v, f ) with f : D → B in F and v ∈ V ; it is adjacent to , adjacent to , or adjacent to both and ; thus, for such anapplication, we have p ( v, f ) is adjacent to . It follows that for no such application do we have p ( v, f ) = 2 , and so p is not surjective.Case: diagonal (1 , , , . Observe that any application ( v, f ) with f : D → C in F \ { [013] } and v ∈ V ; is adjacent to , , or , and thus, for any such application, p ( v, f ) is adjacent to .Thus if is in the image of p , there exists a variable u ∈ V such that p ( u, [013]) = 2 . But then,for each f : D → C in F \ { [013] } , we have that ( u, [013]) and ( u, f ) are adjacent. ( u, [010]) and ( u, [003]) are adjacent to , which p maps to , and to ( u, [013]) , which p maps to ; this, by the6bservation, p ( u, [010]) = p ( u, [003]) = 1 . ( u, [323]) and ( u, [112]) are adjacent to the just-mentionedapplications, from which we obtain p ( u, [323]) = p ( u, [112]) = 1 .In order for p to be surjective, there exists a different variable u ′ ∈ V and f ′ ∈ F such that p ( u ′ , f ′ ) = 3 . It must be that ( u ′ , f ′ ) is not adjacent to . But then f ′ is [323] or [112] , and thiscontradicts that ( u ′ , f ′ ) is adjacent to ( u, f ) .Case: diagonal (0 , , , . There must be an application ( v, f ) with p ( v, f ) = 2 . Since ( v, f ) cannot be adjacent to nor , it must be that f = [323] . There must also be an application ( v ′ , f ′ ) with p ( v ′ , f ′ ) = 3 ; this application cannot be adjacent to nor , and so f ′ is [013] or [010] . ( v ′ , [323]) is adjacent to ( v ′ , f ′ ) , to , and to ( v, [323]) , and so p ( v ′ , [323]) is . ( v ′ , [313]) is adjacent to ( v ′ , [323]) ,to f ′ , to , and to , and thus it cannot be mapped to any value.Case: diagonal (0 , , , or (0 , , , . For each variable u ∈ F and each f : D → B in F , itholds that ( u, f ) is adjacent to either or . It follows that no such pair ( u, f ) maps to under p .Case: diagonal (0 , , , . If p is surjective, there exists ( v, f ) such that p ( v, f ) = 2 . ( v, f ) cannotbe adjacent to , implying that f = [323] or [112] . When f = [323] , we infer that p ( v, [010]) = 1 ,and then that p ( v, [013]) = p ( v, [313]) = p ( v, [113]) = 1 . Similarly, when f = [112] , we infer that p ( v, [003]) = 1 , and then that p ( v, [013]) = p ( v, [313]) = p ( v, [113]) = 1 . There exists ( v ′ , f ′ ) suchthat p ( v ′ , f ′ ) = 3 . ( v ′ , f ′ ) cannot be adjacent to nor , so f ′ is one of [013] , [313] , [113] . Thiscontradicts that ( v ′ , f ′ ) and ( v, f ′ ) are adjacent. (cid:3) Theorem 3.3
The problem
SCSP ( C ) is NP-complete. Proof . Define D ′ (following [7, Section 2]) to be the structure with universe { , , } and withrelations S D ′ = { (0 , , (1 , , (3 , , (3 , } , S D ′ = { (1 , , (1 , , (3 , , (3 , } ,S D ′ = { (1 , , (3 , , (3 , } , S D ′ = { (1 , , (1 , , (3 , } . Each of these relations is the intersection of binary F -induced relations: for S D ′ , use the definitions ( E C , (2 , ( u , [013]))) , ( E C , (( u , [013]) , ( u , [323]))) ; for S D ′ , the definitions ( E C , (2 , ( u , [013]))) , ( E C , (( u , [112]) , ( u , [013]))) ; for S D ′ , the definitions ( E C , (2 , ( u , [013]))) , ( E C , (2 , ( u , [013]))) , ( E C , (( u , [003]) , ( u , [323]))) ; and, for S D ′ , the definitions ( E C , (2 , ( u , [013]))) , ( E C , (2 , ( u , [013]))) , ( E C , (( u , [112]) , ( u , [010]))) . Let D be the F -induced template of B whose relations are all of thementioned F -induced relations. Then, we have CSP ( D ′ ) reduces to CSP ( D ) , and that CSP ( D ) re-duces to SCSP ( C ) by Theorem 2.7. The problem CSP ( D ′ ) is NP-complete, as argued in [7, Section2], and thus we conclude that SCSP ( C ) is NP-complete. (cid:3) -coloring Let N be the structure with universe N = { , , } and a single ternary relation R N = { ( a, b, c ) ∈ N | { a, b, c } 6 = N } . The problem
SCSP ( N ) was first shown to be NP-complete by Zhuk [9]; we give a proof which isakin to proofs given by Zhuk [9], using our framework.Define D = { , } , and define F as { , , } ∪ U where U is the set of all injective mappingsfrom D to N . We use the notation [ ab ] to denote the mapping f : D → N with ( f (0) , f (1)) = ( a, b ) .Let ι D : D → D denote the identity mapping on D ; it is straightforwardly verified that, for eachbijection τ : N → N , the pair ( ι D , τ ) is an inner symmetry of N and F .7 heorem 3.4 The structure N is F -stable. Proof . Let V be a non-empty finite set; we need to show that T V is surjectively closed. We useProposition 1.1. It is straightforward to verify that each surjective partial polymorphism of thedescribed form having a surjective diagonal is automorphism-like. Consider a partial polymorphism p : N T V → N whose domain is π α over all ( V, F ) -applications α ∈ A V,F . We show that if p hasa non-surjective diagonal, then it is not surjective. By considerations of symmetry (namely, by theautomorphisms and by the inner symmetries), we need only consider the following values for thediagonal (ˆ p (0) , ˆ p (1) , ˆ p (2)) : (0 , , , (0 , , .Diagonal (0 , , . Assume p is surjective; there exist applications ( v, [ ab ]) , ( v ′ , [ a ′ b ′ ]) such that p ( v, [ ab ]) = 1 , p ( v ′ , [ a ′ b ′ ]) = 2 . In the case that { a, b } = { a ′ , b ′ } , we have R ( a, ( v, [ ab ]) , ( v ′ , [ a ′ b ])) butthat these applications are, under p , equal to (0 , , , a contradiction. Otherwise, there is one valuein { a, b } ∩ { a ′ , b } ; suppose this value is b = b ′ . Let c be the value in N \ { a, b } , and c ′ be the value in N \ { a ′ , b ′ } . We claim that p ( v, [ ac ]) = 1 : if it is , we get a contradiction via R ( b, ( v, [ ab ]) , ( v, [ ac ])) ,and if it is , we get a contradiction via R (( v, [ ac ]) , ( v, [ ab ]) , ( v ′ , [ a ′ b ′ ])) . By analogous reasoning, weobtain that p ( v ′ , [ ac ′ ]) = 2 . But since { a, c } = { a ′ , c ′ } , we may reason as in the previous case toobtain a contradiction.Diagonal (0 , , . Assume p is surjective; there exists an application ( v, [ ab ]) such that p ( v, [ ab ]) =2 . We have that { a, b } 6 = { , } , for if not, we would have a contradiction via R (0 , , ( v, [ ab ])) . Anal-ogously, we have that { a, b } 6 = { , } . Thus, we have { a, b } = { , } . Suppose that [ ab ] is [12] (thecase where it is [21] is analogous). Consider the value of p ( v, [02]) : if it is , we have a contradictionvia R (( v, [02]) , , ( v, [12])) , if it is , we have a contradiction via R (0 , ( v, [02]) , ( v, [12])) ; if it is , wehave a contradiction via R (0 , , ( v, [02])) . (cid:3) Theorem 3.5
The problem
SCSP ( N ) is NP-complete. Proof . The not-all-equal relation { , } \ { (0 , , , (1 , , } is an F -induced relation of N , viathe definition ( R N , ( u , [01]) , ( u , [12]) , ( u , [20])) . It is well-known that the problem CSP ( · ) on astructure having this relation is NP-complete via Schaefer’s theorem, and thus we obtain the resultby Theorem 2.7. (cid:3) We show how the notion of stability can be used to derive the previous hardness result of thepresent author [2]. Let B = { b ∗ , . . . , b ∗ n } be a set of size n . When B is a structure with universe B ,we use B ∗ to denote the structure obtained from B by adding, for each b ∗ i ∈ B , a relation { ( b ∗ i ) } . Aset C of operations on 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 . Theorem 3.6
Suppose that the set of polymorphisms of a relational structure B is diagonal-cautious,and that the universe B of B has size n ≥ . There exists an encoding F , whose elements each havearity ≤ , such that: • the structure B is F -stable, and there is a surjective mapping f x : D → B in F where, for each relation Q ⊆ B k of B , the relation S ( b ,...,b k ) ∈ Q ( f − x ( b ) × · · · × f − x ( b k )) is an F -induced relation.It consequently holds that CSP ( B ∗ ) reduces to SCSP ( B ) . Proof . Suppose that the polymorphisms of B are diagonal-cautious via G : B n → ℘ ( B ) . By Lemma3.3 of [2], there exists a relation P of arity n n with the following properties:(0) P is ∧ -definable.(1) For each tuple ( b , . . . , b n , c, d , . . . , d m ) ∈ P , it holds that each entry of this tuple is in G ( b , . . . , b n ) .(2) For each c ∈ B , there exist values d , . . . , d m ∈ B such that ( b ∗ , . . . , b ∗ n , c, d , . . . , d m ) ∈ P .(3) For each tuple ( b , . . . , b n , c, d , . . . , d m ) ∈ P , there exists a polymorphism p + : B → B of B such that p + ( b ∗ i ) = b i .We associate the coordinates of P with the variables ( v , . . . , v n , x, y , . . . , y m ) . In the scopeof this proof, when z is one of these variables, we use π z to denote the operator that projects atuple onto the coordinate corresponding to z . Let P ′ be the subset of P that contains each tuple q ∈ P such that, for each i = 1 , . . . , n , it holds that π v i ( q ) = b ∗ i . Let q , . . . , q ℓ be a listing of thetuples in P ′ . Let D = { , . . . , ℓ } , and let F contain, for each z ∈ { v , . . . , v n , x, y , . . . , y m } , the map f z : D → B defined by f ( i ) = π z ( q i ) . Observe that f x is surjective, by (2).We verify that the structure B is F -stable, as follows. Let V be a finite non-empty set. Observethat for each g ∈ G V,D and each u ∈ V , the map t [ g ] sends the applications ( u, f v ) , . . . , ( u, f v n ) to b ∗ , . . . , b ∗ n , respectively; thus, each map in T V is surjective. To show that T V is surjectively closed,consider a mapping t ′ ∈ h T v i B . Observe first that because for any u , u ∈ V (and any i ), ( u , f v i ) and ( u , f v i ) are sent to the same value by any map in T V , the same holds for any map in h T V i B ,and for t ′ in particular. Let u ∈ V ; since P is ∧ -definable and the tuple t ! = (( u, f v ) , . . . , ( u, f v n ) , ( u, f x ) , ( u, f y ) , . . . , ( u, f y m )) is pointwise mapped by each t ∈ T V to a tuple in P ′ , it holds that this tuple is sent by t ′ to a tuplein P . • If the restriction of t ′ to ( u, f v ) , . . . , ( u, f v n ) is not surjective onto B , then by (1), the re-striction of t ′ to ( u, f v ) , . . . , ( u, f v n ) , ( u, f x ) , ( u, f y ) , . . . , ( u, f y m ) has image contained in theset G ( t ′ ( u, f v ) , . . . , t ′ ( u, f v n )) , which is not equal to B by the definition of diagonal-cautious.Since u was chosen arbitrarily, we obtain that t ′ is not surjective. • Otherwise, by (3), there exists a unary polymorphism p + such that p + ( b ∗ i ) = t ′ ( u, f v i ) , foreach i . The operation p + is a bijection, and hence an automorphism of B . As p + and eachof its powers is thus a partial polymorphism of P , it follows that t ! mapped under ( p + ) − ( t ′ ) is inside P and, due to the choice of p + , inside P ′ . Since u was chosen arbitrarily, we obtainthat ( p + ) − ( t ′ ) is in T V , and so t ′ has the desired form.For any relation Q ⊆ B k of B , consider the F -induced relation Q ′ ⊆ D k of B defined by ( Q, ( u , f x ) , . . . , ( u k , f x )) . We have that Q ′ is the union of f − x ( b ) × · · · × f − x ( b k ) over all tuples9 b , . . . , b k ) ∈ Q . Moreover, for each b ∈ B , each set f − x ( b ) is an F -induced relation. We mayconclude that B ∗ , the expansion of B by all constant relations (those relations { ( b ) } , over b ∈ B ),has that CSP ( B ∗ ) reduces to SCSP ( B ) . (cid:3) As discussed in the previous article [2, Proof of Corollary 3.5], when a structure B (with non-trivial universe size) has only essentially unary polymorphisms, it holds that the polymorphismsof B are diagonal-cautious, and that the problem CSP ( B ∗ ) is NP-complete. We thus obtain thefollowing corollary. Corollary 3.7
Suppose that B is a finite structure whose universe B has size strictly greater than . Ifeach polymorphism of B is essentially unary, the problem CSP ( B ∗ ) , and hence the problem SCSP ( B ) ,is NP-complete. It is known, under the assumption that P does not equal NP, that the problem
SCSP ( B ) forany -element structure B is NP-complete if and only if each polymorphism of B is essentiallyunary (this follows from [5, Theorem 6.12]). Hence, under this assumption, the hardness result ofCorollary 3.7 covers all hardness results for the problems SCSP ( B ) over each -element structure B . Define a condensation from a relational structure A to a relational structure B to be a homomor-phism h : A → B from A to B such that h ( A ) = B and h ( R A ) = R B for each relation symbol R .That is, a condensation is a homomorphism that maps the universe of the first structure surjectivelyonto the universe of the second, and in addition, maps each relation of the first structure surjec-tively onto the corresponding relation of the second structure. When B is a structure, we define theproblem COND ( B ) of deciding whether or not a given structure admits a condensation to B , usingthe formulation of the present paper, as follows. The instances of COND ( B ) are the instances ofthe problem SCSP ( B ) ; an instance ( U, φ ) is a yes instance if there exists a surjective map f : U → B that satisfies φ (over B ) such that, for each relation symbol R and each tuple ( b , . . . , b k ) ∈ R B ,there exists an atom R ( u , . . . , u k ) of φ such that ( f ( u ) , . . . , f ( u k )) = ( b , . . . , b k ) . Clearly, each yes instance of COND ( B ) is also a yes instance of SCSP ( B ) . In graph-theoretic settings, a relatednotion has been studied: a compaction is defined similarly, but typically is not required to map ontoself-loops of the target graph B .There exists an elementary argument that, for each structure B , the problem SCSP ( B ) polynomial-time Turing reduces to the problem COND ( B ) ; see [1, Proof of Proposition 1]. We observe here acondition that allows one to show NP-hardness for the problem
COND ( B ) , under polynomial-timemany-one reduction, using the developed framework. Theorem 4.1
Let F be an encoding that contains all constants in the sense that, for each b ∈ B , thereexists a map f b ∈ F such that f b ( e ) = b for each e in the domain of f b . Suppose that B is F -stable, andthat D is an F -induced template of B . Then, the problem CSP ( D ) polynomial-time many-one reducesto SCSP ( B ) . The proof there concerns the compaction problem, but is immediately adapted to the present setting. roof . The reduction is that of Theorem 2.7. We use the notation from that proof. It suffices toargue that when ( A V,F , ψ ) is a yes instance of SCSP ( B ) , it is also a yes instance of COND ( B ) . Fromthat proof, when there exists a surjective satisfying assignment of ψ , there exists such a surjectivesatisfying assignment of the form t [ g ] . Since t [ g ] maps each application of the form ( · , f b ) to b , weobtain that ( A V,F , ψ ) is a yes instance of COND ( B ) . (cid:3) Each encoding presented in Section 3 contains all constants; thus, via Theorem 4.1, we obtainthat, for each structure B treated in that section, the problem COND ( B ) is NP-complete. The framework presented here also has implications for the sparsifiability of the problems
SCSP ( B ) .We explain some of the ideas here, and use the terminology of [3, 4]. When one has an encoding F of maps each having arity ≤ , and the hypotheses of Theorem 2.7 hold, the reduction of thistheorem is readily seen to give a linear-parameter transformation from CSP ( D ) to SCSP ( B ) .Let us consider the problem SCSP ( N ) studied in Section 3.2. The CSP on a structure havingthe not-all-equal relation of Theorem 3.5 does not have a generalized kernel of size O ( n − ǫ ) , underthe assumption that NP is not in coNP/poly, by Theorem 3.5 of [3]. Hence, the problem SCSP ( N ) does not have a generalized kernel of this size.On the other hand, the problem SCSP ( N ) has a kernel with O ( n ) constraints. To show this, weuse an adaptation of the polynomial method pioneered by Jansen and Pieterse [6] (see also [3, 4]).Consider an instance ( V, φ ) of the problem SCSP ( N ) . Each constraint has the form R ( v , v , v ) ,where v , v , v ∈ V ; for each constraint, we create an equation e { v ,v } + e { v ,v } + e { v ,v } − ,to be interpreted over F . Here, the e { v,v ′ } form a set of (cid:0) | V | (cid:1) new variables. For any assignment f : V → { , , } , set the variable e { v,v ′ } to be if f ( v ) = f ( v ′ ) , and to be otherwise; then,the assignment satisfies R ( v , v , v ) if and only if its corresponding equation is true over F . Thecreated equations thus capture the set of satisfying assignments. However, since there are O ( n ) variables used in these equations, by linear algebra, we may find a subset of these equations havingsize O ( n ) that has the same solution space as the original set. The constraints corresponding tothese equations gives a kernel with O ( n ) constraints. We present a decidability result for stability in the case that F contains only maps of arity at most . For each b ∈ B , we use b to denote the mapping from D to B that sends the empty tuple to b ;we use B to denote { b | b ∈ B } . Theorem 6.1
Let B , D , and F be as described. Suppose that F contains only maps of arity ≤ , andthat it contains B as a subset. The structure B is F -stable if and only if when W has size ≤ | B | , theset T W = { t [ g ] | g ∈ G W,D } is surjectively closed (over B ). Proof . The forward direction is immediate, so we prove the backward direction. We need to showthat, for each non-empty finite set V , the set T V = { t [ g ] | g ∈ G V,D } fulfills the conditions given inDefinition 2.4. Each map in T V is surjective since B ⊆ F . We thus argue that T V is surjectivelyclosed. This follows from the assumptions when | V | ≤ | B | . When | V | > | B | , suppose (for a11ontradiction) that T V is not surjectively closed. Then, there exists a surjective mapping t ′ in h T V i B violating the definition of surjectively closed; it follows that one can pick a variable u ′ such that,letting A u ′ be the applications involving either B or the variable u ′ , the map t ′ restricted to A u ′ does not have the form β ( t [ h ]) for an automorphism β and a map h ∈ G { u ′ } ,D . (If one could not picksuch a variable, then the various mappings h could be combined to evidence that t ′ does not violatethe definition of surjectively closed.) As B ⊆ F , it is possible to pick a set A − of applicationsusing at most | B | − variables such that the restriction of t ′ to A − is surjective. Let U be the set ofvariables appearing in A − ; we have | U | ≤ | B | − . Set U ′ = U ∪ { u ′ } .It is an immediate consequence of Theorem 1.1 that the restriction of t ′ to A U ′ ,F is contained in h T U ′ i B , where T U ′ = { t [ g ] | g ∈ G U ′ ,D } . By the choice of u ′ , we have that the described restrictionof t ′ is not in h T U ′ i B ; since this restriction, by the choice of U , is surjective, we obtain that T U ′ isnot surjectively closed, a contradiction to the assumption. (cid:3) Corollary 6.2
There exists an algorithm that, given a structure B and a set F of maps each havingarity ≤ and where B ⊆ F , decides whether or not B is F -stable. Proof . The algorithm checks the condition of Theorem 6.1, in particular, it checks whether or not,for all i = 1 , . . . , | B | , the set T W is surjectively closed for a set W having size i . (cid:3) We briefly explain how our framework can be extended to allow for multiple sorts, which may beof utility in the future. Let ( D s ) s ∈ S be a collection of pairwise disjoint finite sets, indexed by a finiteset S . Let F be a finite set of mappings, each of which is from a product D s × · · · × D s k to B ,where s , . . . , s k ∈ S . For any collection ( V s ) s ∈ S of pairwise disjoint finite sets of variables, onecan then define the set of all (( V s ) , F ) -applications, and also the notions of F -induced relation and F -induced template. Each F -induced relation is a subset of a product D s × · · · × D s k . One thenhas that, when D is an F -induced template of B , there is a reduction from CSP ( D ) to SCSP ( B ) . References [1] Manuel Bodirsky, Jan Kára, and Barnaby Martin. The complexity of surjective homomorphismproblems - a survey.
Discrete Applied Mathematics , 160(12):1680–1690, 2012.[2] Hubie Chen. An algebraic hardness criterion for surjective constraint satisfaction.
AlgebraUniversalis , 72(4):393–401, 2014.[3] Hubie Chen, Bart M. P. Jansen, and Astrid Pieterse. Best-case and worst-case sparsifiability ofboolean csps.
CoRR , abs/1809.06171, 2018.[4] Hubie Chen, Bart M. P. Jansen, and Astrid Pieterse. Best-case and worst-case sparsifiability ofboolean csps. In Christophe Paul and Michal Pilipczuk, editors, ,volume 115 of
LIPIcs , pages 15:1–15:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik,2018. 125] N. Creignou, S. Khanna, and M. Sudan.
Complexity Classification of Boolean Constraint Sat-isfaction Problems . SIAM Monographs on Discrete Mathematics and Applications. Society forIndustrial and Applied Mathematics, 2001.[6] Bart M. P. Jansen and Astrid Pieterse. Optimal sparsification for some binary csps using low-degree polynomials.
ACM Trans. Comput. Theory , 11(4):28:1–28:26, 2019.[7] Barnaby Martin and Daniël Paulusma. The computational complexity of disconnected cut and2k2-partition.
J. Comb. Theory, Ser. B , 111:17–37, 2015.[8] B.A. Romov. The algebras of partial functions and their invariants.
Cybernetics , 17:157–167,1981.[9] Dmitriy Zhuk. No-rainbow problem and the surjective constraint satisfaction problem.
CoRR ,arXiv:2003.11764v2, 2020. 13
Missing proofs
A.1 Proof of Theorem 1.1
We provide a proof of this theorem for the sake of completeness.It is straightforward to verify that each partial polymorphism of B is also a partial polymorphismof h T i B . It thus holds that T ′ ⊆ h T i B .In order to establish that h T i B ⊆ T ′ , it suffices to show that T ′ is ∧ -definable over B . Sinceequalities are permitted in ∧ -formulas, it suffices to prove the result in the case that the maps π i arepairwise distinct. Let θ be the ∧ -formula where, for each relation symbol R , the atom R ( i , . . . , i k ) isincluded as a conjunct if and only if each t ∈ T satisfies ( t ( i ) , . . . , t ( i k )) ∈ R B . By the definition ofpartial polymorphism, we have that each map in T ′ satisfies θ . On the other hand, when u : I → B is a map that satisfies the formula θ , consider the partial mapping q : B T → B sending π i to u ( i ) ; this is well-defined since the π i are pairwise distinct, and is a partial polymorphism, by theconstruction of θ . A.2 Proof of Proposition 2.1
Suppose that T is surjectively closed over B . Let p : B T → B be a surjective partial polymorphismwith the described domain. By Theorem 1.1, the map t ′ defined by i p ( π i ) is an element of h T i B ;note also that this map is surjective. By the definition of surjectively closed, it holds that t ′ has theform γ ( t ) , where γ is an automorphism of B , and t ∈ T . It follows that p is automorphism-like.Suppose that each surjective partial polymorphism from B T to B with the described domain isautomorphism-like. By Theorem 1.1, each surjective mapping t ′ in h T i B is defined by i p ( π i ) where p is a partial polymorphism; note that p is surjective. By hypothesis, p is automorphism-like;it follows that t ′ has the form γ ( t ) where γ is an automorphism of B , and t ∈ T . We conclude that T is surjectively closed. A.3 Proof of Proposition 2.3
Proof . The algorithm performs the following. For each relation R B of B , let k be its arity. For eachtuple ( α , . . . , α k ) ∈ A kV,F , the projection of T onto ( α , . . . , α k ) can be computed, by consideringall possible assignments on the variables in V that appear in the α i ; note that the number of suchvariables is bounded by a constant, since both the signature of B and F are assumed to be finite.If this projection is a subset of R B , then include R ( α , . . . , α k ) in the formula; otherwise, do not.Perform the same process for the equality relation on B , with k = 2 ; whenever the projection is asubset of this relation, include α = α in the formula. (cid:3)(cid:3)