Order encoding x i ↔ (X ≥ i)(X = 3) = [1,1,1,0,0] Problem (hard) Problem (hard) Solution CNF Encoding Finite Domain Problem Solving Model Constraint Model.

Slides:



Advertisements
Similar presentations
The Complexity of Linear Dependence Problems in Vector Spaces David Woodruff IBM Almaden Joint work with Arnab Bhattacharyya, Piotr Indyk, and Ning Xie.
Advertisements

Constraint Satisfaction Problems
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Course Summary What have we learned and what are we expected to know?
Interactive Configuration
Programming with Boolean Satisfaction Michael Codish Department of Computer Science Ben Gurion University Beer-Sheva, Israel CP meets CAV Joint.
This lecture: CSP Introduction and Backtracking Search
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
1 Integrating CSP Decomposition Techniques and BDDs for Compiling Configuration Problems Sathiamoorthy Subbarayan IT University of Copenhagen.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!
/425 Declarative Methods - J. Eisner1 Constraint Programming.
CPSC 322, Lecture 11Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Computer Science cpsc322, Lecture 11 (Textbook Chpt 4.0 – 4.2) January,
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.
Constraint Satisfaction Problems
A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Cardinality & Sorting Networks. Cardinality constraint Appears in many practical problems: scheduling, timetabling etc’. Also takes place in the Max-Sat.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
T Ball (1 Relation) What Your Robots Do Karl Lieberherr CSU 670 Spring 2009.
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Jim Little UBC CS 322 – CSP 1 September 27, 2014 Textbook §
Problem (hard) Solution CNF Satisfied assignment Encoding FINITE DOMAIN PROBLEM SOLVING Model Constraint Model Direct Constraint / Bits relation lost.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
HW #1. Due Mar 22 Midnight Verify the following program using SAT solver 1. Translate the program into a SSA form 2. Create a Boolean formula from.
Lacey Johnson Summer 2013 Student Research Project – James Madison University Sudoku can be described as a system of polynomials which can then be solved.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Chapter 5 Constraint Satisfaction Problems
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
Accelerating Random Walks Wei Wei and Bart Selman.
Saleem Sabbagh & Najeeb Darawshy Supervisors: Mony Orbach, Technion & Ilia Averbouch, IBM Started at: Spring 2012 Duration: Semester.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 9: Test Generation from Models.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
Solving BCSP using GA and PBIL Constraint Satisfaction Problem Group Sana Benhamida Andrea Roli Belgasem Ali Problem leader J.V.Hemert Jorge Tavares Group.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
10.3 Reformulation The Lex-Leader Method Shant Karakashian 1.
SAT Encodings for Sudoku Bug Catching in 2006 Fall Sep. 26, 2006 Gi-Hwon Kwon.
Roman Barták (Charles University in Prague, Czech Republic) ACAT 2010.
White board practice problems By Ms. Taubman. Name all the sets of numbers that belongs to.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Automatic Test Generation
Constraint Satisfaction Problems (CSPs) Introduction
Constraint Programming
L is in NP means: There is a language L’ in P and a polynomial p so that L1 ≤ L2 means: For some polynomial time computable map r :  x: x  L1 iff.
Inference and search for the propositional satisfiability problem
Constraint Satisfaction
Constraint Satisfaction Problems (CSPs) Introduction
LPSAT: A Unified Approach to RTL Satisfiability
SAT-Based Area Recovery in Technology Mapping
NP-Completeness Proofs
Modeling Sudoku as a CNF Formula
Modeling Sudoku as a CNF Formula
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Consistency algorithms
Presentation transcript:

Order encoding x i ↔ (X ≥ i)(X = 3) = [1,1,1,0,0] Problem (hard) Problem (hard) Solution CNF Encoding Finite Domain Problem Solving Model Constraint Model Constraint Model Direct CSP solving Model Solution Model Solution Translate Decoding SAT solving Constraint Model Constraint Model Simplified CNF Simplified CNF Encoding CNF Simplified Model Simplified Model Encoding Optimized SAT Encoding CNF’’ CNF’ Partial Evaluation CNF preprocessors such: SatELite, ReVivAl Based on Unit Propagation and Resolution. CNF preprocessors such: SatELite, ReVivAl Based on Unit Propagation and Resolution. Simplified Model’ Simplified Model’ Encoding Partial Evaluation using Equi-Propagation Problems: Constraint / Bits connection lost Large CNF Problems: Constraint / Bits connection lost Large CNF Constraint ( C1, φ 1 ) Constraint ( C1, φ 1 ) … M = Constraint ( C1, φ 1 ) Constraint ( C1, φ 1 ) Constraint ( C’3, φ‘ 3 ) Constraint ( C’3, φ‘ 3 ) Constraint ( C’n, φ’ n ) Constraint ( C’n, φ’ n ) … M’ = φ = Simplify CSP techniques Boolean techniques Constraint ( C2, φ 2 ) Constraint ( C2, φ 2 ) Constraint ( C3, φ 3 ) Constraint ( C3, φ 3 ) Constraint ( Cn, φ n ) Constraint ( Cn, φ n ) Constraint ( C2, φ 2 ) Constraint ( C2, φ 2 ) φ1φ1 φ1φ1 φ' 3 φ' n … Equi-Propagation Standard encodings Modeling Finite Domain CSP representing numbers (integers) Binary Unary Direct encoding x i ↔ (X = i) (X = 3) = [0,0,0,1,0,0] x i ↔ (X = i) (X = 3) = [0,0,0,1,0,0] X ij X ≥ iX < j good for representing ranges X u u v v i good for arbitrary sets good for arithmetic operations with constants: + 3 = * 3 = div 3 = a a a a a a b b b b b b c c c c c c a a c c b b a a c c b b c c f f c c b b a a c c b b a a f f e e d d g g a a b b c c d d e e f f g g b=c e=f=g x= -y, x=y, x=0, x=1 x= -y, x=y, x=0, x=1 Equi-Propagation Equi-propagation is the process of inferring new equational consequences from a single constraint in the model (and other existing equational information). When inferring such equational consequence, x can be removed from the model by replacing x with its equivalent in all the constraints in the model. MINION v0.10SatELite (SymB)Sugar (v1.14.7) (SymB)BEE (SymB)instance SymB+ (sec.) SymB (sec.) [M’06] (sec.) SAT (sec.) CNF size (clauses) preproc (sec.) SAT (sec.) CNF size (clauses) generate (sec.) SAT (sec.) CNF size (clauses) compile (sec.) ∞ ∞ ∞ ∞∞ ∞∞∞ ∞ Balanced Incomplete Block Designs Definition: a 5-tuple of positive integers and require to partition v distinct objects into b blocks such that each block contains k different objects, exactly r objects occur in each block, and every two distinct objects occur in exactly l blocks. Variables: B 11, …, B bv Domains: B ij {0,1} Constraints: each row constraint: sum(B i1,…,B iv ) = r each column constraint: sum(B 1i,…,B bi ) = k each two rows constraint: sum(B i1 *B j1, …,B iv *B jv )= l BIBD Satisfied assignment Encoding Our Approach Nonograms Definition: an nXm board of cells to color black or white and given clues per row and column of a board. A clue is a number sequence indicating blocks of cells to be colored black. Variables: B 11, …, B nm R 11,…R 1k,…,R m1,…R mp C 11,…C 1q,…,C n1,…,C nr Domains: B ij {0,1} R mo ϵ{0,..,n} C no ϵ{0,..,m} Constraints: block constraint: block(R ij,R ij +,[B 1i,…,B ni ]) space constraint: block(R ij +,R ij+1,[-B 1i,…,-B ni ]) no overlap constraint: leq(R ij + +1, R ij+1 ) Time (sec.)Solver Wolter BGU BEE 5,000 random 30x30 puzzles There are dedicates solvers such as Jan Wolter's pbnsolve ( Ben-Gurion University Solver ( BEE is faster than the dedicated solvers on the hard puzzles. Walt.BGUBEEInstance SAT (sec.) CNF size (clauses) compile (sec.) sizeid ∞∞ (30x30)9717 ∞∞ (50x40)10000 ∞∞ (45x65) (63x52) (63x52) (47x47) (80x80) (19x19) (25x25)6574 Selected human puzzles Experiments  When encoding CSP model to SAT holding both representation for each constraint gives the ability to apply simplify techniques from both worlds on each constraint.  A complete equi-propagator for a constraint can be implemented using binary decision diagrams (BDDs) and can be evaluate in polynomial time.  When C(X1,…,Xk) a constraint about (fixed) “k” integers with n bits each, the BDD representing it is of size O(n^k).  Global constraints (such as allDiff) implemented using Ad-Hoc rules.  There is a strong connection between Simplify and Encoding because Simplify done on the “encoding bits” and might change the encoding accordingly.  By using the Equi-Propagation technique we generates a small optimized CNF. diff(U1={ 0..4 }=[x1,x2,x3,x4], U2={ 0..4 }=[y1,y2,y3,y4]) sumBits(a,d,b,x3,y2,c,y4)=3 Constraints … …… diff(U1={ 1,3 }=[1,x2,x2,0], U2={ 1,3 }=[1,y2,y2,0]) sumBits(a,1,b,x2,y2,c,0)=3 Constraints … …… diff(U1={ 1,3 }=[1,x2,x2,0], U2={ 1,3 }=[1,-x2,-x2,0]) sumBits(a,1,b,x2,-x2,c,0)=3 Constraints … …… diff(U1={ 1,3 }=[1,x2,x2,0], U2={ 1,3 }=[1,-x2,-x2,0]) sumBits(a,b,c)=1 Constraints … …… U1 ≠ U2 (y2= -x2) U1 0, U1 ≠ 3 (x1=1, x2=x3, x4=0) d=1 U1 0, U1 ≠ 3 (x1=1, x2=x3, x4=0) d=1 Equi-Propagation Example M = M’ = Simplify