SAT J. Gonzalez. Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving
Advertisements

Interactive Configuration
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
Counting the bits Analysis of Algorithms Will it run on a larger problem? When will it fail?
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
The Theory of NP-Completeness
Willis Lemasters Grant Conklin. Searching a tree recursively one branch at a time, abandoning any branch which does not satisfy the search constraints.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
SAT Algorithms in EDA Applications Mukul R. Prasad Dept. of Electrical Engineering & Computer Sciences University of California-Berkeley EE219B Seminar.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Boolean Satisfiability and SAT Solvers
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
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.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
First-Order Logic and Inductive Logic Programming.
Hard Problems Sanghyun Park Fall 2002 CSE, POSTECH.
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
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.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Planning as Satisfiability (SAT-Plan). SAT-Plan Translate the planning problem into a satisfiability problem for length n of Plan garb 0 (proposition)present.
“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”
G51IAI Introduction to Artificial Intelligence
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson.
NPC.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Hard Problems Some problems are hard to solve.  No polynomial time algorithm is known.  E.g., NP-hard problems such as machine scheduling, bin packing,
Chapter 10 NP-Complete Problems.
Inference in Propositional Logic (and Intro to SAT)
The Propositional Calculus
Logical Inference: Through Proof to Truth
Lecture 2 Propositional Logic
Introduction to the Boolean Satisfiability Problem
A Progressive Approach for Satisfiability Modulo Theories
Introduction to the Boolean Satisfiability Problem
Presentation transcript:

SAT J. Gonzalez

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

SAT Decission Problem Assing true and false values to make the sentence true NP-Complete Literals: An atom or its negation Clauses: Disjunction of Literals Sentence in CNF: Conjunction of Clauses Literal Clauses Sentences In CNF  ......

CNF and DNF CNF: Conjunctive normal form DNF: Disjunctive normal form

CSP (Constraint Satisfaction Problems) Variables: WA, NT, Q, NSW, V, SA, T Domains: D i = {red,green,blue} Constraints: –WA ≠ NT, –WA ≠ SA –NT ≠ SA –NT ≠ Q –SA ≠ Q –SA ≠ NSW –SA ≠ V –Q ≠ NSW –NSW ≠ V –V ≠ T

CSP (Constraint Satisfaction Problems) Variables: WA, NT, Q, NSW, V, SA, T Domains: D i = {red,green,blue} Constraints: –WA ≠ NT, –NT ≠ SA –NT ≠ Q –SA ≠ Q –SA ≠ NSW –SA ≠ V –Q ≠ NSW –NSW ≠ V –V ≠ T X WA,red  X WA,green  X WA,blue X NT,red  X NT,green  X NT,blue X WA,red → ¬X NT,red X WA,green → ¬X NT,green X WA,blue → ¬X NT,blue

CSP (Constraint Satisfaction Problems) Variables: WA, NT, Q, NSW, V, SA, T Domains: D i = {red,green,blue} Constraints: –WA ≠ NT, –NT ≠ SA –NT ≠ Q –SA ≠ Q –SA ≠ NSW –SA ≠ V –Q ≠ NSW –NSW ≠ V –V ≠ T X WA,red  X WA,green  X WA,blue X NT,red  X NT,green  X NT,blue ¬X WA,red  ¬X NT,red ¬X WA,green  ¬X NT,green ¬X WA,blue  ¬X NT,blue

CSP (Constraint Satisfaction Problems) Variables: WA, NT, Q, NSW, V, SA, T Domains: D i = {red,green,blue} Constraints: –WA ≠ NT, –NT ≠ SA –NT ≠ Q –SA ≠ Q –SA ≠ NSW –SA ≠ V –Q ≠ NSW –NSW ≠ V –V ≠ T (X WA,red  X WA,green  X WA,blue )  (X NT,red  X NT,green  X NT,blue )  (¬X WA,red  ¬X NT,red )  (¬X WA,gree  ¬X NT,gree )  (¬X WA,blue  ¬X NT,blue ) …

CSP (Constraint Satisfaction Problems) SAT is an special case of CSP. CSP to SAT CSP –Discrete CSP N-queen problem Graph coloring problem Scheduling problem –Binary CSP SAT problem Max-SAT problem

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

Algorithms for SAT Discrete Constrained Algorithms: –Discrete, satisfies all clauses –Goal: satisfy all clauses (constraints ) –Usually uses Splitting (search) and/or Resolution Discrete Unconstrained Algorithms: –Discrete, minimize a function –Minimize the number of unsatisfied clauses –Usually uses Local Search. Constrained Programming Algorithms: –Non discrete, satisfies all clauses –From CNF to IP (Integer Programming). –Usually uses Linear Programming relaxations Unconstrained Global Optimization Algorithms: –Non discrete, minimize a function (constrains included in such function) –From a formula on Boolean Space (a decision problem) to an unconstrained problem on real Space (unconstrained global optimization problem). –Usually uses many global optimization methods.

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

Splitting and Resolution Replace one formula by one or more other equivalent formulas. Splitting: –A variable v is replaced by True and False. –Two sub-formulas are generated. –The original formula has a satisfying truth assignment iff either sub- formula has one satisfying truth assignment. P=true P=False

Splitting and Resolution Stop recursion: –Any formula with no variables is True –All subformulas are false and there is no formulas with variables Satisfiable Unsatisfiable

Splitting and Resolution Resolution: Using a resolvent to create new clauses. Resolvent: clauses transformation based on a given variable v. Resolvent

Splitting and Resolution Resolution: Using a resolvent to create new clauses. Resolvent: clauses transformation based on a given variable v. Resolvent

Splitting and Resolution Stop recursion: –Formulas with an empty clause have no solution –No more resolvent could be created Unsatisfiable Satisfiable

Splitting and Resolution First methods: –DP (Davis-Putnam): Resolution –DPL (Davis-Putnam-Loveland): Splitting (+ depth-first search avoids memory explosion)

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

Local Search Begins with an initial vector y 0 F(y 0 ): Number of unsatisfiable formulas We define neighbourhood function N(y i ) N(y 0 )=y 1 F(y i+1 )>F(y 0 ): strategies are applied to help escape from the local minima.

True(C), False(A,B,D) F=2

True(C), False(A,B,D) F=2 True(A,C), False(B,D) F=1

True(C), False(A,B,D) F=2 True(A,C), False(B,D) F=1 True(A,B,C), False(D) F=1

True(C), False(A,B,D) F=2 True(A,C), False(B,D) F=1 True(A,B,C), False(D) F=1 True(A,C,D), False(B) F=1

True(C), False(A,D,B) F=2 True(C,D), False(A,B) F=1 True(C,D,A), False(B) F=1 True(C,D,B), False(A) F=0

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

Integer Programming Method (IP)

Solving –Linear Programs (LP): solved by the Simplex –Integer Programs (IP): no fast technique. –Integer Linear Programs (ILP): Is a LP constrained by integrality restrictions Method: –Solve a LP –If solution is integer => end –If solution is non integer, round off such values If it is a solution => end Else adds a new constraint and try again

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

Global optimization Continuous Unconstrained Formulation From discrete to continuous (UniSAT) Try to minimize a function instead of trying to verify concrete restrictions.

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

Which is the best method? Local search: –Faster for satisfiable CNF –Can not prove unsatisfiability DP algorithm (split, resolution): –Slower for satisfiable CNF –Can prove unsatisfiability

Algorithm categories Complete –Find the unique hard solution –Determine whether or not a solution exits –Give the variable settings for one solution –Find all solutions or an optimal solution –Prove that there is no solution Incomplete –Verify that there is no solution but could not find one. –Can not optimize solution quality

Performance evaluation –Experimentally Works for random formulas Does not work for worst-case formulas (too many formulas for every given size) Sometimes inconclusive –Analytically Works for random formulas Works for worst-case formulas Does not work for typical formulas (which is his mathematical structure) Need simplified algorithms

P-Subclasses of SAT Solved in polynomial time –Determine if a formula (or a portion) is polynomial-time solvable –The study of this subclasses reveals the nature of these “easy” SAT formulas Subclasses: –2-SAT: CNF formula with clauses of one or two literals only: –Horn Formulas: CNF formula where every formula has at most one positive literal. –Extended Horn Formulas: Rounding the results of a Linear Programming method we obtain the real solutions. –Balanced formulas: When a Linear Programming method can be used to obtain integer solutions.

Applications Mathematics Computer Science and AI Machine Vision Robotics Computer-aided manufacturing Database systems Text processing Computer graphics Integrated circuit design automation Computer architecture design High-speed networking Communications Security

Summary Introduction Algorithms for SAT –Splitting and Resolution –Local Search –Integer Programming Method –Global Optimization SAT Solvers Features Final Thoughts

2005 Industrial GoldSilverBronze SAT and UNSATSatELiteGTIMiniSAT 1.13 zChaff_rand and HaifaSAT SATSatELiteGTIMiniSAT 1.13 Jerusat 1.31 B and HaifaSAT UNSATSatELiteGTIZchaff_randHaifaSat 2005 Handmake GoldSilverBronze SAT and UNSATVallstSatELiteGTIMarch_dl SATVallstMarch_dlHsat1 UNSATSatELiteGTIMiniSAT 1.13 Vallst and March-dl 2005 Random GoldSilverBronze SAT and UNSATkcnf-2004March_dlDew_Satz1a SATranovg2wsatVW UNSATkcnf-2004March_dlDew_Satz1a

2004 IndustrialhandmadeRandom ALL (SAT+UNSAT) Zchaff 2004March-eqAdaptNovelty SATJerusatSatzooAdaptNovelty UNSATZchaff 2004March-eqKcnfs 2003 IndustrialhandmadeRandom Complete on allForkliftSatzooKcnfs ALL on SATForkliftSatzooUnitwalk 2002 IndustrialhandmadeRandom Complete on allzChaff OKSolver ALL on SATLimmatBerkminOKSolver

A few names SatELite: CNF minimizer (+MiniSAT) MiniSAT: the SAT solver properly Authors: Niklas Eén and Niklas Sörensson Vallst by Daniel Vallstrom Kcnfs: is a generalization of cnfs. Olivier Dubois and Gilles Dequen Ranov by by L&C Researcher Anbulagan and Nghia Duc Pham Zchaff: Boolean Satisfiability Research Group at Princeton University

Some last ideas Produce each solution => exponential in the worst case (whether or not P=NP) –List an exponential number of solutions –Solutions in compressed form Cylinders of solutions: variables not listed could have any value. BDD: Binary Decision Diagrams SAT solvers can be faster than other non- NP systems under some circumstances.

Bibliography Algorithms for the Satisfiability (SAT) Problem: A Survey. Jun Gu, Paul W. Purdom, John Franco, Benjamin W. Wah SAT 2004: SAT 2005: SAT 2006: 06/SAT.htmlhttp:// 06/SAT.html