Finitely Tractable Promise Constraint Satisfaction Problems
FFinitely Tractable Promise Constraint SatisfactionProblems
Kristina Asimi
Department of Algebra, Faculty of Mathematics and Physics, Charles University, Prague, [email protected]
Libor Barto
Department of Algebra, Faculty of Mathematics and Physics, Charles University, Prague, [email protected]
Abstract
The Promise Constraint Satisfaction Problem (PCSP) is a generalization of the Constraint SatisfactionProblem (CSP) that includes approximation variants of satisfiability and graph coloring problems.Barto [LICS ’19] has shown that a specific PCSP, the problem to find a valid Not-All-Equal solutionto a 1-in-3-SAT instance, is not finitely tractable in that it can be solved by a trivial reduction to atractable CSP, but such a CSP is necessarily over an infinite domain (unless P=NP). We initiate asystematic study of this phenomenon by giving a general necessary condition for finite tractabilityand characterizing finite tractability within a class of templates – the “basic” tractable cases in thedichotomy theorem for symmetric Boolean PCSPs allowing negations by Brakensiek and Guruswami[SODA’18].
Theory of computation → Problems, reductions and completeness;Theory of computation → Constraint and logic programming
Keywords and phrases constraint satisfaction problems, promise constraint satisfaction, BooleanPCSP, polymorphism, finite tractability, homomorphic relaxation
Funding
Both authors have received funding from the European Research Council (ERC) under theEuropean Unions Horizon 2020 research and innovation programme (grant agreement No 771005).
Many computational problems, including various versions of logical satisfiability, graphcoloring, and systems of equations can be phrased as Constraint Satisfaction Problems(CSPs) over fixed templates (see [4]). One of the possible formulations of the CSP is viahomomorphisms of relational structures: a template A is a relational structure with finitelymany relations and the CSP over A , written CSP( A ), is the problem to decide whether agiven finite relational structure X (similar to A ) admits a homomorphism to A .The complexity of CSPs over finite templates (i.e., those templates whose domain is afinite set) is now completely classified by a celebrated dichotomy theorem independentlyobtained by Bulatov [9] and Zhuk [19]: every CSP( A ) is either tractable (that is, solvable inpolynomial-time) or NP-complete. The landmark results leading to the complete classificationinclude Schaefer’s dichotomy theorem [18] for CSPs over Boolean structures (i.e., structureswith a two-element domain), Hell and Nešetřil’s dichotomy theorem [15] for CSPs overgraphs, and Feder and Vardi’s thorough study [13] through Datalog and group theory. Thelatter paper also inspired the development of a mathematical theory of finite-templateCSPs [16, 8, 5], the so called algebraic approach , that provided guidance and tools for thegeneral dichotomy theorem by Bulatov and Zhuk.The algebraic approach has been successfully applied in many variants and generalizationsof the CSP such as the infinite-template CSP [6] or valued CSP [17]. This paper concerns arecent vast generalization of the basic CSP framework, the Promise CSP (PCSP). a r X i v : . [ c s . CC ] O c t Finitely Tractable Promise Constraint Satisfaction Problems A template for the PCSP is a pair ( A , B ) of similar structures such that A has a homomor-phism to B , and the PCSP over ( A , B ), written PCSP( A , B ), is the problem to distinguishbetween the case that a given finite structure X admits a homomorphism to A and the casethat X does not have a homomorphism to B (the promise is that one of the cases takes place).This framework generalizes that of CSP (take A = B ) and additionally includes importantproblems in approximation, e.g., if A = K k (the clique on k vertices) and B = K l , k ≤ l , thenPCSP( A , B ) is a version of the approximate graph coloring problem, namely, the problem todistinguish graphs that are k -colorable from those that are not l -colorable, a problem whosecomplexity is open after more than 40 years of research. On the other hand, the basics ofthe algebraic approach to CSPs can be generalized to PCSPs [1, 7, 10, 11].The approximate graph coloring problem shows that a full classification of the complexityof PCSPs over graph templates is still open and so is the analogue of Schaefer’s BooleanCSP, PCSPs over pairs of Boolean structures. However, strong partial results have alreadybeen obtained. Brakensiek and Guruswami [7] proved a dichotomy theorem for all symmetricBoolean templates allowing negations, i.e., templates ( A , B ) such that A = ( { , } ; R , R , . . . ), B = ( { , } ; S , S , . . . ), each relation R i , S i is invariant under permutations of coordinates,and R = S is the binary disequality relation =. Ficak, Kozik, Olšák, and Stankiewicz [14]later generalized this result to all symmetric Boolean templates. These templates play acentral role in this paper.To prove tractability or hardness results for PCSPs, a very simple but useful reduction isoften applied: If ( A , B ) and ( A , B ) are similar PCSP templates and there exist homomor-phisms A → A and B → B , then the trivial reduction (which does not change the instance)reduces PCSP( A , B ) to PCSP( A , B ); we say that ( A , B ) is a homomorphic relaxation of( A , B ). In fact, all the tractable symmetric Boolean PCSPs can be reduced to a tractableCSP over a structure with a possibly infinite domain .An interesting example of a PCSP that can be naturally reduced to a tractable CSP overan infinite domain is the following problem. An instance is a list of triples of variables andthe problem is to distinguish instances that are satisfiable as positive 1-in-3-SAT instancesfrom those are not even satisfiable as Not-All-Equal-3-SAT instances. This computationalproblem is essentially the same as PCSP( A , B ) where A consists of the ternary 1-in-3 relationover { , } and B consists of the ternary not-all-equal relation over { , } . It is easy to seethat A → C → B where C is the relation “ x + y + z = 1” over the set of all integers. ThereforePCSP( A , B ) is reducible (by means of the trivial reduction) to PCSP( C , C ) = CSP( C ) whichis a tractable problem. The main result of [2] is that no finite structure can be used in placeof C for this particular template – this PCSP is not finitely tractable in the sense of thefollowing definition. (cid:73) Definition 1.
We say that
PCSP( A , B ) is finitely tractable if there exists a finite relationalstructure C such that A → C → B and CSP( C ) is tractable. Otherwise we call PCSP( A , B )not finitely tractable . (We assume P = NP throughout the paper.)
In this paper, we initiate a systematic study of this phenomenon. As the main technicalcontribution, we determine which of the “basic tractable cases” in Brakensiek and Guruswami’sclassification [7] are finitely tractable. It turns out that finite tractability is quite rare, so theinfinite nature of the 1-in-3 versus Not-All-Equal problem is not exceptional at all.
We now discuss the classification of symmetric Boolean templates allowing negations from [7].It will be convenient to describe these templates by listing the corresponding relation . Asimi, L. Barto 3 pairs, that is, instead of ( A = ( { , } ; R , . . . , R n ) , B = ( { , } ; S , . . . , S n ) we describe thistemplate by the list ( R , S ), . . . , ( R n , S n ). Recall that the template is symmetric if all theinvolved relations are symmetric, i.e., invariant under any permutation of coordinates, andthe template allows negations if ( = , =) is among the relation pairs, where == { (0 , , (1 , } is the disequality relation.It may be also helpful to think of an instance of PCSP( A , B ) as a list of constraintsof the form R i (variables) and the problem is to distinguish between instances where eachconstraint is satisfiable and those which are not satisfiable even when we replace each R i by the corresponding “relaxed version” S i . Allowing negations then means that we can useconstraints x = y – we can effectively negate variables.The following relations are important for the classification.odd-in- s = { x ∈ { , } s : P si =1 x i is odd } , even-in- s = { ( x ∈ { , } s : P sn =1 x i is even } r -in- s = { ( x ∈ { , } s : P sn =1 x i = r }≤ r -in- s = { x ∈ { , } s : P si =1 x i ≤ r } , ≥ r -in- s = { x ∈ { , } s : P si =1 x i ≥ r } not-all-equal- s = { ( x ∈ { , } s : P si =1 x i
6∈ { , s }} The next theorem lists some of the tractable cases of the classification, which are “basic”in the sense explained below. (cid:73)
Theorem 2 ([7]) . PCSP((
P, Q ) , ( = , =)) is tractable if ( P, Q ) is equal to (a) ( odd-in- s, odd-in- s ) , or ( even-in- s, even-in- s ) , or (b) ( ≤ r -in- s, ≤ (2 r − -in- s ) and r ≤ s/ , or ( ≥ r -in- s, ≥ (2 r − s + 1) -in- s ) and r ≥ s/ , or (c) ( r -in- s, not-all-equal- s ) for some positive integers r, s . It follows from the results in [7] that every tractable symmetric Boolean PCSP allowingnegations can be obtained bytaking any number of ( = , =) and any number of relation pairs from a fixed item inTheorem 2,adding any number of “trivial” relation pairs ( P, Q ) such that P ⊆ Q , and Q is the fullrelation or P contains only constant tuples, andtaking a homomorphic relaxation of the obtained template.In this sense, Theorem 2 provides building blocks for all tractable templates. Some of the cases in Theorem 2 are finitely tractable: templates in item (a) are tractableCSPs (they can be decided by solving systems of linear equations of the two-element field),templates in item (c) for r odd and s even are homomorphic relaxations of (odd-in- s, odd-in- s ),and templates in item (b) for r = 1 or r = s − s ≤ (cid:73) Theorem 3.
The PCSP over any of the following templates is not finitely tractable.(1) ( r -in- s, ≤ (2 r − -in- s ) , ( = , =) where < r < s/ , ( r -in- s, ≥ (2 r − s + 1) -in- s ) , ( = , =) where s/ < r < s − (2) ( ≤ r -in- s, ≤ (2 r − -in- s ) , ( = , =) where s is even, < r = s/ ≥ r -in- s, ≥ (2 r − s + 1) -in- s ) , ( = , =) where s is even, < r = s/ Finitely Tractable Promise Constraint Satisfaction Problems (3) ( r -in- s, ≤ (2 r − -in- s ) , ( = , =) where s is even, < r = s/ , and r is even ( r -in- s, ≥ (2 r − s + 1) -in- s ) , ( = , =) where s is even, < r = s/ , and r is even(4) ( r -in- s, not-all-equal- s ) where s > r , s > , and r is even or s is odd Note that the templates in the last item do not contain the disequality pair; the specialcase with r = 1 and s = 3 is the main result of [2]. Disequalites in the other itemsare necessary, since otherwise the templates are homomorphic relaxations of CSPs overone-element structures.In Theorem 19 we provide a general necessary condition for finite tractability of anarbitrary finite-template PCSP in terms of so called h1 identities. Showing that templates inTheorem 3 do not satisfy this necessary condition forms the bulk of the paper.The necessary condition in Theorem 19 seems very unlikely to be sufficient for finitetractability. Nevertheless, we observe in Theorem 12 that finite tractability does dependonly on h1 identities, just like standard tractability [10], see Theorem 10 and the discussionfollowing the theorem. A relational structure (of finite signature) is a tuple A = ( A ; R , R , . . . , R n ) where each A isa set, called the domain , and R i is a relation on A of arity ar( R i ) ≥
1, that is, R i ⊆ A ar( R i ) .The structure A is finite if A is finite. Two relational structures A = ( A ; R , R , . . . , R n )and B = ( B ; S , S , . . . , S n ) are similar if they have the same number of relations andar( R i ) = ar( S i ) for each i ∈ { , , . . . , n } . In this case, a homomorphism from A to B is amapping f : A → B such that ( f ( a ) , f ( a ) , . . . , f ( a k )) ∈ S i whenever i ∈ { , , . . . , n } and( a , a , . . . , a k ) ∈ R i where k = ar( R i ). If there exists a homomorphism from A to B , wewrite A → B , and if there is none, we write A B . (cid:73) Definition 4. A PCSP template is a pair ( A , B ) of similar relational structures such that A → B . The PCSP over ( A , B ) , written PCSP( A , B ) , is the following problem. Given afinite relational structure X similar to A (and B ), output “Yes.” if X → A and output “No.”if X B .We define CSP( A ) = PCSP( A , A ) . (cid:73) Definition 5.
Let ( A , B ) and ( A , B ) be similar PCSP templates. We say that ( A , B ) isa homomorphic relaxation of ( A , B ) if A → A and B → B . Recall that if ( A , B ) is a homomorphic relaxation of ( A , B ), then the trivial reduction,which does not change the input structure X , reduces PCSP( A , B ) to PCSP( A , B ). A crucial concept for the algebraic approach to (P)CSP is a polymorphism . (cid:73) Definition 6.
Let A = ( A ; R , . . . , R m ) and B = ( B ; S , . . . , S m ) be two similar relationalstructures. A function c : A n → B is a polymorphism from A to B if for each relation R i in A with k i = arity ( R i ) a a ... a k i ∈ R i , a a ... a k i ∈ R i . . . , a n a n ... a k i n ∈ R i ⇒ c ( a , a , . . . , a n ) c ( a , a , . . . , a ) ... c ( a k i , a k i , . . . , a k i n ) ∈ S i . . Asimi, L. Barto 5 We denote the set of all polymorphisms from A to B by Pol( A , B ) and define Pol( C ) =Pol( C , C ) . The computational complexity of a PCSP depends only on the set of polymorphismsof its template [7]. We note that tractability of the PCSPs in Theorem 2 stems fromnice polymorphisms: parities (item (a)), majorities (item (b)), and alternating thresholds(item (c)).The set of polymorphisms is an algebraic object named minion in [10]. (cid:73)
Definition 7. An n -ary function f π : A n → B is called a minor of an m -ary function f : A m → B given by a map π : [ m ] → [ n ] if f π ( x , . . . , x n ) = f ( x π (1) , . . . , x π ( m ) ) for all x , . . . , x n ∈ A . (cid:73) Definition 8.
Let O ( A, B ) = { f : A n → B : n ≥ } . A minion on ( A, B ) is a non-emptysubset M of O ( A, B ) that is closed under taking minors. For fixed n ≥ , let M ( n ) denotethe set of n -ary functions from M . As mentioned, M = Pol( A , B ) is always a minion and the complexity of PCSP( A , B )depends only on M . This result was strengthened in [10, 11] (generalizing the same resultfor CSPs [5]) as follows. (cid:73) Definition 9.
Let M and N be two minions. A mapping ξ : M → N is called a minionhomomorphism if it preserves arities and preserves taking minors, i.e., ξ ( f π ) = ( ξ ( f )) π forevery f ∈ M ( m ) and every π : [ m ] → [ n ] . (cid:73) Theorem 10.
Let ( A , B ) and ( A , B ) be PCSP templates. If there exists a minion homo-morphism Pol( A , B ) → Pol( A , B ) , then PCSP( A , B ) is log-space reducible to PCSP( A , B ) . An h1 identity (h1 stands for height one) is a meaningful expression of the formfunction(variables) ≈ function(variables), e.g., if f : A → B and g : A → B , then f ( x, y, x ) ≈ g ( y, x, x, z ) is an h1 identity. Such an h1 identity is satisfied if the corre-sponding equation holds universally, e.g., f ( x, y, x ) ≈ g ( y, x, x, z ) is satisfied if and only if f ( x, y, x ) = g ( y, x, x, z ) for every x, y, z ∈ A .Every minion homomorphism ξ : M → N preserves h1 identities in the sense that iffunctions f, g ∈ M satisfy an h1 identity, then so do their ξ -images ξ ( f ) , ξ ( g ) ∈ N . In fact,an arity-preserving ξ between minions is a minion homomorphism if and only if it preservesh1 identities (see [5] for details). In this sense, Theorem 10 shows that the complexity of aPCSP depends only on h1 identities satisfied by polymorphisms. We use the notation [ n ] = { , , . . . , n } throughout the paper.Repeated entries in tuples will be indicated by × , e.g. (2 × a, × b ) stands for the tuple( a, a, b, b, b ).The i -th cyclic shift of a tuple ( x , . . . , x m ) is the tuple ( x ( m − i mod m )+1 , . . . , x m , x , . . . ,x ( m − i − m )+1 ). A cyclic shift is the i -th cyclic shift for some i . We will use cyclic shiftsboth for tuples of zeros and ones and tuples of variables.We will often use special p -tuples and n = p -tuples of zeros and ones as arguments forBoolean functions, where p will be a fixed prime number. For 0 ≤ k ≤ p , 0 ≤ l ≤ p , and Finitely Tractable Promise Constraint Satisfaction Problems ≤ k , . . . , k p ≤ p we write h k i p = ( k × , ( p − k ) ×
0) = (1 , , . . . , | {z } k × , , , . . . , | {z } ( p − k ) × ) , h l i n = (1 , , . . . , | {z } l × , , , . . . , | {z } ( n − l ) × )and h k , . . . , k p i p = h k i p h k i p . . . h k p i p for the concatenation of h k i p , . . . , h k p i p . (Note here that the “ i ” in k i is an index, not anexponent.) The subscripts p and n in hi p and hi n will be usually clear from the context andwe omit them. We will sometimes need to shift n -ary tuples h k , . . . , k p i blockwise, e.g., to h k . . . . , k p , k i . In such a situation we talk about a p -ary cyclic shift to avoid confusion.It will be often convenient to think of an n -tuple k = h k , . . . , k p i as a p × p zero-onematrix with columns h k i , . . . , h k p i . For example, the ones in h p × i form a 5 × p “rectangle”and h ( p − × , × i is “almost” a 5 × p rectangle – the bottom right 1 × p -ary cyclic shift of k corresponds to cyclic permutation of columns.The area of a zero-one n -tuple k is defined as the fraction of ones and is denoted λ ( k ). λ ( k ) = n X i =1 k i ! /p The area of h k , . . . , k p i is thus ( k + · · · + k p ) /p .If t is a p -ary function we simply write t h k i instead of t ( h k i ). Similar shorthand is usedfor n -ary functions and tuples h k , . . . , k p i p . We start by observing that finite tractability also depends only on h1 identities satisfied bypolymorphisms, just like (standard) tractability. This result, Theorem 12, is an immediateconsequence of the following lemma and Theorem 10. (cid:73)
Lemma 11.
Let ( A , B ) be a PCSP template. Then the following are equivalent. PCSP( A , B ) is finitely tractable.There exists a finite relational structure C such that CSP( C ) is solvable in polynomialtime and there exists a minion homomorphism Pol( C ) → Pol( A , B ) . Proof.
This lemma is a consequence of known results and we only sketch the argument here.In Section II.B of [2] it is argued that the first item is equivalent to the claim that a finitetemplate ( C , C ) pp-constructs ( A , B ). The latter claim is equivalent to the second item byTheorem 4.12 in [11]. (cid:74)(cid:73) Theorem 12.
Let ( A , B ) and ( A , B ) be PCSP templates. If there exists a minion ho-momorphism Pol( A , B ) → Pol( A , B ) and PCSP( A , B ) is finitely tractable, then so is PCSP( A , B ) . In this subsection, we derive the necessary condition for finite tractability that will be usedto prove Theorem 3. A cyclic polymorphism is a starting point for the condition. . Asimi, L. Barto 7 (cid:73)
Definition 13.
A function c : A p → B is called cyclic if it satisfies the h1 identity c ( x , x , . . . , x p ) ≈ c ( x , . . . , x p , x ) . Cyclic polymorphisms can be used [3] to characterize the borderline between tractableand NP-complete CSPs proposed in [8] and confirmed in [9, 19]. We only state the directionneeded in this paper. (cid:73)
Theorem 14 ([3]) . Let C be a CSP template over a finite domain C . If CSP( C ) is notNP-complete, then C has a cyclic polymorphism of arity p for every prime number p > | C | . Polymorphism minions of CSP templates are closed under arbitrary composition (cf. [4]).In particular, if CSP( C ) is not NP-complete, then Pol( C ) contains the function t ( x , x , . . . , x p , x , x , . . . , x p , . . . , x p , x p , . . . , x pp )= c ( c ( x , x , . . . , x p ) , c ( x , x , . . . , x p ) , . . . , c ( x p , x p , . . . , x pp )) , (1)where c is a p -ary cyclic function and p > | C | . Such a function satisfies strong h1 identitieswhich are not satisfied by the templates in Theorem 3. We now (in two steps) describe onesuch collection of strong enough identities. (cid:73) Definition 15.
A function t : A p → B is doubly cyclic if it satisfies every identity of theform t ( x , . . . , x p ) ≈ t ( y , . . . , y p ) , where x i is a p -tuple of variables and y i is a cyclic shiftof x i for every i ∈ [ p ] , and every identity of the from t ( x , x . . . , x p ) ≈ t ( x , . . . , x p , x ) ,where each x i is a p -tuple of variables. Observe that t from Equation (1) is doubly cyclic – the first type of identities come fromthe cyclicity of the inner c while the second type from the outer c . It will be also useful forus to observe that, after rearranging the arguments (we read them row-wise), t is a cyclicfunction of arity p . We prove the following lemma in Appendix A. (cid:73) Lemma 16.
Let t : A p → B be a doubly cyclic function. Then the function t σ defined by t σ x x · · · x p x x · · · x p ... ... . . . ... x p x p · · · x pp = t x x · · · x p x x · · · x p ... ... . . . ... x p x p · · · x pp is a cyclic function. From the finiteness of the domain C we get one more property of function t definedby Equation (1) from a cyclic c . In the next definition, by an x/y -tuple we mean a tuplecontaining only variables x and y . (cid:73) Definition 17.
A doubly cyclic function t : A p → B is b -bounded if there exists anequivalence relation ∼ on the set of all p -ary x/y -tuples with at most b equivalence blockssuch that t satisfies every identity of the form t ( x , . . . x p ) ≈ t ( y , . . . , y p ) where x i and y i are x/y -tuples such that x i ∼ y i for every i ∈ [ p ] . (cid:73) Lemma 18.
Let c : C p → C be a cyclic function. Then the function t defined byEquation (1) is a b -bounded doubly cyclic function for b = | C | | C | . Proof.
We define ∼ by declaring two p -ary x/y -tuples x and y ∼ -equivalent if c ( x ) ≈ c ( y ).As there are b = | C | | C | binary functions C → C , this equivalence has at most b equivalenceblocks. By definitions, t is then b -bounded and doubly cyclic. (cid:74) Finitely Tractable Promise Constraint Satisfaction Problems
The promised necessary condition for finite tractability is now a simple consequence: (cid:73)
Theorem 19.
Let ( A , B ) be a finite PCSP template that is finitely tractable. Thenthere exists b such that ( A , B ) has a p -ary b -bounded doubly cyclic polymorphism for everysufficiently large prime p . Proof.
If ( A , B ) is finitely tractable, then, by Lemma 11, there exists a minion homomorphism ξ : Pol( C ) → Pol( A , B ), where C is finite and CSP( C ) is tractable. By Theorem 14, C hasa p -ary cyclic polymorphism for every sufficiently large prime. Then, by Lemma 18, thepolymorphism t of C defined by Equation (1) is a b -bounded and doubly cyclic (with theappropriate b ). As ξ preserves h1 identities, ξ ( t ) is a b -bounded doubly cyclic polymorphismof ( A , B ). (cid:74) Finally, we are ready to start proving Theorem 3. We fix a template ( A , B ) from the statement.Without loss of generality, we assume that r ≤ s/ A , B ) is finitely tractable. By Theorem 19there exists b such that ( A , B ) has a p -ary b -bounded doubly cyclic polymorphism t forevery sufficiently large arity p . We fix such a b and t , where p is fixed to a sufficiently largeprime p congruent to 1 modulo s (which is possible by the Dirichlet prime number theorem).How large must p be will be seen in due course. We denote n = p and observe that n ≡ s ) as well.Using the cyclicity in Section 4 and double cyclicity in Section 5 we will show that certainevaluations t ( z ) of t are tame in that t ( z ) = t h i iff the area of z is below a threshold θ . Thethreshold is defined as θ = 1 / r -in- s, not-all-equal- s ) templatein Case (4), where we set θ = r/s (observe that θ = r/s also in Case (2) and (3)). (cid:73) Definition 20.
A tuple z ∈ { , } n is tame if t ( z ) = (cid:26) t h i n if λ ( z ) < θ − t h i n if λ ( z ) > θ (Note here that λ ( z ) is never equal to θ since n ≡ s ) .) The evaluations that we use are called near-threshold almost rectangles . (cid:73) Definition 21.
A tuple z ∈ { , } n is an almost rectangle if it is a p -ary cyclic shiftof a tuple of the form h z , . . . , z , z , . . . , z i p , where ≤ z , z ≤ p , the number of z ’s isarbitrary, and | z − z | < b . The quantity ∆ z = | z − z | is referred to as the step size . Wesay that z is near-threshold if | λ ( z ) − θ | < /s ∆ z +10 . The proof can now be finished by using the tameness of near-threshold almost rectanglestogether with the b -boundedness of t as follows.Let m = ( p − / z , and z , so that θp − b < z , 2. We choose z as the maximum number such that λ ( z ) < θ .From m < p/ z , by one makes the area of z greater than thethreshold, therefore also λ ( z ) > θ . . Asimi, L. Barto 9 Note that z > pθ since otherwise the area of z is less than θ . On the other hand, z < pθ + 3 b , otherwise the area of z is greater: λ ( z ) = mz + ( p − m ) z , p ≥ p − ( pθ + 3 b ) + p +12 ( pθ − b ) p = p θ + b ( p − p > θ. It follows that the step size of both z and z is at most 5 b , so both z i are almost rectangles.By choosing a sufficiently large p , the difference λ ( z ) − λ ( z ) can be made arbitrarily small,and both z i are then near-threshold.Now the tameness of near-threshold almost rectangles that will be established in Sections 4and 5 gives us t ( z ) = t h i n = 1 − t h i n = t ( z ). On the other hand, we also have t ( z ) = t ( z ),a contradiction. In this section we prove the following lemma. (cid:73) Lemma 22. Every near-threshold almost rectangle of step size at most one is tame. We start by observing that an almost rectangle z = h z + 1 , . . . , z + 1 , z , . . . , z i p regarded as a p × p matrix is, when read row-wise, equal to a sequence of consecutiveones, followed by zeros. In other words, using the notation t σ from Lemma 16, we have t ( z ) = t σ h k i n for some k . Note that every almost rectangle of step size at most one has a p -ary cyclic shift of this form. Also note that if z is near-threshold, then k < θn . It istherefore enough to verify the following lemma. (cid:73) Lemma 23. For every ≤ k < θn , we have t σ h k i n = (cid:26) t σ h i n if k < θn − t σ h i n if k > θn The rest of this section is devoted to proving this lemma. We first introduce some notationand terminology. We set a = b θn c – this is the largest value of k below the borderline θn from the lemma. Note that 2 a is the largest integer strictly less than 2 θn .We say that an s -tuple of evaluations h k i n , . . . , h k s i n , where 0 ≤ k i ≤ n , is plausible if P si =1 k i = rn in Cases (1), (3), (4) and P si =1 k i ≤ rn in Case (2). The following lemma is aconsequence of the fact that t σ is a polymorphism (as t is) which is, additionally, cyclic byLemma 16. No other properties of t are needed in this section. (cid:73) Lemma 24. If an s -tuple h k i , . . . , h k s i is plausible, then ( t σ h k i , . . . , t σ h k s i ) ∈ Q .Moreover, in Cases (1), (2), and (3), we have t σ h n − k i = 1 − t σ h k i for every ≤ k ≤ n . Proof. For the first part, let h k i , . . . , h k s i be plausible. Let k = h k i and, for each i ∈ [ s ],let k i be the ( P i − j =1 k j )-th cyclic shift of h k i i . Denote the j -th coordinate of k i by k i,j .For each j ∈ [ n ] the tuple ( k ,j , . . . , k s,j ) belongs to the relation P , therefore, as t σ is apolymorphism, we get ( t σ ( k ) , . . . , t σ ( k s )) ∈ Q . Since t σ is cyclic, each t σ ( k i ) = t σ h k i i ,hence ( t σ h k i , . . . , t σ h k s i ) ∈ Q , as required.For the second part, we take h k i together with its ( n − k )-th cyclic shift and use the factthat t σ preserves the disequality relation pair. (cid:74) We now consider Cases (1)–(4) separately. Case (2) is the simplest. If 0 ≤ k ≤ a then h k, k, . . . , k i is a plausible tuple. By Lemma 24, the tuple ( t σ h k i , t σ h k i , . . . , t σ h k i ) is in Q ; in particular t σ h k i = 0. For the remaining values 2 a ≥ k ≥ a + 1 we apply the second part ofthis lemma and get t σ ( h k i ) = 1.For Case (1) we prove t h k i = 0 and t h n − k i = 1 for any 0 ≤ k < n/ i = | n/ − k | , i = 0 . , . , . . . , n/ 2. For the first step, k = ( n − / 2, we apply Lemma 24 tothe s -tuple 2 r × h k i , r, ( s − r − × 0. Since Q contains no p -tuple with more than (2 r − t h k i = 0. Then also t h n − k i = 1 by the second part of the lemma. For theinduction step, we use the tuple r × k, r × ( n − k − , r, ( s − r − × t h n − k − i = 1 by the induction hypothesis.We proceed to Case (4). We will prove, starting from the left, the following chain ofdisequalities. t σ h a i 6 = t σ h a + 1 i 6 = t σ h a − i 6 = t σ h a + 2 i 6 = t σ h a − i 6 = . . . = t σ h a i 6 = t σ h i This will imply t σ h a i = t σ h a − i = · · · = t σ h i 6 = t σ h a + 1 i = t σ h a + 2 i = · · · = t σ h a i . Westart with the first inequality t σ h a i 6 = t σ h a + 1 i . The sequence of arguments( s − r ) × h a i , r × h a + 1 i has length s and is plausible as ( s − r ) a + r ( a + 1) = sa + r and sa + r is equal to rn . (Indeed, n ≡ s ), so n = ms + 1 for some integer m ; then a = mr and sa + r = smr + r = ( n − r + r = rn .) By Lemma 24, t σ h a i 6 = t σ h a + 1 i since Q does notcontain all-equal tuples in Case (4).For the second disequality t σ h a + 1 i 6 = t σ h a − i , as well as for the further disequalitieswe need to distinguish two cases: Case (4a) r and s have the same parity and Case (4b) r iseven and s is odd. In Case (4a) we directly use the sequence( s − r ) / × h a − i , ( s + r ) / × h a + 1 i and derive t σ h a + 1 i 6 = t σ h a − i using Lemma 24 as above. In Case (4b) we first use( s − × h a i , h a + r i to deduce t σ h a + r i 6 = t σ h a i (so t σ h a + 1 i = t σ h a + r i ) and then( s − / × h a − i , ( s − / × h a + 1 i , h a + r i to deduce t σ h a − i 6 = t σ h a + 1 i .To prove t σ h a − i + 1 i 6 = t σ h a + i i for i ∈ { , , . . . , a } , we observe that, by the alreadyestablished disequalities, we have t σ h a − i + 1 i = · · · = t σ h a i , and then use( s + r ) / × h a + i i , ( s − r ) / × ( a − , ( s + r ) / × ( a − i + 2) in Case (4a) and ( s + r ) / s + r + 2) / × h a + i i , ( s − r − / × h a − i , × h a − i + 1 i , ( s + r − / × h a − i + 2 i in Case (4a) and ( s + r ) / r/s × h a + i i , ( s − r ) × h a i , r/ × ( a − i + 2) in Case (4b).Finally, for proving t σ h a + i i 6 = t σ h a − i i we use( s − r ) / × h a − i i , ( s − r ) / × h a + i i , r × h a + 1 i in Case (4a) and( s − / × h a − i i , ( s − / × h a + i i , × h a + r i in Case (4b). . Asimi, L. Barto 11 This completes the proof for Case (4).Case (3) can be done similarly as Case (4a) with an additional reasoning that we nowexplain. Consider, e.g., the proof that t σ h a + r i 6 = t σ h a i using the sequence ( s − ×h a i , h a + r i .We cannot directly conclude that t σ h a i 6 = t σ h a + r i since relation Q contains the all-zerotuple – we can only conclude that t σ h a i and t σ h a + r i are not both ones. However, we canalso prove in the same way that t σ h n − a i and t σ h n − ( a + r ) i are not both ones by usingthe “complementary” tuple ( s − × h n − a i , h n − ( a + r ) i . The claim t σ h a i 6 = t σ h a + r i thenfollows from the second part of Lemma 24.The proof of Lemma 23 is concluded. We also record the following consequence of theproof for Case (1). (cid:73) Lemma 25. In Case (1), we have t h i = 0 . The entire section is devoted to the proof of the following lemma. (cid:73) Lemma 26. Every near-threshold almost rectangle is tame. We start by introducing some terminology. We say that an m -tuple of evaluations k = h k , . . . , k p i , . . . , k m = h k m , . . . , k pm i , where m ∈ [ s ], is plausible if P mj =1 k ij = rp for all i ∈ [ p ]. In other words, by arranging the integers defining k , k , . . . , k m as rows of an m × p matrix, we get a matrix whose every column sums up to rp . Note that the sum of theareas of the evaluations is then equal to r .The following lemma is a “2-dimensional analogue” of Lemma 24. In the proof we applythe double cyclicity of t . (cid:73) Lemma 27. If the tuple k , . . . , k s is plausible, then ( t ( k ) , . . . , t ( k s )) ∈ Q . Proof. Let k , . . . , k s be a plausible tuple. Fix an arbitrary i ∈ [ p ]. Form a s × rp matrix M i whose first row is h k i i rp and j -th row is the ( P j − l =1 k il )-th cyclic shift of h k ij i rp for j ∈ { , . . . , s } . Split this matrix into r -many s × p blocks M i , M i , . . . , M ri . Their sum X i = P rj =1 M ji is an s × p matrix whose each column contains exactly r ones in Cases (1),(3), and (4), and at most r ones in Case (2). Moreover, for all j ∈ [ s ], the j -th row of thematrix X i is a cyclic shift of h k ij i p . Put the matrices X , . . . , X p aside to form an s × n matrix Y . Its rows have the same t -images as k , . . . , k s , respectively, because t is doublycyclic. Each column belongs to the relation P , therefore, as t is a polymorphism, we get that t applied to the rows gives a tuple in Q . This tuple is equal to ( t ( k ) , . . . , t ( k s )). (cid:74) The following lemma will be applied to produce plausible sequence of arguments. Theproof uses the other type of doubly-cyclic identities. (cid:73) Lemma 28. For every almost rectangle z of step size ∆ z with | λ ( z ) − θ | ≤ /s and every m ∈ { r/θ − , r/θ − } , there exists a plausible ( m + 1) -tuple k , k ,. . . , k m , l of almostrectangles such that t ( z ) = t ( k ) = t ( k ) = · · · = t ( k m ) , λ ( z ) = λ ( k ) = · · · = λ ( k m ) , and l has the same step size ∆ z as z . Proof. Let c, d be such that z = ( c × z , d × z ). We define an integer m × p matrix X sothat the first row is ( c × z , d × z ) and the i -th row is the c -th cyclic shift of the ( i − i ∈ { , . . . , m } . Let Y be the ( m + 1) × p matrix obtained from X by adding arow ( l , . . . , l p ) so that each column sums up to rp . Finally, let k , . . . , k m , l be the n -tuplesdetermined by the rows via hi , e.g., l = h l , . . . , l p i . It is easily seen that ( l , . . . , l p ) is a cyclic shift of a tuple of the form ( e, . . . , e, e , . . . , e ) where e and e differ by z − z = ∆ z ,and 0 ≤ l i ≤ p as λ ( z ) is close to θ . Using also the double cyclicity of t , the tuple k , . . . , k m , l therefore has all the required properties. (cid:74) Equipped with these lemmata we are ready to prove Lemma 26. The proof is by inductionon the step size. Step sizes zero and one are dealt with in Lemma 23, so we assume that z isa near-threshold almost rectangle of step size 1 < ∆ z < b .We will now consider Case (4) in detail and discuss the adjustments for the other casesafterwards.Assume first that λ ( z ) is not too close to θ , say, | λ ( z ) − θ | ≥ /s b +12 . We apply Lemma 28with m = s − s − k , . . . , k s − , l = h l , . . . , l p i such that z , k , . . . , k s − all have the same t -images and areas, and l is an almost rectangle of step size∆ z . We divide l roughly in half – we define l = hb l / c , . . . , b l p / ci , l = hd l / e , . . . , d l p / ei . The tuples l and l are almost rectangles and, as ∆ z ≥ 2, the step size of both l and l isstrictly smaller than ∆ z . Note that k , . . . , k s − , l , l is a plausible s -tuple.The average area of almost rectangles k , . . . , k s − , l , l is r/s = θ , the first s − z and the last two have almost the same area – the differencebetween areas of these two rectangles can be made arbitrarily small by choosing p largeenough. It follows that | λ ( l i ) − θ | ≤ s · | λ ( z ) − θ | , thus both l i are near-threshold. Moreover,as λ ( z ) is bounded away from θ , we get sgn( λ ( l ) − θ ) = sgn( λ ( l ) − θ ) = sgn( λ ( z ) − θ ).By the induction hypothesis, both l i are tame. By Lemma 27, the values t ( k ), . . . , t ( k s − ), t ( l ), and t ( l ) are not all equal. But t ( z ) = t ( k ) = · · · = t ( k s − ), t ( l ) = t ( l ),and sgn( λ ( z ) − θ ) = sgn( λ ( l ) − θ ) so it follows that z is tame, as required.It remains to deal with the case that λ ( z ) is too close to θ . In this case we will find anear-threshold almost rectangle w with the same step size as z such that t ( w ) = 1 − t ( z )and λ ( w ) − θ = − s ( λ ( z ) − θ ), where s is such that 2 ≤ s ≤ s . If λ ( w ) is already not tooclose to the threshold θ , then we may apply to w the first part of the proof and obtain that w is tame and, consequently, z is tame as well. If λ ( w ) is still too close to θ , then we simplyrepeat the process until we get a suitable rectangle that is not too close.To find such an almost rectangle w we apply Lemma 28 with m = s − s -tuple k , . . . , k s − , w such that t ( z ) = t ( k ) = · · · = t ( k s − ) and w is an almost rectangleof the same step size as z . Since the area of each k i is equal to λ ( z ) and the average area inthe plausible s -tuple is θ , we get that λ ( w ) − θ = − ( s − λ ( z ) − θ ). By Lemma 27, t ( w )and t ( z ) are not equal. This concludes the construction of w and the proof of Lemma 26 forCase (4).The remaining cases (1), (2), and (3) require a modification that is similar to themodification for Case (3) in the proof of Lemma 23. For the situation that λ ( z ) is not tooclose to θ , we apply Lemma 28 with m = 2 r − k , . . . , k r − , l , l but also to the tupleformed by complementary almost rectangles (where the complementary almost rectangle to h k , . . . , k p i is h p − k , . . . , p − k p i ). In Case (1) we additionally complete the two 2 r tuplesto s -tuples by adding s − r by zeros and also employ Lemma 25. The other situation, that λ ( z ) is too close, is adjusted in an analogues fashion. . Asimi, L. Barto 13 We have characterized finite tractability among the basic tractable cases in the Brakensiek–Guruswami classification [7] of symmetric Boolean PCSPs allowing negations. A naturaldirection for future research is an extension to all the tractable cases (not just the basicones), or even to all symmetric Boolean PCSPs [14], not only those allowing negations. Anobstacle, where our efforts have failed so far, is already in relaxations of the basic templates( P, Q ) with disequalites. For example, which ( P, Q ), ( = , =), with P a subset of ≤ r -in- s and Q a superset of ≤ (2 r − s , give rise to finitely tractable PCSPs?Another natural direction is to better understand the “level of tractability.” For thefinitely tractable templates ( A , B ) considered in this paper, it is always possible to find atractable CSP( C ) with A → C → B and such that C is two-element. Is it so for all symmetricBoolean templates? For general Boolean templates, the answer is “No”: [12] presents anexample that requires a three-element C . However, it is unclear whether there is an upperbound on the size of C for finitely tractable (Boolean) PCSs, and if there is, how it couldbe computed. There are also natural concepts beyond finite tractability, still stronger thanstandard tractability. We refer to [2] for some questions in this direction. References Per Austrin, Venkatesan Guruswami, and Johan Håstad. (2 + (cid:15) )-Sat is NP-hard. SIAMJ. Comput. , 46(5):1554–1573, 2017. URL: https://doi.org/10.1137/15M1006507 , doi:10.1137/15M1006507 . L. Barto. Promises make finite (constraint satisfaction) problems infinitary. In , pages 1–8, 2019. Libor Barto and Marcin Kozik. Absorbing subalgebras, cyclic terms, and the constraintsatisfaction problem. Log. Methods Comput. Sci. , 8(1:07):1–26, 2012. Special issue: Selectedpapers of the Conference “Logic in Computer Science (LICS) 2010”. doi:10.2168/LMCS-8(1:07)2012 . Libor Barto, Andrei Krokhin, and Ross Willard. Polymorphisms, and how to use them. InAndrei Krokhin and Stanislav Živný, editors, The Constraint Satisfaction Problem: Complexityand Approximability , volume 7 of Dagstuhl Follow-Ups , pages 1–44. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 2017. URL: http://drops.dagstuhl.de/opus/volltexte/2017/6959 , doi:10.4230/DFU.Vol7.15301.1 . Libor Barto, Jakub Opršal, and Michael Pinsker. The wonderland of reflections. Is-rael Journal of Mathematics , 223(1):363–398, Feb 2018. URL: https://doi.org/10.1007/s11856-017-1621-9 , doi:10.1007/s11856-017-1621-9 . Manuel Bodirsky. Constraint satisfaction problems with infinite templates. In Nadia Creignou,Phokion G. Kolaitis, and Heribert Vollmer, editors, Complexity of Constraints , volume 5250of Lecture Notes in Computer Science , pages 196–228. Springer, 2008. Joshua Brakensiek and Venkatesan Guruswami. Promise constraint satisfaction: Structuretheory and a symmetric boolean dichotomy. In Proceedings of the Twenty-Ninth AnnualACM-SIAM Symposium on Discrete Algorithms , SODA’18, pages 1782–1801, Philadelphia,PA, USA, 2018. Society for Industrial and Applied Mathematics. URL: http://dl.acm.org/citation.cfm?id=3174304.3175422 . Andrei Bulatov, Peter Jeavons, and Andrei Krokhin. Classifying the complexity of constraintsusing finite algebras. SIAM J. Comput. , 34(3):720–742, March 2005. URL: http://dx.doi.org/10.1137/S0097539700376676 , doi:10.1137/S0097539700376676 . Andrei A. Bulatov. A dichotomy theorem for nonuniform CSPs. In , pages 319–330, October 2017. doi:10.1109/FOCS.2017.37 . Jakub Bulín, Andrei Krokhin, and Jakub Opršal. Algebraic approach to promise constraintsatisfaction. In Proceedings of the 51st Annual ACM SIGACT Symposium on the Theory ofComputing (STOC ’19) , New York, NY, USA, 2019. ACM. URL: https://doi.org/10.1145/3313276.3316300 , doi:10.1145/3313276.3316300 . Jakub Bulín, Andrei A. Krokhin, and Jakub Oprsal. Algebraic approach to promise constraintsatisfaction. CoRR , abs/1811.00970, 2018. URL: http://arxiv.org/abs/1811.00970 , arXiv:1811.00970 . Guofeng Deng, Ezzeddine El Sai, Trevor Manders, Peter Mayr, Poramate Nakkirt, and AthenaSparks. Sandwiches for promise constraint satisfaction, 2020. arXiv:2003.07487 . Tomás Feder and Moshe Y. Vardi. The computational structure of monotone monadicSNP and constraint satisfaction: A study through datalog and group theory. SIAM J.Comput. , 28(1):57–104, February 1998. URL: https://doi.org/10.1137/S0097539794266766 , doi:10.1137/S0097539794266766 . Miron Ficak, Marcin Kozik, Miroslav Olšák, and Szymon Stankiewicz. Dichotomy for symmetricBoolean PCSPs. ArXiv , April 2019. https://arxiv.org/abs/1904.12424, to appear in ICALP2019. URL: https://arxiv.org/abs/1904.12424 , arXiv:1904.12424 . Pavol Hell and Jaroslav Nešetřil. On the complexity of H -coloring. J. Combin. Theory Ser. B ,48(1):92–110, 1990. Peter Jeavons. On the algebraic structure of combinatorial problems. Theor. Comput. Sci. ,200(1-2):185–204, 1998. Vladimir Kolmogorov, Andrei Krokhin, and Michal Rolínek. The complexity of general-valuedCSPs. SIAM Journal on Computing , 46(3):1087–1110, 2017. Thomas J. Schaefer. The complexity of satisfiability problems. In Proceedings of the TenthAnnual ACM Symposium on Theory of Computing , STOC ’78, pages 216–226, New York, NY,USA, 1978. ACM. doi:10.1145/800133.804350 . Dmitriy Zhuk. A proof of CSP dichotomy conjecture. In , pages 331–342, Oct 2017. doi:10.1109/FOCS.2017.38 . A Doubly cyclic functions are cyclic In this appendix we prove Lemma 16, which we restate here for convenience. (cid:73) Lemma 29. Let t : A p → B be a doubly cyclic function. Then the function t σ defined by t σ x x · · · x p x x · · · x p ... ... . . . ... x p x p · · · x pp = t x x · · · x p x x · · · x p ... ... . . . ... x p x p · · · x pp is a cyclic function. . Asimi, L. Barto 15 Proof. By cyclically shifting the arguments we get the same result: t σ ( x , x , . . . , x p , x , x , x , . . . , x p , x , . . . , x p , x p , . . . , x pp , x )= t σ x · · · x ,p − x p ... . . . ... ... x p · · · x p,p − x pp x · · · x p x = t x · · · x p x ... . . . ... ... x ,p − · · · x p,p − x p x p · · · x pp x = t x · · · x p x ... . . . ... ... x ,p − · · · x p,p − x ,p − x p · · · x pp x p = t x x · · · x p x x · · · x p ... ... . . . ... x p x p · · · x pp = t σ x x · · · x p x x · · · x p ... ... . . . ... x p x p · · · x pp = t σ ( x , x , . . . , x p , x , x , . . . , x p , . . . , x p , x p , . . . , x pp ) ..