Building Structure into Local Search for SAT 1 Chris Reeson Advanced Constraint Processing Fall 2009 By Duc Nghia Pham, John Thornton, and Abdul Sattar,

Slides:



Advertisements
Similar presentations
Hybrid BDD and All-SAT Method for Model Checking Orna Grumberg Joint work with Assaf Schuster and Avi Yadgar Technion – Israel Institute of Technology.
Advertisements

Review for Exam 2 Using MUXs to implement logic
© J. Christopher Beck Lecture 17: Tabu Search.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
ECE 667 Synthesis & Verification - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
© 2011 Carnegie Mellon University Binary Decision Diagrams Part Bug Catching: Automated Program Verification and Testing Sagar Chaki September.
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Constraint Systems Laboratory Oct 21, 2004Guddeti: MS thesis defense1 An Improved Restart Strategy for Randomized Backtrack Search Venkata P. Guddeti Constraint.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Research Information Session Associate Professor John Thornton Gold Coast BIT Honours Degree Convenor
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Algorithms in Exponential Time. Outline Backtracking Local Search Randomization: Reducing to a Polynomial-Time Case Randomization: Permuting the Evaluation.
SAT Algorithms in EDA Applications Mukul R. Prasad Dept. of Electrical Engineering & Computer Sciences University of California-Berkeley EE219B Seminar.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
ENGG3190 Logic Synthesis “Boolean Satisfiability” Winter 2014 S. Areibi School of Engineering University of Guelph.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
1 Message Passing and Local Heuristics as Decimation Strategies for Satisfiability Lukas Kroc, Ashish Sabharwal, Bart Selman (presented by Sebastian Brand)
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Quantified Formulas - Decision Procedure Daniel Kroening, Ofer Strichman Presented by Changki Hong 07 NOV 08.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Digitaalsüsteemide verifitseerimise kursus1 Formal verification: SAT SAT applied in equivalence checking.
On a random walk strategy for the Q2SAT problem K. Subramani.
Motivation & Goal SAT and Constraint Processing (CP) are fundamental areas of Computer Science that address the same computational questions. Compare SAT.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
Parallelizing MiniSat I-Ting Angelina Lee Justin Zhang May 05, Final Project Presentation.
Combination of Exact and Approximate Methods for SAT and MAX-SAT Problems Frédéric Lardeux, Frédéric Saubion and Jin-Kao Hao Metaheuristics and Combinatorial.
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques Silva Informatics Department.
Advanced Algorithm Design and Analysis (Lecture 14) SW5 fall 2004 Simonas Šaltenis E1-215b
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2009.
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.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
28.
Example Apply hierarchical clustering with d min to below data where c=3. Nearest neighbor clustering d min d max will form elongated clusters!
© J. Christopher Beck Lecture 16: Local Search.
Non-LP-Based Approximation Algorithms Fabrizio Grandoni IDSIA
Honors Track: Competitive Programming & Problem Solving 2-Satisfiability José Kuiper.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Daniel Kroening and Ofer Strichman 1 Decision Procedures in First Order Logic Decision Procedures for Equality Logic.
SAT tutorial1 Boolean Satisfiability in Electronic Design Automation Karem A. Sakallah EECS Department University of Michigan João Marques Silva Informatics.
Optimized SAT Encoding For Sudoku Puzzles Will Klieber and Gi-Hwon Kwon Sept 27, 2007 rev. 2 Changes from v1: Added a new slide after “A Better Encoding.
Sudoku Solutions Using Logic Equations Christian Posthoff The University of The West Indies, Trinidad & Tobago Bernd Steinbach Freiberg University of Mining.
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.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
First-Order Logic and Inductive Logic Programming
Local Search Strategies: From N-Queens to Walksat
Boolean Satisfiability in Electronic Design Automation
Logic Synthesis CNF Satisfiability.
SAT-Based Area Recovery in Technology Mapping
ECE 667 Synthesis and Verification of Digital Circuits
Resolution Proofs for Combinational Equivalence
Synthesis and Verification of Finite State Machines
ICT Programming Lesson 3:
CS21 Decidability and Tractability
Instructor: Aaron Roth
Solving Non-clausal Formulas with DPLL search
Presentation transcript:

Building Structure into Local Search for SAT 1 Chris Reeson Advanced Constraint Processing Fall 2009 By Duc Nghia Pham, John Thornton, and Abdul Sattar, IJCAI 2007 Focus on How It Works

Outline Background – SAT & Local Search Building blocks – Modeling Structure in SAT with Logic Gates – Variables: Independent, Internal, External – Dependency Lattice Solving Structured SAT w/ Local Search – Computing costs with variables sets Conclusion 2

SAT Given a SAT sentence (in CNF= conjunction of clauses) Find an assignment to the Boolean variables that satisfies each clause. 3 (  a  b  c)  (a   b)  (a   c) clause variable abc  a  b  ca   ba   c(  a  b  c)  (a   b)  (a   c)

Quick Review of Local Search Process 1.Start from a random state (complete assignment of values to variables) 2.Evaluate quality of state 3.Explore neighborhood 4.Move to a neighbor 5.Goto 1 unless you’ve reached desired solution quality max # of iterations time limit Restart process to your heart’s content Two types of moves – Improvement – Random 4 States State Quality

Outline Background – SAT & Local Search Building blocks – Modeling Structure in SAT with Logic Gates – Variables: Independent, Internal, External – Dependency Lattice Solving Structured SAT w/ Local Search – Computing costs with variables sets Conclusion 5

Idea: Structure in SAT The variables are partitioned into – Independent variables – Dependent variables – External variables A solution is determined – By the assignment of only the independent variables – Such as all external variables evaluate to 1 Advantage: smaller problem, quicker convergence 2 |Indpdt vars|

Logic Gates & Dependencies Dependencies between variables are modeled by logic gates Four types of logic gates are used: OR, AND, XOR, EQUIV Transformation of SAT problem – Cost of transformation? – # & size of alternative transformations? – For details, read [Ostrowski+ CP02][Ostrowski+ CP02] 7 OR AND XOR EQUIV (XNOR)

OR Gate 8 (  a  b  c)  (a   b)  (a   c) is equivalent to (b  c  a)  (  b  c   a) b c a a =  (b,c) abc  a  b  ca   ba   c(  a  b  c)  (a   b)  (a   c)

AND Gate 9 (a   b   c)  (  a  b)  (  a  c) Is equivalent to (b  c  a)  (  b   c   a) b c a a =  (b,c) abc a  b   c  a  b  a  c(a  b  c)  (  a  b)  (  a  c)

XOR Gate 10 (  a   b   c)  (a  b   c)  (a   b  c)  (  a  b  c) is equivalent to (  b  c  a)  (b   c  a)  (b  c   a)  (  b   c   a) abc  a  b  ca  b  ca  b  c abcabc (  a   b   c)  (a  b   c)  (a   b  c)  (  a  b  c) b c a a =  (b,c)

EQUIV Gate 11 (a  b  c)  (  a   b  c)  (  a  b   c)  (a   b   c) is equivalent to (b  c  a)  (  b  c  a)  (  b  c   a)  (b  c   a) b c a a =  (b,c) abc abcabc  a  b  c  a  b  ca  b   c (a  b  c)  (  a  b  c)  (  a  b  c)  (a  b  c)

EQUIV Gate = XNOR Gate 12 abc EQUIVXOR (  a   b   c)  (a  b  c)  (a   b  c)  (  a  b  c) is equivalent to (  b  c  a)  (b  c  a)  (b  c   a)  (  b  c   a) Equivalence (a  b  c)  (  a   b  c)  (  a  b  c)  (a   b   c) is equivalent to (b  c  a)  (  b  c  a)  (  b  c   a)  (b  c   a)

Extending to Three or More Inputs AND & OR extend naturally – a =  (b,c,d) or a =  (b,c,d) EQUIV in pairwise fashion – a=  (b,c,d) is a=  (d,  (b,c)) 13 bcd ANDOREQUIV b c d a a b c d a d c b

Outline Background – SAT & Local Search Building blocks – Modeling Structure in SAT with Logic Gates – Variables: Independent, Internal, External – Dependency Lattice Solving Structured SAT w/ Local Search – Computing costs with variables sets Conclusion 14

Categorizing Variables (1) An independent variable is one – That is never dependent A dependent variable is one – Whose value is determined by one or more gates 15 b c a dependent independent b c a dependent d c b independent dependent independent

16 Dependency Lattice (  a  b  c)  (a   b)  (a   c) (b   d   c)  (  b  d)  (  b  c) cd b a or and Independent Dependent cdb a b c a independent d c b dependent

Categorizing Variables (2) An independent variable is one – That is never dependent An internal gate is one – That can be recognized within the structure of the original CNF formula – All dependent variables from the original problem An external gate is one – Where the dependent variable is a clause from the original problem – Newly created dependent variables 17 S 1 =(  a  b  c)  (a   b)  (a   c)  (b   d   c)  (  b  d)  (  b  c) cd b a or and Independent Internal S 2 =(  a  b  c)  (a   b)  (a   c)  (b   d   c)  (  b  d)  (  b  c)  (b  d) e cd b a or and Independent Internal and External

Solving SAT Instantiate all independent variables such that all the external nodes evaluate to true 18 cd b a or and Independent Dependent cdb aS1S e cd b a or and Independent Internal and External cdb aeS2S

Outline Background – SAT & Local Search Building blocks – Modeling Structure in SAT with Logic Gates – Variables: Independent, Internal, External – Dependency Lattice Solving Structured SAT w/ Local Search – Computing costs with variables sets Conclusion 19

Local Search for ‘Structured’ SAT 1.Instantiate the independent variables 2.Propagate values in the lattice & compute variable sets 3.Compute the make & break cost for each independent variable 4.Flip the independent variable w/ the smallest flip cost (make  break?) or do a random move 5.Goto Step 2 6.Repeat until solution is found (external variables are all T) or run out of time.. 20

Start with an assignment of the independent variables Store at each gate as a variable set – The independent variables that, when flipped, will change the gate’s value Calculate the make cost of flipping an independent variable – The number of external variables that will be made true Calculate the break cost of flipping an independent variable – The number of external variables that will be made false 21 Make & Break Costs & Variable Sets e cd b a or and F F F F F {} {c} {} e cd b a or and F T F F F {c} {} e cd b a or and T T T T T {c, d} {} {c, d}

Updating Variable Sets Start from the independent variable – Flip its value – Propagate change downwards – Stop when a gate’s value and its variable list do not change 22 v1v1 v2v2 v4v4 v3v3 g1g1 g2g2 g3g3 c1c1 or and ↔ FFFT F T F F {v 3 } {v 2, v 3 } {v 1,v 2,v 3 } {v 2 } AND gate is T  V  ∪ {parents=T) F  V  ∩{parents=F} \ ∪ {parents=T} OR gate is F  V  ∪ {parents=F} T  V  ∩{parents=T} \ ∪ {parents=F} EQUIV V  ∪ {parents} \ ∩ {parents}

Conclusion [Ostrowski+ CP02] used approach in BT search [Ostrowski+ CP02] [Pham+ IJCAI07] used approach in local search Experiments show strategy is competitive 23