constraints graphs algebra logic and complexity
play

Constraints, Graphs, Algebra, Logic, and complexity Moshe Y. Vardi - PDF document

Constraints, Graphs, Algebra, Logic, and complexity Moshe Y. Vardi Rice University Constraint Satisfaction Problem (CSP) Input: ( V, D, C ) : A fi nite set V of variables A fi nite set D of values A fi nite set C of constraints


  1. Constraints, Graphs, Algebra, Logic, and complexity Moshe Y. Vardi Rice University

  2. Constraint Satisfaction Problem (CSP) Input: ( V, D, C ) : • A fi nite set V of variables • A fi nite set D of values • A fi nite set C of constraints restricting the values that tuples of variables can take. Constraint: ( t, R ) • t : a tuple of variables over V • R : a relation of arity | t | Solution: h : V → D • h ( t ) ∈ R : for all ( t, R ) ∈ C Question: Does ( V, D, C ) have a solution? I.e., is there an assignment of values to the variables such that all constraints are satis fi ed? 1

  3. Constraint Satisfaction Applications : • belief maintenance • machine vision • natural language processing • planning and scheduling • temporal reasoning • type reconstruction • bioinformatics • · · · 2

  4. 3-Colorability 3-COLOR: Given an undirected graph A = ( V, E ) , is it 3-colorable? • The variables are the nodes in V . • The values are the elements in { R , G , B } . • The constraints are { ( ⟨ u, v ⟩ , ρ ) : ( u, v ) ∈ E } , where ρ = { ( R, G ) , ( R, B ) , ( G, R ) , ( G, B ) , ( B, R ) , ( B, G ) } . 3

  5. Introduction to Database Theory Basic Concepts : • Relation Scheme : a set of attributes • Tuple : mapping from relation scheme to data values • Tuple Projection : if t is a tuple on P , and Q ⊆ P , then t [ Q ] is the restriction of t to Q . • Relation : a set of tuples over a relation scheme • Relational Projection : if R is a relation on P , and Q ⊆ P , then R [ Q ] is the relation { t [ Q ] : t ∈ R } . • Join : Let R i be a relation over relation scheme S i . Then ✶ i R i is a relation over the relation scheme ∪ i S i de fi ned by ✶ i R i = { t : t [ S i ] ∈ R i } . 4

  6. Database Perspective of CSP Given: ( V, D, { C 1 , . . . , C m } ) , where C i = ( t i , R i ) . Assume (wlog): Each consists of distinct t i elements. Database Perspective : • V : attributes • D : values • ( t i , R i ) : relation R i over relation scheme t i Fact: (Bibel, Gyssens, Jeavons, Cohen) ( V, D, { C 1 , . . . , C m } ) has a solution iff ✶ m R i is 1 nonempty. 5

  7. Homomorphisms Homomorphism : Let A = ( A, R A 1 , . . . , R A m ) and B = ( B, R B 1 , . . . , R B m ) be two relational structures. h : A → B is a homomorphism from A to B if for every i ≤ m and every tuple ( a 1 , . . . , a n ) ∈ A n , R A ⇒ R B i ( a 1 , . . . , a n ) = i ( h ( a 1 ) , . . . , h ( a n )) . The Homomorphism Problem: Given relational structures A and B , is there a homomorphism h : A → B ? Example: An undirected graph A = ( V, E ) is 3- colorable ⇐ ⇒ there is a homomorphism h : A → K 3 , where K 3 is the 3-clique . 6

  8. Homomorphism Problems Examples: h • k -Clique: K k → ( V, E ) ? h • Hamiltonian Cycle: ( V, C | V | , ̸ =) → ( V, E, ̸ =) ? h • Subgraph Isomorphism: ( V, E, E ) → ( V ′ , E ′ , E ′ ) ? h • s-t Connectivity: ( V, E, { ⟨ s, t ⟩ } ) ̸→ ( { 0 , 1 } , = , ̸ =) ? Fact: (Levin, 1973) The homomorphism problem is NP-complete. 7

  9. CSP vs. Homomorphisms From CSP to Homomorphism : Given: ( V, D, { C 1 , . . . , C m } ) , where C i = ( t i , R i ) . De fi ne A , B : • A = ( V, { t 1 } , . . . , { t m } ) • B = ( D, R 1 , . . . , R m ) Fact : has a solution iff there is ( V, D, C ) homomorphism from A to B . 8

  10. CSP vs. Homomorphisms From Homomorphism to CSP : Given: A = ( A, R A 1 , . . . , R A m ) , B = ( B, R B 1 , . . . , R B m ) . De fi ne ( V, D, C ) : • V = A : elements of A are variables. • D = B : elements of B are values. • C = { ( t, R B t ∈ R A i ) : i } : constraints derived from A , B . Fact : There is homomorphism from A to B iff ( V, D, C ) has a solution. Conclusion : CSP=Homomorphism Problem • Feder&V., 1993 • Garey&Johnson, 1979: Homomorphism in, CSP not. 9

  11. Uniform CSP vs. Non-Uniform CSP Uniform CSP: { ( A , B ) : ∃ homomorphism h : A → B } Complexity of Uniform CSP : NP-complete Non-uniform CSP: Fix a structure B CSP( B ) = { A : ∃ homomorphism h : A → B } Complexity of Non-Uniform CSP : Depends on B • CSP( K 2 ) is in PTIME (2-C OLORABILITY ) • CSP( K 3 ) is NP-complete (3-C OLORABILITY ) 10

  12. Complexity of Non-Uniform CSP Research Program: Identity the tractable cases of non-uniform CSP • Goal : Understand complexity of a large class of problems in NP . Dichotomy Conjecture: (Feder&V., 1993) For every structure B , • either CSP( B ) is in PTIME • or CSP( B ) is NP-complete. Recall : P ̸ = NP ⇒ NP − NPC − P ̸ = ∅ (Ladner, 1975) Intuition : CSP is not expressive enough to diagonalize over PTIME. 11

  13. “Evidence” for the Conjecture “Evidence 1”: (Hell&Ne ˇ setril, 1990) Let B be an undirected graph. • B bipartite ⇒ CSP( B ) is in PTIME = • B non-bipartite = ⇒ CSP( B ) is NP-complete Intuition : Every undirected graph homomrphism problem is equivalent either to 2-COLOR or 3- COLOR. 12

  14. More “Evidence”: Boolean CSP B = { 0 , 1 } E.g.: 2-SAT B : 0 1 0 0 0 0 x ∨ y : 1 0 ¬ x ∨ y : 0 1 ¬ x ∨ ¬ y : 0 1 1 1 1 1 1 0 Dichotomy Theorem: (Schaefer, 1978) Let B have a Boolean domain, then • either B is trivial, Horn, anti-Horn, disjunctive, or af fi ne, and CSP( B ) is in PTIME, • otherwise CSP( B ) is NP-complete. 13

  15. Dichotomy and Classi fi cation Question : How far from CSP we need go to get a provable dichotomy? Feder&V., 1993: It suf fi ces to consider directed graphs to settle the Dichotomy Conjecture! Classi fi cation Question: For a given structure B , • when is CSP( B ) in PTIME? • when is CSP( B ) NP-complete? 14

  16. Recent Progress on the Dichotomy Conjecture Theorem : [Bulatov, 2002] The Dichotomy Conjecture holds when | B | = 3 . De fi nition : A relational structure B = ( B, R B 1 , . . . , R B m ) is conservative if it contains all possible monadic relations over the domain of the structure – all possible constraints over individual variables are available. Theorem : [Bulatov, 2003] The Dichotomy Conjecture holds when is B conservative. Theorem : [Barto, Kozik&Niven, 2009] The Dichotomy Conjecture holds when B is a source-free, sink-free digraph. Theorem : [Markovic, 2011] The Dichotomy Conjecture holds when when | B | = 4 . 15

  17. Sources of Tractability Empirical Observation : Feder&V., 1993 All known tractable CS problems can be explained as • combinatorial (Datalog) • algebraic (group-theoretic) Classi fi cation Conjecture: (Feder&V., 1993) Two explanations for tractability of CSP( B ) • Datalog • Group-Theoretic Bulatov, 2002 showed that the group-theoretic explanation is too weak – more general algebraic techniques required. 16

  18. Datalog and Non-Uniform CSP Example: N ON 2-C OLORABILITY O ( X, Y ) : − E ( X, Y ) : − O ( X, Y ) O ( X, Z ) , E ( Z, W ) , E ( W, Y ) : − Q O ( X, X ) Recall : Datalog ⊆ PTIME De fi ne : CSP( B ) = { A : A ̸∈ CSP( B ) } . Datalog vs. Non-Uniform CSP : Explanation for many tractability results • CSP( B ) is expressible in Datalog Note : CSP( B ) is positively monotone. 17

  19. k -Datalog De fi nition: • k -Datalog: Datalog with at most k variables per rule (N ON 2-C OLORABILITY is in 4-Datalog) • ∃ IL k : k -variable existential positive in fi nitary logic – variables: x 1 , . . . , x k – no universal quanti fi ers – no negations – in fi nitary conjunctions and disjunctions Facts: Fix k ≥ 1 • k -Datalog ⊂ ∃ IL k • ∃ IL k can be characterized in terms of existential k -pebble games between the Spoiler and the Duplicator . • There is a PTIME algorithm to decide whether the Spoiler or the Duplicator wins the existential k -pebble game. 18

  20. Existential k -Pebble Games A , B : structures • Spoiler : places on or removes a pebble from an element of A . • Duplicator : tries to duplicate move on B . A : a 1 , a 2 , . . . , a l l ≤ k B : b 1 , b 2 , . . . , b l • Spoiler wins : h ( a i ) = b i , 1 ≤ i ≤ l is not a homomorphism. • Duplicator wins : otherwise. Fact : (Kolaitis&V., 1995) B satis fi es the same ∃ IL k sentences as A iff the Duplicator wins the existential k -pebble game on A , B . 19

  21. k -Datalog and CSP Theorem: (Kolaitis&V., 1998): TFAE for k ≥ 1 and a structure B : • CSP( B ) is expressible in k -Datalog • CSP( B ) is expressible in ∃ IL k • CSP( B ) = { A : Duplicator wins the existential k -pebble game on A and B } . Intuition : CSP( B ) ∈ k -Datalog implies that existence of homomorphism is equivalent to the Duplicator winning the existential k -pebble game. 20

  22. Classi fi cation Questions For a given structure B : • Is CSP( B ) in k -Datalog, for a fi xed k > 0 ? • Is CSP( B ) in k -Datalog, for some k > 0 ? 21

  23. Group Theory Example : Af fi ne satis fi ability - linear equations mod 2 x 1 − x 2 + x 3 = 1 x 1 + x 2 − x 3 = 1 De fi nition : CSP ( B ) ∈ Subgroup if there is a fi nite group G such that each k -ary relation in B is a coset of G k . Theorem : Feder&V., 1993 CSP ( B ) ∈ Subgroup implies CSP ( B ) ∈ PTIME . Jeavons et al.: a more general algebraic framework 22

  24. The Product Operation De fi nition : Let G 1 = ( V 1 , E 1 ) and G 2 = ( V 2 , E 2 ) be two graphs. The product of these graphs is the graph G 1 × G 2 = ( V 1 × V 2 , E 1 × E 2 ) , where ( ⟨ u, u ′ ⟩ , ⟨ v, v ′ ⟩ ) ∈ E 1 × E 2 iff ( u, v ) ∈ E 1 and ( u ′ , v ′ ) ∈ E 2 . Note : This de fi nition can be extended to pairs of relational structures. 23

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend