08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.

Slides:



Advertisements
Similar presentations
Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
Advertisements

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.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Max Cut Problem Daniel Natapov.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Generating Hard Satisfiability Problems1 Bart Selman, David Mitchell, Hector J. Levesque Presented by Xiaoxin Yin.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
Algorithms and Problems for Quantified SAT Toby Walsh Department of Computer Science University of York England Ian P. Gent School of Computer Science.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.
In Search of a Phase Transition in the AC-Matching Problem Phokion G. Kolaitis Thomas Raffill Computer Science Department UC Santa Cruz.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
The Theory of NP-Completeness
Phase Transitions of PP-Complete Satisfiability Problems D. Bailey, V. Dalmau, Ph.G. Kolaitis Computer Science Department UC Santa Cruz.
Methods of Proof Chapter 7, second half.
Analysis of Algorithms CS 477/677
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Instance Hardness and Phase Transitions.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
1 Abstraction Refinement for Bounded Model Checking Anubhav Gupta, CMU Ofer Strichman, Technion Highly Jet Lagged.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
1 Paul Beame University of Washington Phase Transitions in Proof Complexity and Satisfiability Search Dimitris Achlioptas Michael Molloy Microsoft Research.
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)
Logic - Part 2 CSE 573. © Daniel S. Weld 2 Reading Already assigned R&N ch 5, 7, 8, 11 thru 11.2 For next time R&N 9.1, 9.2, 11.4 [optional 11.5]
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
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.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Boolean Satisfiability and SAT Solvers
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
First-Order Logic and Inductive Logic Programming.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2009.
/425 Declarative Methods - J. Eisner 1 Random 3-SAT  sample uniformly from space of all possible 3- clauses  n variables, l clauses Which are.
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.
Review of Propositional Logic Syntax
Balance and Filtering in Structured Satisfiability Problems Henry Kautz University of Washington joint work with Yongshao Ruan (UW), Dimitris Achlioptas.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Where are the hard problems?. Remember Graph Colouring? Remember 3Col?
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Where are the hard problems?
Inference in Propositional Logic (and Intro to SAT)
NP-Completeness Yin Tat Lee
NP-Completeness Yin Tat Lee
Methods of Proof Chapter 7, second half.
The Theory of NP-Completeness
Presentation transcript:

08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel

08/2 Contents  Motivation  Davis-Putnam Procedure  “Average” complexity of the satisfiability problem  GSAT: Greedy SAT Procedure

08/3 Motivation  Usually:  Given: A logical theory (set of propositions)  Question: Does a proposition logically follow from this theory?  Reduction to unsatisfiability, which is coNP-complete (complementary to NP problems)  Sometimes:  Given: A logical theory  Wanted: Model of the theory.  Example: Configurations that fulfill the constraints given in the theory.  Can be “easier” because it is enough to find one model

08/4 The Davis-Putnam Procedure DP Function Given a set of clauses  defined over a set of variables , return “satisfiable” if  is satisfiable. Otherwise return “unsatisfiable”. 1.If return “satisfiable” 2.If return “unsatisfiable” 3.Unit-propagation Rule: If  contains a unit-clause C, assign a truth-value to the variable in C that satisfies C, simplify  to ’ and return DP(’). 4.Splitting Rule: Select from  a variable v which has not been assigned a truth-value. Assign one truth value t to it, simplify  to ’ and call DP(’) a.If the call returns “satisfiable”, then return “satisfiable” b.Otherwise assign the other truth-value to v in , simplify to ’’ and return DP(’’).

08/5 Example (1)

08/6 Example (2)

08/7 Properties of DP  DP is complete, correct, and guaranteed to terminate.  DP constructs a model, if one exists.  In general, DP requires exponential time (splitting rule!)  DP is polynomial on horn clauses, i.e., clauses with at most one positive literal. Heuristics are needed to determine which variable should be instantiated next and which value should be used In all SAT competitions so far, DP-based procedures have shown the best performance.

08/8 DP on Horn Clauses (1) Note: 1.The simplifications in DP on Horn clauses always generate Horn clauses. 2.A set of Horn clauses without unit clauses is satisfiable –All clauses have at least one negative literal –Assign false to all variables 3.If the first sequence of applications of the unit propagation rule in DP does not lead to the empty clause, a set of Horn clauses without unit clauses is generated (which is satisfiable according to (2))

08/9 DP on Horn Clauses (2) 4.Although a set of Horn clauses without a unit clause is satisfiable, DP may not immediately recognize it. a.If DP assigns false to a variable, this cannot lead to an unsatisfiable set and after a sequence of unit propagations we are in the same situation as in 4. b.If DP assigns true, then we may get an empty clause - perhaps after unit propagation (and have to backtrack) - or the set is still satisfiable and we are in the same situation as in 4.

08/10 DP on Horn Clauses (3) In summary: 1.DP executes a sequence of unit propagation steps resulting in  an empty clause or  a set of Horn clauses without a unit clause, which is satisfiable 2.In the latter case, DP proceeds by choosing for one variable:  false, which does not change the satisfiability  true, which either –leads to an immediate contradiction (after unit propagation) and backtracking or –does not change satisfiabilty  Run time is polynomial in the number of variables

08/11 How Good is DP in the Average Case?  We know that SAT is NP-complete, i.e., in the worst case, it takes exponential time.  This is clearly also true for the DP-procedure. Couldn’t we do better in the average case?  For CNF-formulae in which the probability for a positive appearance, negative appearance and non-appearance in a clause is 1/3, DP needs on average quadratic time (Goldberg 79)! The probability that these formulae are satisfiable is, however, very high.

08/12 Phase Transitions … Conversely, we can, of course, try to identify hard to solve problem instances. Cheeseman et al. (IJCAI-91) came up with the following plausible conjecture: All NP-complete problems have at least one order parameter and the hard to solve problems are around a critical value of this order parameter. This critical value (a phase transition) separates one region from another, such as over-constrained and under-constrained regions of the problem space. Confirmation for graph coloring and Hamilton path … later also for other NP-complete problems.

08/13 Phase Transitions with 3-SAT Constant clause length model (Mitchell et al., AAAI-92): Clause length k is given. Choose variables for every clause k and use the complement with probability 0.5 for each variable. Phase transition for 3-SAT with a clause/variable ratio of approx. 4.3:

08/14 Empirical Difficulty The Davis-Putnam (DP) Procedure shows extreme runtime peaks at the phase transition: Note: Hard instances can exist even in the regions of the more easily satisfiable/unsatisfiable instances!

08/15 Notes on the Phase Transition  When the probability of a solution is close to 1 (under-constrained), there are many solutions, and the first search path of a backtracking search is usually successful.  If the probability of a solution is close to 0 (over- constrained), this fact can usually be determined early in the search.  In the phase transition stage, there are many near successes (“close, but no cigar”). (limited) possibility of predicting the difficulty of finding a solution based on the parameters. (search intensive) benchmark problems are located in the phase region (but they have a special structure)

08/16 Local Search Methods for Solving Logical Problems In many cases, we are interested in finding a satisfying assignment of variables (example CSP), and we can sacrifice completeness if we can “solve” much large instances this way. Standard process for optimization problems: Local Search  Based on a (random) configuration  Through local modifications, we hope to produce better configurations Main problem: local maxima

08/17 Dealing with Local Maxima As a measure of the value of a configuration in a logical problem, we could use the number of satisfied constraints/clauses. But local search seems inappropriate, considering we want to find a global maximum (all constraints/clauses satisfied). By restarting and/or injecting noise, we can often escape local maxima. Actually: Local search performs very well for finding satisfying assignments of CNF formulae (even without injecting noise).

08/18 GSAT Procedure GSAT INPUT: a set of clauses , MAX-FLIPS, and MAX-TRIES OUTPUT: a satisfying truth assignment of , if found begin for i:=1 to MAX-TRIES T := a randomly-generated truth assignment for j:=1 to MAX-FLIPS if T satisfies then return T v := a propositional variable such that a change in its truth assignment gives the largest increase in the number of clauses of that are satisfied by T. T:=T with the truth assignment of v reversed end for end for return “no satisfying assignment found” end

08/19 The Search Behavior of GSAT  In contrast to normal local search methods, we must also allow sideways movements!  Most time is spent searching on plateaus.

08/20 State of the Art  SAT competitions since beginning of the ´90  Current SAT competitions ( In 2003:  Largest solved instances: 100,000 variables / 1,000,000 clauses  Smallest unsolved instances: 200 variables/ 1,000 clauses  Complete solvers are as good as randomized ones!

08/21 Concluding Remarks  DP-based SAT solver prevail:  Very efficient implementation techniques  Good branching heuristics  Clause learning  Incomplete randomized SAT-solvers  are good (in particular on random instances)  but there is no dramatic increase in size of what they can solve  parameters are difficult to adjust