Efficient Enumeration Algorithms for Constraint Satisfaction Problems

Similar documents
Where Can We Draw The Line?

SAT-CNF Is N P-complete

(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

CS 512, Spring 2017: Take-Home End-of-Term Examination

Complexity of clique coloring and related problems

The Inverse of a Schema Mapping

Computability Theory

Complexity of unique list colorability

NP and computational intractability. Kleinberg and Tardos, chapter 8

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Chapter 10 Part 1: Reduction

8.1 Polynomial-Time Reductions

QCSP on semicomplete digraphs

Online Appendix: A Stackelberg Game Model for Botnet Data Exfiltration

SAT and Termination. Nao Hirokawa. Japan Advanced Institute of Science and Technology. SAT and Termination 1/41

NP-complete Reductions

LTCS Report. Concept Descriptions with Set Constraints and Cardinality Constraints. Franz Baader. LTCS-Report 17-02

NP-Completeness. Algorithms

Notes on CSP. Will Guaraldi, et al. version /13/2006

PROPOSITIONAL LOGIC (2)

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

arxiv: v2 [cs.ds] 30 Jan 2018

Isomorphisms between low n and computable Boolean algebras

Notes on CSP. Will Guaraldi, et al. version 1.7 4/18/2007

Reductions. Linear Time Reductions. Desiderata. Reduction. Desiderata. Classify problems according to their computational requirements.

The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT

Exercises Computational Complexity

9.1 Cook-Levin Theorem

Constraint Acquisition

W4231: Analysis of Algorithms

Posets, graphs and algebras: a case study for the fine-grained complexity of CSP s

Complexity of Disjoint Π-Vertex Deletion for Disconnected Forbidden Subgraphs

4 Generating functions in two variables

Mapping CSP into Many-Valued SAT

2.6 BOOLEAN FUNCTIONS

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

1 Introduction. 1. Prove the problem lies in the class NP. 2. Find an NP-complete problem that reduces to it.

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT

Complexity Classes and Polynomial-time Reductions

Combining forces to solve Combinatorial Problems, a preliminary approach

Normal Forms for Boolean Expressions

Solving 3-SAT. Radboud University Nijmegen. Bachelor Thesis. Supervisors: Henk Barendregt Alexandra Silva. Author: Peter Maandag s

CS 151 Complexity Theory Spring Final Solutions. L i NL i NC 2i P.

ON SWELL COLORED COMPLETE GRAPHS

A Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable

1 Definition of Reduction

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS

Knowledge Compilation Properties of Tree-of-BDDs

DM841 DISCRETE OPTIMIZATION. Part 2 Heuristics. Satisfiability. Marco Chiarandini

SAT Solvers. Ranjit Jhala, UC San Diego. April 9, 2013

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

Reductions and Satisfiability

New Upper Bounds for MAX-2-SAT and MAX-2-CSP w.r.t. the Average Variable Degree

2 A topological interlude

Lecture 15: The subspace topology, Closed sets

Database Theory VU , SS Codd s Theorem. Reinhard Pichler

PCP and Hardness of Approximation

P -vs- NP. NP Problems. P = polynomial time. NP = non-deterministic polynomial time

Finite Model Generation for Isabelle/HOL Using a SAT Solver

Introduction to Parameterized Complexity

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints

CMPSCI611: The SUBSET-SUM Problem Lecture 18

9. Parameter Treewidth

Kernels and representation

K-Anonymity. Definitions. How do you publicly release a database without compromising individual privacy?

(p 300) Theorem 7.27 SAT is in P iff P=NP

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

From Types to Sets in Isabelle/HOL

Logic and Databases. Phokion G. Kolaitis. UC Santa Cruz & IBM Research - Almaden

Decision Procedures. An Algorithmic Point of View. Decision Procedures for Propositional Logic. D. Kroening O. Strichman.

8 Matroid Intersection

Local Consistency in Weighted CSPs and Inference in Max-SAT

8 NP-complete problem Hard problems: demo

Improving Coq Propositional Reasoning Using a Lazy CNF Conversion

What's the difference between the entailment symbol with the equals vs the entailment symbol with one line? Single turnstile meaning

Symbolic Methods. The finite-state case. Martin Fränzle. Carl von Ossietzky Universität FK II, Dpt. Informatik Abt.

Randomness and Computation March 25, Lecture 5

2SAT Andreas Klappenecker

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

arxiv: v2 [cs.cc] 29 Mar 2010

Exact Algorithms for Graph Homomorphisms

Maximal Tractable Fragments of the Region Connection Calculus: A Complete Analysis

Chordal deletion is fixed-parameter tractable

Feedback Arc Set in Bipartite Tournaments is NP-Complete

Full CNF Encoding: The Counting Constraints Case

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

CSCE750 Analysis of Algorithms Fall 2017 NP-Complete Problems

Boolean Functions (Formulas) and Propositional Logic

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017

CSP- and SAT-based Inference Techniques Applied to Gnomine

Practical SAT Solving

Algorithms for SAT and k-sat problems

Minimum Satisfying Assignments for SMT. Işıl Dillig, Tom Dillig Ken McMillan Alex Aiken College of William & Mary Microsoft Research Stanford U.

Linear Time Unit Propagation, Horn-SAT and 2-SAT

Robert Cowen and Stephen H. Hechler. Received June 4, 2003; revised June 18, 2003

A Complexity Dichotomy for Finding Disjoint Solutions of Vertex Deletion Problems

EXTREME POINTS AND AFFINE EQUIVALENCE

Approximating the Virtual Network Embedding Problem: Theory and Practice

Logic and Databases. Lecture 4 - Part 2. Phokion G. Kolaitis. UC Santa Cruz & IBM Research - Almaden

Transcription:

Efficient Enumeration Algorithms for Constraint Satisfaction Problems Henning and Ilka Schnoor Institut für Theoretische Informatik Leibniz Universität Hannover 2.10.2006 Efficient Enumeration Algorithms for Constraint Satisfaction Problems 1

Enumeration Problems Task Given a constraint-formula ϕ, enumerate its set of solutions. Question What is an efficient enumeration algorithm? Efficient Enumeration Algorithms for Constraint Satisfaction Problems 2

Enumeration Problems Definition Efficient enumeration algorithm: Input ϕ, print solutions: Each solution is printed exactly once. Time between two solutions is polynomial. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 3

Notation Γ is a constraint language A Γ-formula is of the form n ϕ = R i (x1, i..., xk i i ) i=1 for relations R 1,..., R n Γ. Similarly: R-formulas. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 4

A Simple Algorithm An algorithm for the Boolean case Let ϕ be a formula with variables x 1,..., x n. If ϕ x 1 SAT: enumerate all solutions of ϕ[x 1 /1] If ϕ x 1 SAT: enumerate all solutions of ϕ[x 1 /0] Theorem (Creignou, Hébrard, 1997) In the Boolean case, there is no other algorithm. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 5

A Simple Algorithm Algorithm needs decision for Γ-formulas with literals. Works if CSP (Γ {{(0)}, {(1)}}) P. Generalization to non-boolean case: Γ + := Γ {{(α)} α D}. Γ + is Γ with literals Efficient Enumeration Algorithms for Constraint Satisfaction Problems 6

Non-Boolean Generalization Theorem (Cohen, 2004) If CSP (Γ + ) P, then Γ has an efficient enumeration algorithm. For the Boolean case, the converse holds as well (Creignou, Hébrard, 1997). What about arbitrary domains? Efficient Enumeration Algorithms for Constraint Satisfaction Problems 7

Lexicographic Orderings A weaker version of the converse does hold. Theorem Equivalent: 1. CSP (Γ + ) P. 2. Solutions Γ-formuls can be enumerated in lexicographical ordering, with different order for each variable. For x 1, we demand 0 < 2 < 4 < 3 < 1 For x 2, we demand 4 < 3 < 1 < 0 < 2... Efficient Enumeration Algorithms for Constraint Satisfaction Problems 8

Algebraic Properties Proposition If CSP (Γ + ) P, there is an efficient enumeration algorithm. If CSP (Γ) / P, there is no efficient enumeration algorithm. Look at Γ where CSP (Γ) P, and CSP (Γ + ) / P. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 9

Algebraic Properties Lemma Let CSP (Γ) P, CSP (Γ + ) / P. There is a unary f Pol (Γ) such that f is not injective and f f = f. For the D = 3 this means this is a constant or of the form f a b : f a b (a) = b f a b (b) = b f a b (c) = c Efficient Enumeration Algorithms for Constraint Satisfaction Problems 10

An Example Example Let R := {(2, 0, 0, 2), (2, 0, 2, 0), (2, 2, 0, 0), (1, 0, 0, 1), (1, 0, 1, 0), (1, 1, 0, 0), (1, 0, 0, 0)}. R has an eff. enumeration algorithm, CSP (R + ) is NP-complete. f 2 1 is a polymorphism of R. S := R {0, 1} 4 = {(1, 0, 0, 1), (1, 0, 1, 0), (1, 1, 0, 0), (1, 0, 0, 0)}. S is Schaefer (closed under conjunction). We can enumerate solutions for S-formulas. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 11

An Example Enumerating S-formulas is the same as enumerating Boolean solutions for R-formulas. k ϕ = R(x1, i..., xn) i i=1 k ψ = S(x1, i..., xn) i i=1 The formulas have the same Boolean solutions. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 12

An Example f 2 1 Pol (R), hence there is a Boolean for each real solution. Boolean solution is real one with all 2s made to 1s. Given Boolean Solution, generate all fitting solutions. Get real from Boolean solutions: change some 1s into 2s. The 1 is a placeholder for either 1 or 2. I {0} J 0 x 1,..., x n I {1, 2} J J 1 2 Efficient Enumeration Algorithms for Constraint Satisfaction Problems 13

Partial Solutions We get Boolean solutions. How do we get the refinements? Set some variables from 1 to 2. This is a Boolean Constraint Satisfaction Problem. Consider a Boolean solution for a single clause: R(w= {1, 2}, x = 0, y= 0, z= {1, 2}) Set both w and z to 2, or both to 1. Relation describing combinations: R I = {(1, 0, 0, 1), (2, 0, 0, 2)} {(1, 1), (2, 2)} Efficient Enumeration Algorithms for Constraint Satisfaction Problems 14

Partial Solutions Original: Enumeration problem over domain {0, 1, 2} Split up into two Boolean problems: 1. Enumerate the Boolean solutions of an R-formula 2. Find all fitting solutions to a Boolean solution Efficient Enumeration Algorithms for Constraint Satisfaction Problems 15

Partial Solutions E := {D 1,..., D k } a partition of the domain D. I : VAR (ϕ) E J : VAR (ϕ) D is compatible with I if J(x) I (x) for all variables x of ϕ I (x) = {0} I (y) = {1, 2} I (z) = {1, 2} J(x) = 0 J(y) = 1 J(z) = 2 I is a partial solution for ϕ, if there is a solution J = ϕ and J is compatible with I. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 16

Partial Solutions E = {D 1,..., D k }, I a partial E-solution, J compatible with I J α 1 I D 1 J α 2 α 3 x 1,..., x n I I D 2. J J α 4 α 5 D k J α m 1 α m Efficient Enumeration Algorithms for Constraint Satisfaction Problems 17

Partial Enumeration Algorithms PROBLEM: How can we enumerate partial E-solutions? E := {D 1,..., D k } a partition of the domain D. Theorem If CSP (Γ {D 1,..., D k }) P, then Γ we can efficiently enumerate partial E-solutions for Γ-formulas. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 18

From Partial to Real Solutions PROBLEM: Given a partial solution I, how can we generate all compatible solutions J? Definition R D n, E a partition on D. v E n. v E D := {t R t compatible with v} R E D v Γ E D R := v E D, without redundance := { R E D v v E n}. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 19

From Partial to Real Solutions Theorem R D n, E partition on D. Equivalent: 1. We can get all compatible solutions to partial solutions for R-formulas efficiently 2. Γ E D R is enumerable. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 20

Nested Algorithm Original: Enumeration problem over the domain D Consider partition E on D Split up into two problems: 1. Enumerate the partial E-solutions 2. Find all compatible solutions to a partial E-solution Two problems over a smaller domain. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 21

Negative results: The Three-Element Case Lemma Let D = {a, b, c}, R D n, such that: 1. f a b Pol (R) 2. f a b (R) does not have an efficient enumeration algorithm. 3. One of the following cases occurs:: 3.1 There is some v {a, b} n such that v / R, v[a/c, b/b] R, v[a/b, b/c] R. 3.2 (b,..., b) / R 3.3 (a,..., a), (c,..., c) / R, and there is some v {a, b} n \ R such that f a c (v) R R not enumerable, if P NP. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 22

The Algebraic Approach Let Γ 1 Γ 2. Transform Γ 1 -formulas into Γ 2 -formulas, with new -variables. New variables are a problem for enumeration. For Boolean case, enumeration follows the Galois connection. What about non-boolean domains? Efficient Enumeration Algorithms for Constraint Satisfaction Problems 23

No Galois Connection Theorem There are Γ 1 and Γ 2 with Γ 2 Γ 1 Γ 1 has an efficient enumeration algorithm, and Γ 2 does not (unless P = NP). Efficient Enumeration Algorithms for Constraint Satisfaction Problems 24

Counter-Example Example 0 B @ {a} {a} {b} {a, b} 3 \ {(b, b, b)} {(b, b, b, b, b, b)} {b} {a} {b} {a} {a, b} 3 \ {(b, b, b)} {(b, b, b, b, b, b)} {c} {b, c} 7 \ {(c, c, c, c, c, c, b), (c, c, c, c, c, c, c)} {(a, a, a, a, a, a, a, c)}. 1 C A {c} 0 B @ 1 {a} {a} {b} {a, b} 3 \ {(b, b, b)} {(b, b, b, b, b, b)} {a} {b} {a} {a, b} 3 \ {(b, b, b)} {(b, b, b, b, b, b)} C A {c} {b, c} 6 \ {(c, c, c, c, c, c)} {(a, a, a, a, a, a, c)}. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 25

Towards a dichotomy Theorem R D n, D = 3, E = {{a, b}, {c}} partition on D, such that all polymorphisms of R are conservative on E. Then our algorithms cover all cases. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 26

Future Research We have shown new enumeration algorithms. Previously known algebraic methods are only of limited use. For more hardness results, we will need to study partial polymorphisms. Efficient Enumeration Algorithms for Constraint Satisfaction Problems 27

Thank You! Questions? Efficient Enumeration Algorithms for Constraint Satisfaction Problems 28