a tutorial on algebra and csp part 2
play

A tutorial on Algebra and CSP, Part 2 [With some corrections] Ross - PowerPoint PPT Presentation

A tutorial on Algebra and CSP, Part 2 [With some corrections] Ross Willard Waterloo, Canada CSP: Complexity and Approximability Dagstuhl Nov 6, 2012 Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 1 / 36 Recall from


  1. A tutorial on Algebra and CSP, Part 2 [With some corrections] Ross Willard Waterloo, Canada CSP: Complexity and Approximability Dagstuhl Nov 6, 2012 Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 1 / 36

  2. Recall from Andrei’s tutorial: what controls the complexity of CSP (Γ) Finite constraint language Γ on D ⇓ Expressive power � Γ � = { all pp-definable relations } � Set of operations Pol (Γ) – the polymorphisms � Polymorphism algebra Alg (Γ) := ( D , Pol (Γ)) (Andrei’s notation: A B where B = ( D , Γ).) � Identities/SMCs modelled by Alg (Γ) (or supported by B ) Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 2 / 36

  3. But first a word about identities/Strong Mal’tsev Conditions (SMCs). Suppose ε 1 , . . . , ε k are identities in formal function symbols f 1 , f 2 , . . . Let S be a set of operations on a domain D . The condition (on S ) ∃ f 1 , f 2 , . . . ∈ S (of the correct arities) such that ( D , f 1 , f 2 , . . . ) | = ε 1 & · · · & ε k is a Strong Mal’tsev condition . (The SMC given by { ε 1 , . . . , ε k } .) Not to be confused with Mal’tsev condition Weak Mal’tsev condition Mal’tsev’s condition Identities Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 3 / 36

  4. Suggestive examples D Γ Alg (Γ) an interesting SMC { 0 , 1 } ( { 0 , 1 } , � ∅ � ) Γ 3SAT none { 0 , 1 } Γ HornSAT ( { 0 , 1 } , � min � ) semilattice laws (ACI) { 0 , 1 } Γ 2SAT ( { 0 , 1 } , � majority � ) majority laws Γ LinEq / Z p ( Z p , � x − y + z � ) Mal’tsev laws Z p Semilattice laws : f ( x , f ( y , z )) = f ( f ( x , y ) , z ), f ( x , y ) = f ( y , x ), f ( x , x ) = x . Majority laws : f ( x , x , y ) = f ( x , y , x ) = f ( y , x , x ) = x . Mal’tsev laws f ( x , x , y ) = f ( y , x , x ) = y . Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 4 / 36

  5. Reduction to the idempotent case : Can assume WLOG that {{ a } : a ∈ D } ⊆ Γ. Then all f ∈ Pol (Γ) are idempotent , i.e., satisfy f ( x , x , . . . , x ) = x . In this case, I’ll write Γ = Γ c . Structural Dichotomy Conjecture (Bulatov, Jeavons, Krokhin 2005) Assume Γ = Γ c . 1 Theorem . If ( { 0 , 1 } , Γ 3SAT ) is pp-interpretable in ( D , Γ), then CSP (Γ) is NP-complete. 2 Conjecture . Otherwise, CSP (Γ) is in P. Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 5 / 36

  6. Goals of this lecture: 1 Describe two further reductions. 2 Describe two general P-time CSP algorithms. ◮ Local consistency ◮ “Few subpowers” 3 Explain where algebra plays a role 4 A few words about other conjectured dichotomies Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 6 / 36

  7. Two further reductions First reduction : to binary constraint languages (all relations are 1-ary or 2-ary). Idea: Let Γ be a finite constraint language on D . Choose 2 n ≥ max arity of relations in Γ. ∃ a binary constraint language Γ bin on D n so that Alg (Γ bin ) = ( Alg (Γ)) n . Thus each of Γ, Γ bin is pp-interpretable in the other. Note : for convenience, we assume our binary constraint language is closed (all 1-ary and 2-ary relations in � Γ � are already in Γ.) Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 7 / 36

  8. Second reduction : to networks. Assume Γ is binary. Definition An instance ( V , { constraints } ) of CSP (Γ) is a network if: 1 Each x ∈ V is the scope of exactly one constraint ( { x } , D x ). 2 Each pair { x , y } ⊆ V with x � = y is the scope of exactly one constraint ( { x , y } , R xy ). (Define R yx = R − 1 and R xx = { ( a , a ) : a ∈ D x } .) xy 3 R xy ⊆ D x × D y for all x , y . R xy D y D x y x R xz R yz R xw R yw w z D w D z R wz Fact: if Γ is binary and closed, then CSP (Γ) ≡ L CSP (Γ) ↾ networks . Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 8 / 36

  9. Networks can be visualized. For example, suppose D = { 0 , 1 , 2 , 3 } and Γ is the set of all 1-ary and 2-ary relations on D . Here is a network for Γ: 0 1 2 3 3 2 y x 1 0 0 1 2 3 0 1 w z 2 3 A solution is a clique . Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 9 / 36

  10. Algorithm #1: Local consistency Enforcing arc-consistency Idea: Look for x , y ∈ V and a ∈ D x having no edge (in R xy ) to D y . 0 1 2 3 3 2 y x 1 0 0 1 2 3 0 1 1 w z 2 3 If found: replace D x with pr x ( R xy ). This shrinks the network without changing its set of solutions. Clearly : if some D x becomes empty, the original network has no solution. Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 10 / 36

  11. Definition A binary network N = ( V , ( D x ) x ∈ V , ( R xy ) x , y ∈ V ) for Γ is (1,2)-consistent a if pr x ( R xy ) = D x for all x , y ∈ V . a Also called (1,2)-minimal, 1-minimal , etc. I.e., enforcing arc-consistency makes no changes. Fact (Montanari, 1974), or Exercise ∃ a P-time algorithm which, given a binary network N , either 1 Deduces an empty constraint by enforcing arc-consistency, or 2 produces an equivalent (1,2)-consistent subnetwork of N . This is the enforcing arc-consistency algorithm. Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 11 / 36

  12. Note: (1,2)-consistent networks may have solutions, or may not. E.g., 0 1 1 0 0 1 Definition A binary, closed constraint language Γ has width (1,2) if every (1,2)-consistent network over Γ has a solution. For such Γ, enforcing arc-consistency is a P-time algorithm solving CSP (Γ). Question : Which Γ have width (1,2)? Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 12 / 36

  13. Definition . f : D n → D is a set operation if it satisfies f ( x 1 , . . . , x n ) = f ( y 1 , . . . , y n ) whenever { x 1 , . . . , x n } = { y 1 , . . . , y n } . Example : if ∧ is a semilattice operation on D (associative, commutative, and idempotent), then ∀ n , f ( x 1 , . . . , x n ) := (( x 1 ∧ x 2 ) ∧ x 3 ) · · · ∧ x n is a set operation. Theorem (Dalmau & Pearson, 1999) Suppose Γ is a binary, closed constraint language on a domain D of size d. Let n = d 2 . TFAE: 1 Γ has width (1,2). 2 Γ has an n-ary polymorphism f which is a set operation. E.g. Γ HornSAT has width (1,2) (as min is a polymorphism). Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 13 / 36

  14. Proof (2) ⇒ (1). Assume Γ has an n -ary polymorphism satisfying f ( x 1 , . . . , x n ) = f ( y 1 , . . . , y n ) whenever { x 1 , . . . , x n } = { y 1 , . . . , y n } . Let N = ( V , ( D x ) x , ( R xy ) x , y ) be a (1,2)-consistent network for Γ. For each pair x , y ∈ V , list the edges in R xy (padding the list to length n ). Apply f to the list (coordinatewise).  ( b 1 c 1 ) ,    ( b 2 c 2 ) ,  = R xy . . . . . .     ( b n c n ) , ( a x , a y ) := ( f ( b ) , f ( c ) ) ∈ R xy (Last “ ∈ R xy ” because R xy is invariant under f .) This chooses a special edge in R xy for each pair x , y ∈ V . Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 14 / 36

  15. a x R xy a y x y a ′ y R wy R xz R xw Edges chosen R yz by f w a ′ z R wz z Focus on ( a x , a y ) ∈ R xy and ( a ′ y , a ′ Claim : a y = a ′ z ) ∈ R yz . y .   c ′ d ′ ( b 1 c 1 ) ( ) , ,  1 1    . . . . . . . . R xy = = R yz . . . .    c ′ d ′  ( b n c n ) ( ) , , n n ( f ( c ′ ) , f ( d ′ ) ) =: ( a ′ y , a ′ ( a x , a y ) := ( f ( b ) , f ( c ) ) z ) We’re in a (1,2)-consistent network, so both { c 1 , . . . , c n } and { c ′ 1 , . . . , c ′ n } are enumerations of D y . Hence f ( c ) = f ( c ′ ), so we have a clique. Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 15 / 36

  16. (2,3)-consistency Idea: Look for x , y , z ∈ V and ( a , b ) ∈ R xy which doesn’t extend to a 3-clique on x , y , z . z ¬∃ c y x a b R xy If found: replace R xy with proj xy ( { 3-cliques on x , y , z } ). (And enforce (1,2)-consistency.) As before : if a constraint becomes empty, the original network has no solution. Ross Willard (Waterloo) Algebra & CSP tutorial, pt. 2 Dagstuhl 2012 16 / 36

Recommend


More recommend