Introduction Roadmap ◮ Introduction ◮ Definition of the SAT problem ◮ Benchmark problems for evaluation of SAT algorithms SAT: Algorithms and Applications ◮ Phase transition in random problems ◮ SAT algorithms based on DPLL ◮ Look-ahead enhanced DPLL Anbulagan and Jussi Rintanen ◮ Clause learning enhanced DPLL ◮ Heavy-tailed runtime distributions and restart mechanisms NICTA Ltd and the Australian National University (ANU) ◮ Resolution-based preprocessors to simplify input formula Canberra, Australia ◮ SAT algorithms based on SLS Tutorial presentation at AAAI-07, Vancouver, Canada, July 22, 2007 ◮ SLS based on random walk ◮ SLS based on clause weighting ◮ Hybrid approaches ◮ Boosting SLS using Resolution: empirical results ◮ Boosting DPLL using Resolution: empirical results ◮ Applications of SAT 1 / 165 2 / 165 Introduction Introduction Problems SAT Resources and Challenges Problems – Traffic Management ◮ Benchmark Data ◮ www.satlib.org ◮ SAT Solvers ◮ www.satcompetition.org ◮ Authors website ◮ International SAT Conference (10 th in 2007) ◮ More information about SAT ◮ Register to: www.satlive.org ◮ Challenges ◮ Ten Challenges in Propositional Reasoning and Search [Selman et al. , 1997] ◮ Ten Challenges Redux: Recent Progress in Propositional Reasoning and Search [Kautz & Selman, 2003] 3 / 165 4 / 165
Introduction Problems Introduction Problems Problems – Nurses Rostering Problems – Games Constraint: Many real-world problems can be expressed as a list of constraints. Every number occurs exactly ◮ Sudoku Answer is an assignment to variables that satisfy all the constraints. once in every row, column, or region. Example: ◮ Scheduling nurses to work in shifts at a hospital ◮ Some nurses do not work at night ◮ No one can work more than H hours a week ◮ Some pairs of nurses cannot be on the same shift Constraint: ◮ Is there at least one assignment of nurses to shifts that satisfy all In chess, a queen can move the constraints? ◮ N-Queens horizontally, vertically, or diagonally. 5 / 165 6 / 165 Introduction Problems Introduction Problems A Simple Problem: Student–Courses Binary Tree of Student–Courses Problem A student would like to decide on which subjects he should take for the next session. He has the following requirements: ◮ He would like to take Math or drop Biology ◮ He would like to take Biology or Algorithms ◮ He does not want to take Math and Algorithms together Which subjects the student can take? F = ( X ∨ ¬ Y ) ∧ ( Y ∨ Z ) ∧ ( ¬ X ∨ ¬ Z ) There are 2 possible solutions: ◮ He could take Math and Biology together. (X=1, Y=1, Z=0) ◮ He could only take Algorithms. (X=0, Y=0, Z=1) 7 / 165 8 / 165
Introduction Problems Introduction Problems Practical Applications of SAT Propositional Logic ◮ AI Planning and Scheduling English Standard Boolean Other ◮ Bioinformatics false ⊥ 0 F ◮ Data Cleaning true ⊤ 1 T ◮ Diagnosis not x ¬ x ¯ − x , ∼ x x ◮ Electronic Design Automation and Verification x and y x ∧ y x & y , x.y xy ◮ FPGA Routing x or y x ∨ y x + y x | y , x or y ◮ Games x implies y x ⇒ y x ≤ y x → y , x ⊃ y ◮ Knowledge Discovery x ⇔ y x ≡ y , x ∼ y x iff y x = y ◮ Security: cryptographic key search ◮ Theorem Proving 9 / 165 10 / 165 Introduction Problems Introduction Problems Semantics of Boolean Operators Basic Notation & Definitions ¬ x x ∧ y x ∨ y x ⇒ y x ⇔ y x y variable: can take a value true or false. ⊤ ⊤ ⊥ ⊤ ⊤ ⊤ ⊤ literal: if x is a variable, then x and ¬ x are literals (respectively positive and negative) ⊤ ⊥ ⊥ ⊥ ⊤ ⊥ ⊥ clause: a disjunction l 1 ∨ · · · ∨ l n of literals l 1 , . . . , l n ⊥ ⊤ ⊤ ⊥ ⊤ ⊤ ⊥ formula F : a conjunction c 1 ∧ · · · ∧ c n of clauses c 1 , . . . , c n ⊥ ⊥ ⊤ ⊥ ⊥ ⊤ ⊤ unit clause: a clause consisting of only one literal binary clause: a clause consisting of two literals Note: empty clause: a clause without any literal ◮ x ∨ y = ¬ ( ¬ x ∧ ¬ y ) pure literal: a variable occurring only negatively or only positively ◮ x ⇒ y = ( ¬ x ∨ y ) ◮ x ⇔ y = ( x ⇒ y ) ∧ ( y ⇒ x ) F = ( x 1 ∨ x 2 ∨ x 3 ) ∧ ( x 4 ∨ ¬ x 5 ) ∧ ( ¬ x 2 ∨ x 4 ∨ x 5 ) ∧ ( ¬ x 3 ) 11 / 165 12 / 165
SAT SAT The SAT Decision Problem SAT Problems – Definition Input: A formula F in Conjunctive Normal Form (CNF). SAT Output: F is satisfiable by an assignment of truth values to variables or Let A be a set of propositional variables. Let F be a set of clauses F is unsatisfiable. over A . F ∈ SAT iff there is v : A → { 0 , 1 } such that v | = F . Example of a CNF formula: UNSAT F = { ( x 1 ∨ x 2 ∨ x 3 ) , ( x 4 ∨ ¬ x 5 ) , ( ¬ x 2 ∨ x 4 ∨ x 5 ) } Let A be a set of propositional variables. Let F be a set of clauses over A . F ∈ UNSAT iff v �| = F for all v : A → { 0 , 1 } . A central problem in mathematical logic, AI, and other fields of computer science and engineering. 13 / 165 14 / 165 SAT SAT Complexity Class NP NP-hardness of SAT [Cook, 1971] ◮ NP = decision problems solvable by nondeterministic Turing Machines with a polynomial bound on the number of computation ◮ Cook showed that SAT is NP-complete: the halting problem of any steps. nondeterministic Turing machine with a polynomial time bound ◮ This is roughly: search problems with a search tree (OR tree) of can be reduced to SAT. polynomial depth. ◮ No NP-complete problem is known to have a polynomial time ◮ SAT is in NP because algorithm. 1. a valuation v of A can be guessed in | A | steps, and ◮ Best algorithms have a worst-case exponential runtime. 2. testing v | = F is polynomial time in the size of F . 15 / 165 16 / 165
SAT SAT SAT Benchmark Problems Random Problems An Example ◮ Random problems: c 1 p cnf 64 254 ◮ Used for testing SAT algorithms and NP-completeness. -9 -31 -50 0 ◮ A random 3-SAT problem with ◮ Several models exist: constant probability, fixed clause length 3 -32 -46 0 64 variables and 254 clauses [Mitchell et al. , 1992], -26 -53 64 0 9 11 -27 0 ◮ the fixed clause length model ◮ Syntactic problem parameters determine difficulty. -10 55 -59 0 [Mitchell et al. , 1992]: ◮ Formulas have characteristics quite different from the kind of very -21 -36 -51 0 big formulas coming from practical applications and that can be 39 -48 -53 0 1. Fix a set of n variables 27 -33 37 0 solved by current SAT algorithms. x 1 , . . . , x n . 43 -58 -64 0 ◮ Structured problems: 2. Generate m clauses with 3 -12 21 -59 0 literals: randomly choose a ◮ Structures: symmetries, variable dependencies, clustering 10 -27 -43 0 -15 -31 -62 0 variable and negate with ◮ Generated from real-world application problems 1 -20 28 0 probability 0.5. ◮ Crafted problems -9 -14 -64 0 -5 37 53 0 ◮ Random+Structured problems: -32 -37 49 0 ◮ QWH = quasigroup with holes ..... ◮ bQWH = balanced quasigroup with holes ..... 17 / 165 18 / 165 SAT SAT Structured Problem Structured Problem par8-1 Bounded Model Checking c The instance bmc-ibm-6.cnf, IBM, 1997 c par8-1-res c 6.6 MB data p cnf 350 382 p cnf 51639 368352 -2 3 146 0 -1 7 0 i.e. ((not x 1 ) or x 7 ) 2 3 -146 0 -1 6 0 and ((not x 1 ) or x 6 ) -2 -3 146 0 -1 5 0 and ... etc -2 -3 -146 0 -1 -4 0 -3 4 147 0 -1 3 0 3 4 -147 0 ..... 3 -4 147 0 10224 -10043 0 -3 -4 -147 0 10224 -10044 0 -4 5 0 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 4 -5 0 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 -5 6 0 10031 10032 10033 10034 10035 10036 10037 10086 10087 10088 10089 5 -6 0 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 ..... 10101 10102 10103 10104 10105 10106 10107 10108 10109 10189 -55 -54 ..... -53 52 51 50 10043 10044 -10224 0 // a constraint with 64 literals at line 72054 Visualize using DPvis. 10083 -10157 0 10083 -10227 0 ◮ parXX-Y denotes a parity problem on XX bits. 10083 -10228 0 ◮ The original instance of par8-1 contains 350 variables and 1149 clauses. 10157 10227 10228 -10083 0 ..... 19 / 165 20 / 165
SAT SAT Structured Problem Phase Transition in Random Problems Bounded Model Checking ◮ Also called threshold phenomenon. At the end of the file ◮ r = the ratio of number of clauses and of variables (clause 7 -260 0 density). 1072 1070 0 ◮ As r is increased, probability of being SAT goes abruptly from 1 to -15 -14 -13 -12 -11 -10 0 -15 -14 -13 -12 -11 10 0 0. -15 -14 -13 -12 11 -10 0 ◮ rα = critical value for formula with fixed clause lengths α -15 -14 -13 -12 11 10 0 -7 -6 -5 -4 -3 -2 0 ◮ r 2 = 1; r 3 ≅ 4.258. -7 -6 -5 -4 -3 2 0 -7 -6 -5 -4 3 -2 0 ◮ The critical value divides the space of SAT problems into 3 -7 -6 -5 -4 3 2 0 regions: 185 0 ◮ underconstrained: almost all formulas are satisfiable and easy to Note that: 2 51639 is a very big number !!! solve; ◮ critically constrained: about 50 per cent of the formulas are 2 100 = 1,267,650,000,000,000,000,000,000,000,000 satisfiable and hard to solve; Dew_Satz SAT solver [Anbulagan & Slaney, 2005] solves this instance in 36 seconds. ◮ overconstrained: almost all formulas are unsatisfiable and easy to solve. 21 / 165 22 / 165 SAT SAT Phase Transition Phase Transition and Difficulty Level At n=60:20:160 At n=200 23 / 165 24 / 165
Recommend
More recommend