Algorithms and Problems for Quantified SAT Toby Walsh Department of Computer Science University of York England Ian P. Gent School of Computer Science.

Slides:



Advertisements
Similar presentations
Exploiting SAT solvers in unbounded model checking
Advertisements

Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
10/7/2014 Constrainedness of Search Toby Walsh NICTA and UNSW
Time-Space Tradeoffs in Resolution: Superpolynomial Lower Bounds for Superlinear Space Chris Beck Princeton University Joint work with Paul Beame & Russell.
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:
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
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 
Phase Transitions of PP-Complete Satisfiability Problems D. Bailey, V. Dalmau, Ph.G. Kolaitis Computer Science Department UC Santa Cruz.
Willis Lemasters Grant Conklin. Searching a tree recursively one branch at a time, abandoning any branch which does not satisfy the search constraints.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
1 Quantified Formulas Acknowledgement: QBF slides borrowed from S. Malik.
Phase Transitions of PP-Complete Satisfiability Problems D. Bailey, V. Dalmau, Ph.G. Kolaitis Computer Science Department UC Santa Cruz.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
State-of-the-art in SAT solvers
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
SAT Algorithms in EDA Applications Mukul R. Prasad Dept. of Electrical Engineering & Computer Sciences University of California-Berkeley EE219B Seminar.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
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.
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]
Fixed Parameter Complexity Algorithms and Networks.
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.
1 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Constrainedness Including slides from Toby Walsh.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
On a random walk strategy for the Q2SAT problem K. Subramani.
Space Complexity. Reminder: P, NP classes P NP is the class of problems for which: –Guessing phase: A polynomial time algorithm generates a plausible.
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.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
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.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Space Complexity. Reminder: P, NP classes P is the class of problems that can be solved with algorithms that runs in polynomial time NP is the class of.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
A Decision-Making Procedure for Resolution-Based SAT-solvers Eugene Goldberg Cadence Research Labs (USA) SAT-2008, Guangzhou, P.R. China.
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.
1 P NP P^#P PSPACE NP-complete: SAT, propositional reasoning, scheduling, graph coloring, puzzles, … PSPACE-complete: QBF, planning, chess (bounded), …
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
Where are the hard problems?
Inference in Propositional Logic (and Intro to SAT)
Inference and search for the propositional satisfiability problem
First-Order Logic and Inductive Logic Programming
Propositional Calculus: Boolean Algebra and Simplification
Logics for Data and Knowledge Representation
Artificial Intelligence
Constraint satisfaction problems
Constraint satisfaction problems
Presentation transcript:

Algorithms and Problems for Quantified SAT Toby Walsh Department of Computer Science University of York England Ian P. Gent School of Computer Science University of St Andrews Scotland

Algorithms and Problems for Quantified SAT 1. Quantified Satisfiability QSAT 2. The Evaluate Algorithm 3. A New Algorithm 4. Phase Transitions 5. Phase Transition in QSAT

Quantified satisfiability (QSAT)  Existential quantifiers  as in propositional SAT  Universal quantifiers   x.  y. (x v y) & (-x v -y)  x=true, then y=false satisfies  x=false, then y=true satisfies  also called quantified Boolean formulae (QBF) QSAT can be seen as an alternating game between existentials which want to make formula true, and universals which want to make it false

Complexity of QSAT  PSPACE-complete  no limit on number of alternating quantifiers  problems needing polynomial space on a Turing machine  k-QSAT  k alternations,  innermost   k P-complete  CNF formulae  does not change complexity

Algorithms for QSAT  Recent Algorithms by...  Cadoli, Giovanardi & Schaerf, AAAI 98, SAT  simple to avoid  Both based on similar idea  Work `outside in'  Set outermost quantifiers first, then next level...  Both make extensive use of propagation rules  I will present a simplified version of Cadoli's

Cadoli et al's Evaluate algorithm  Two mutually recursive functions  U-evaluate for universal quantifiers  E-evaluate for existential quantifier  Many propagation rules in each  e.g. `unit propagation'  If a clause exists with only a single existential literal ... commit to the E-variable having the relevant value  I will not detail propagation rules  Focus on branching nature of search... ... and an unusual preprocessing step

An unusual preprocessing step  Given a QSAT formula F  Form existential simplification E(F)  Discard universal literals in F  Solve E(F) as SAT problem (not as QSAT)  Use classic Davis-Putnam  If DP succeeds, F is soluble as QSAT  Same values of e-variables works for all values of u- variables

Function U-Evaluate(F)  If clause set is empty, succeed  If there is empty/all universal clause, fail  Try Davis-Putnam on Existential Simplification  If this solves all clauses, succeed  Apply Propagation rules  If the outermost quantifier is now Existential  Return result of E-evaluate(F)  Choose a U-variable u  Fail if U-Evaluate(F u:=true) fails  Else return result of U-Evaluate(F u:=false)

Function E-Evaluate(F)  If clause set is empty, succeed  If there is empty/all universal clause, fail  Try Davis-Putnam on Existential Simplification  If this solves all clauses, succeed  Apply Propagation rules  If the outermost quantifier is now Universal  Return result of U-evaluate(F)  Choose a E-variable e  Succeed if E-Evaluate(F e:=true) succeeds  Else return result of E-Evaluate(F e:=false)

Thoughts about theAlgorithms  Both Rintanen/Cadoli algorithms successful  Cadoli et al on Random Problems  Rintanen on `Conditional Planning' Problems  Blind search successful  especially notable in U-evaluate  simple enumeration of possibilities  SAT preprocessing successful  yet work often discarded  New algorithm should:  avoid blind search/avoid discarding SAT work

Failure Driven Search  Any partial solution (e.g. from DP) is helpful... ... as long as it solves all clauses without universals  The existential assignment solves many clauses  applies to all universal assignments...  except those invalidating universals in unsat clauses  Future tests need only solve remaining cases  Failure-driven rather than blind search  Exploits work done by failed calls to DP

No-commitment Search  We can try hard to avoid guessing universals  Set them as unknown initially  Treat all literals as false if value = unknown  Attempt to solve without choosing value  Only forced to choose a value on backtracking  for universal values not solved by existentials

Hard and Soft Clauses  Soft Clauses  clauses that can be left unsolved on this attempt  have some free universal variables  e.g. U or V or W or E  if we set E = false, have solution when U/V/W true  next test we set U=V=W=false and force new solution  Hard Clauses  clauses that must be solved for problem to be soluble  i.e. No universal variables, e.g. E

Revised E-evaluate  Takes hard and soft clauses as input  Fails if hard clauses alone are insoluble  Succeeds if hard clauses are soluble  solves as many soft clauses as possible  can use heuristic method on soft clauses  returns list of unsatisfied soft clauses  Calls U-evaluate recursively for hard clauses

Revised U-evaluate([F])  Uses ToDo list of subproblems  Initially ToDo = [ F ]  Succeed when ToDo empty  Removes element G of ToDo list  Call E-evaluate(G)  fail if E-evaluate fails  if E-evaluate succeeds...  for each unsat soft clause returned  assign universals so as to unsatisfy the soft clause  add the resulting simplified problem to ToDo  Return result of U-evaluate on revised ToDo list

Comments  Where did DP go?  DP call evaporates!  First step in U-evaluate is to call E-evaluate  We are always reasoning on existentials first  DP could be used as heuristic on soft clauses  As could WalkSAT... Where is unknown value set?  Unknown value is set implicitly  when U-evaluate calls E-evaluate without setting universal

Conclusions (Algorithms)  Recent algorithms making QSAT feasible  Existing algorithms have possible drawbacks  blind search  wasted work  Can remove these drawbacks  Exercises for the interested author...  Correctness proof (except 2-QSAT)  Implementation  Empirical Evaluation

Phase transition behaviour  Seen in many NP- hard problems  SAT, CSP, number partitioning, TSP...  seminal IJCAI-91 paper by Cheeseman, Kanefsky & Taylor  rapid solubility transition  around  1

Phase transition behaviour  Complexity peak  associated with solubility transition  easy-hard-easy  problems on "knife- edge"  a theory of constrainedness  models such behaviour   = 1-log( )/n  

Other complexity classes  Polynomial problems  enforcing arc- consistency in CSPs [CP-97]  worst-case complexity seen at phase boundary   useful to predict location of transition  What about higher complexity classes?

QSAT phase transition  Fixed clause length model  k alternating quantifiers  each with n variables  l clauses each with h literals  Cadoli et al (AI*IA97, AAAI98)  not always an easy-hard-easy pattern  solubility transition at l  n

Flawed problem generation!  Propositional satisfiability  may generate unit clauses, x and -x  just as 2 people here are likely to have same birthday  Quantified satisfiability  may generate clause with single existential, x and another with -x  no satisfying assignment  simple argument gives l  n Two fixes: Model A, discard clauses with one or fewer existentials Model B, fix number of existentials in each clause Easy fix: discard unit clauses

QSAT phase transition

 Easy-hard-easy pattern now clearly visible  phase transition around fixed l/n 2-QSAT, 3-cnf

QSAT phase transition  Clear complexity "ridge"  varying l/n, and proportion of universals  larger gap between higher percentiles than in NP?   J. Rintanen

Conclusions (Transitions)  Be careful of "flaws"  SAT, CSP, QSAT...  simple to avoid  QSAT phase transition  similar to that seen in NP  constrainedness,  useful but less accuate  We predict similar results in other PSPACE problems  game playing and planning