Presentation is loading. Please wait.

Presentation is loading. Please wait.

Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.

Similar presentations


Presentation on theme: "Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002."— Presentation transcript:

1 Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002

2 SAT: Outline Definitions Solving SAT Testing SAT Attempted Contribution Conclusions

3 SAT: The Propositional Satisfiability Problem Given: , a predicate in CNF, e.g.,  = ( a 1  a 2 )  ( a 2  ¬ a 3 )  ( a 1  ¬ a 2  a 3 ) Question: does a model of  exist ?

4 SAT: Definitions Variable: a i Literal: = a i or ¬ a i Clause: ( i  j ...  n )  = ( a 1  a 2 )  ( a 2  ¬ a 3 )  ( a 1  ¬ a 2  a 3 )

5 SAT: Outline Definitions Solving SAT Testing SAT Attempted Contribution Conclusions

6 SAT: Solution methods Systematic search: –SATO [Zhang, 1993] –Satz [Li and Ambulagan, 1997] –Chaff [Moskewicz, et al., 2001] Stochastic search: –GSAT [Selman et al., 1992] –walkSAT[Selman et al., 1996]

7 SAT: Systematic Search I Davis-Putnam procedure  Satz, Sato, Chaff Splitting and unit propagation  = a i   and  = ¬ a i  

8 SAT: Systematic Search II Splitting and unit propagation:  = a 2  ( a 1  a 2 )  ( a 2  ¬ a 3 )  ( a 1  ¬ a 2  a 3 )  unit_propagate(  )  ( a 1  a 3 ) ( a 1  a 2 ), ( a 2  ¬ a 3 ) subsumed by a 2 ( a 1  ¬ a 2  a 3 )  ( a 1  a 3 )

9 SAT: Systematic Search III SATO:Splitting heuristics Heuristics and Hacks Satz:More Splitting heuristics Chaff:Squeaky clean implementation

10 SAT: Stochastic Search Selection Heuristics: mechanisms for variable selection Random restart: –Restart –Move –Walk

11 SAT: Stochastic Search - GSAT procedure GSAT 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 p = variable s.t. flip(p) maximizes satisfied clauses T = T after flip(p) end for return “fail” end

12 SAT: Stochastic Search - WalkSAT procedure WalkSAT begin T = a randomly generated truth assignment for i = 1 to MAX-TRIES if T satisfies  then return T k = random unsatisfied clause p = variable in k s.t. flip(p) maximizes satisfied clauses if flip(p) does not unsatisfy any clause then T = T after flip(p) else j = a random number in [0,1] if j > 0.5 then flip(p) else T = T after flip(q), where q is a random variable in k end for end

13 SAT: Outline Definitions Solving SAT Testing SAT Attempted Contribution Conclusions

14 SAT: Algorithm Verification Benchmark problems – planning, verification –International Competition and Symposium on Satisfiability Testing –SAT2002 Competetion Random problems –naïve random generation –‘structured’ random problems, QCP [Selman and Gomes, 1997] –QWH, [Achlioptas et al., 2000]

15 SAT: Random Generation - Naïve Generate n clauses with 1.. l variables per clause drawn from a pool of k variables. Does not guarantee satisfiability Requires filtering of instances by slower, systematic means

16 Digression I: Latin Square Latin Square: a configuration of n symbols in n columns and n rows s.t. each symbol occurs exactly once in each row and each column. Rhetorical Question: “If we had a table that was only partially filled, can we make it a Latin Square?” This turns out to be an NP-complete problem

17 SAT: Random Generation – QCP Quasigroup completion problem –Fill some percentage of squares in an n  n matrix and try to complete the quasigroup (latin square). –Does offer a structured random problem –Doesn’t guarantee a solution

18 SAT: Random Generation – QWH I Quasigroup with Holes –Start with a randomly generated completed latin square, then poke random holes in it. –Does offer a structured problem –Does have at least one solution

19 SAT: Random Generation – QWH II Improvement: balanced QWH –Instead of random holes, specify a set number for each row and column  But how do we make a random latin square?

20 Digression II: Random Latin Squares Jacobsen and Matthews (1996) identify a set of moves that translate an order n Latin Square into a new Latin square, and prove that these moves connect the space of all order n Latin Squares.  Iterated random application of these moves allows us to randomly select new squares.

21 Digression III: Encoding the Square I Exactly one symbol per cell ( a ij  b ij ...  n ij )  ( ¬a ij  ¬b ij )  ( ¬a ij  ¬c ij ) ...  ( ¬m ij  ¬n ij ) Exactly one occurrence of s in row r ( s r1  s r2 ...  s rn )  ( ¬s r1  ¬s r2 )  ( ¬s r1  ¬s r3 ) ...  ( ¬s rn-1  ¬s rn ) Exactly one occurrence of s in column c ( s 1c  s 2c ...  s nc )  ( ¬s 1c  ¬s 2c )  ( ¬s 1c  ¬s 3c ) ...  ( ¬s n-1c  ¬s nc )

22 Digression III: Encoding the Square II Conjoin the appropriate positive literal for each preassigned cell How much space does this cost us? n 3 variables 1.5n 4 - 1.5n 3 + 3n 2 clauses

23 SAT: Outline Definitions Solving SAT Testing SAT Attempted Contribution Conclusions

24 SAT: Return to Stochastic Search Premise: WalkSAT uses a random start –What if we can derive us a heuristic that can give us a better start frequently? –Systematic MoM’s heuristic: Most occurrences in clauses of minimum length. –Another rhetorical question: “Can we adapt this to stochastic search?”

25 SAT: ANP heuristic I Given:  = ( a 1  a 2 )  ( a 2  ¬a 3 )  ( a 1  ¬a 2  a 3 ) What is the P( a i =  |  )? -The only way to evaluate this is by finding all models. -Is P( a i =  |  ) approximable?

26 SAT: ANP heuristic II Given k = ( a 2  ¬a 3 ), we define P( a i =  | k j ). –P( a 2 = True | k ) = 0.67, since a 2 is true in 2 models of k –P( a 2 = True | k ) = 0.33, since a 2 is true in 1 models of k Approximate P( a i =  |  )   j P( a i =  | k j ) Normalize P( a i =  |  ) + P( a i = ¬  |  ) = 1

27 SAT: ANP heuristic III  = ( a 1  a 2 )  ( a 2  ¬a 3 )  ( a 1  ¬a 2  a 3 ) P( a 1 = True |  )  0.73, P( a 1 = False |  )  0.27 P( a 2 = True |  )  0.75, P( a 2 = False |  )  0.25 P( a 3 = True |  )  0.40, P( a 3 = False |  )  0.60

28 SAT: ANP heuristic IV ANP heuristic: choose the initial assignment with maximum approximate normalized probability   a 1 = True, a 2 = True, and a 3 = False This assignment is in fact a model of 

29 SAT: Experiment design Four benchmark problems from the 1996 International Competition and Symposium on Satisfiability Testing - hardware verification Three order 15 balanced QWH problems –3, 4, 5 holes per row, column WalkSat solver

30 SAT: Results 100 trial runs per problem 3 Initial Assignment types - ANP - Random - Default (all False ) We didn’t do so well

31 SAT: Conclusions Based on our initial experiments, stochastic solvers are harmed by heuristics. Quasigroup-based problems are likely to be the exception; most variables are false in a model. More tests are needed; possible domain dependence

32 SAT: Outline Definitions Solving SAT Testing SAT Attempted Contribution Conclusions

33 Questions, Comments, Insults? www.animatedengineering.com/ animal_pages/duck.htm


Download ppt "Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002."

Similar presentations


Ads by Google