Presentation is loading. Please wait.

Presentation is loading. Please wait.

Finding Models for Blocked 3-SAT Problems in Linear Time by Systematical Refinement of a Sub- Model Gábor Kusper Eszterházy Károly.

Similar presentations


Presentation on theme: "Finding Models for Blocked 3-SAT Problems in Linear Time by Systematical Refinement of a Sub- Model Gábor Kusper Eszterházy Károly."— Presentation transcript:

1 Finding Models for Blocked 3-SAT Problems in Linear Time by Systematical Refinement of a Sub- Model Gábor Kusper gkusper@aries.ektf.hu Eszterházy Károly College Hungary, Eger

2 2 Outline Motivation Introduction Connection to other Research My Contribution Conclusion

3 3 Motivation Member of the Theorema Research Group. Theorema (www.theorema.org) is a mathematical assistant (including theorem proving), which is developed under the direction of Prof. Bruno Buchberger at Johannes Kepler University Linz. SAT is propositional proving by refutation: Given a set of known sentences K (Knowledge base), then a sentence G (Goal) can be proven if and only if K  {  G} is unsatisfiable.

4 4 Introduction The Propositional Satisfiability problem is the problem of determining, for a formula of the propositional calculus, if there is an assignment of truth values to its variables for which that formula evaluates to True. SAT is the problem of propositional satisfiability for formulae in conjunctive normal form (CNF).

5 5 Conjunctive Normal Form (CNF) ( a  c )  ( b  c )  (¬a  ¬b  ¬c ) { { a,  c }, { b,  c }, {¬a  ¬b, ¬c } } + x + x + + - - -

6 6 SAT is NP-complete [Cook 1971] thus, there is no known polynomial time algorithm for solving it. Because of the importance of SAT in logic, artificial intelligence, and operational research, considerable effort has been spent to determine how to cope with this problem. Two approaches are: –develop SAT solver algorithms which usually present a result in polynomial time; –identify special classes of SAT that can be solved or simplified in polynomial time. My talk is concerned with the second approach.

7 7 Connection to other Research blocked clause [Kullmann 1999a, 1999b] Loveland's Davis and Putnam Procedure (DPLL) [Davis, Logemann, Loveland 1962]

8 8 The Notion of Blocked Clause A clause of the form (c  C’) is blocked in a formula iff: for any other clause in the formula of the form (  c  B’), the resolvent (C’  B’) is a tautology. A blocked clause can be added or deleted from a clause set without changing its satisfiability. Example: + + x x - - + x + - - x x + + Literal c is blocked in clause C and clause set S: Blck(c,C,S)

9 9 My Contribution Notion of Sub-Model Notion of Blocked SAT Problem Blocked SAT Solver algorithm Number of Literal Combinations (NLC) data structure

10 10 Sub-Model resolution-mate: rm(C, c) := C \ { c }  {  c }. sub-model: sm(C, c) :=  rm(C, c). sub-model: “negate all but the generator literal”. A sub-model is a partial assignment. A sub-model is a candidate to be a part of a model. + + + x + + - x + + x x - - + x C sm(C,c) rm(C,c) c resolvent

11 11 The Blocked SAT Problem A clause set is blocked iff each of its clauses are blocked. Blck(S) :    Blck(c,C,S). C  Sc  C - + x x x + + x x - - x x x - + --xx x x + x x x - + The Problem: A blocked clause set does not remain necessarily blocked after sub-model propagation. Solution: Systematic refinement of an increasing sub-model.

12 12 Examples - + x x x + + x x - - x x x - + + + x x + + - - x x - - + + - + - + + - - - + + - + - - - +

13 13 Significance of Blocked SAT An input clause set is very-very rarely blocked. But during the work of a general SAT solver algorithm we may encounter a blocked clause set. Any general SAT solver uses some simplification steps: –resolution, unit-propagation, removing subsumed clauses, etc. The fewer clauses are in a clause set the more likely that it is blocked.

14 14 Significance of Blocked SAT SATLIB – Benchmark Problems http://www.intellektik.informatik.tu- darmstadt.de/SATLIB/benchm.html All instances provided here are cnf formulae encoded in DIMACS cnf format. Test result on uf20-91 (all satisfiable, 20 variables, 91 clauses - 1000 instances) using DPLL and Moms heuristics: In average after the 90% of the unit-propagations we have a blocked clause set.

15 15 The Blocked SAT Solver Algorithm If the literal c is blocked in C, S then the sub-model sm(C, c) satisfies each clause from S which contains either c or  c. No-occurrence clauses are those not satisfied by sm(C, c). Systematic refinement of an increasing sub-model: - + x x x + + x x - - x x x - + - - x x no-occurrence clause - + - x increasing sub-model: a blocked clause set: generator clause: - + x x - + + x C1C1 C2C2

16 16 BlockedSATSolver(S, Z) input: clause set S that is non-empty and blocked output: assignment Z, a model for S. A := { }; B := { }; // A: gen. clause, B: gen. literals for each clause C in S do if (A   C = { }) then // C is a no-occurrence clause A:=A  C; // we refine A if (B  C = { }) then Let c in C be a blocked literal in C, S; B := B  { c }; // we refine B fi od Z := sm(A, B);

17 17 NLC data structure The Number of Literal Combinations (NLC) data structure is needed to speed up the search for blocked literals. We create NLC by reading each clause only once. For every subset of every clause we increase the corresponding counter in NLC by one. For example in case of {a, b, c} we increase: NLC[a], NLC[b], NLC[c], NLC[a, b], NLC[a, c], NLC[b, c], NLC[a, b, c].

18 18 NLC data structure Afterwards we read again the clause set and for every literal in every clause we calculate the number of possible resolution partners minus the number of blocking clauses. In case of literal a in clause {a, b, c} this number is: NLC[  a] – NLC[  a,  b] – NLC[  a,  c] + NLC[  a,  b,  c] If this number is zero then this literal is blocked. NLC[  a] is the number of possible resolution partners. NLC[  a,  b] + NLC[  a,  c] is the number of blocking clauses, but in this case we count two times clauses which contain {  a,  b,  c} as subset, therefore, we subtract NLC[  a,  b,  c].

19 19 Examples a b c + + - + - + + - - - + + - + - - - + a  a b  b c  c 3 3 3 3 3 3 a  a b  b c  c a 0 0 1 2 1 2  a 0 0 2 1 2 1 b 0 0 0 0 1 2  b 0 0 0 0 2 1 c 0 0 0 0 0 0  c 0 0 0 0 0 0 NLC 1D: 2D: 3D: a … 0 1 0 … 0 1 0 0 … 0 1 0 …  a … 0 1 0 … 0 0 1 0 … 0 1 0 … bcbc

20 20 NLC data structure In case of 3-SAT (the SAT instance where each clause has 3 literal at most) we need O(7m) time to create, and O(4nm) time in the worst case to check whether the clause set is blocked is blocked. But we need O(8n 3 ) memory space to store NLC. Fortunately it contains lots of zeros, therefore, using a suitable hash O(4nm) memory space is enough to store NLC.

21 21 Conclusion Blocked SAT Solver is linear if we have blocked literal information. Polynomial time is needed to collect that information. In case of 3-SAT we can collect that information in linear time by using the NLC data structure. Hence, the Blocked 3-SAT Problem is linear!

22 22 Future Work Blocked SAT Solver can solve not only blocked clause set, but also those where at least one clause is blocked from the no-occurrence clauses. How could we check this property fast? NLC can support other techniques? How to combine NLC by lazy unit propagation?

23 Thank you for your attention! Download: http://aries.ektf.hu/~gkusper/ki06.ppt


Download ppt "Finding Models for Blocked 3-SAT Problems in Linear Time by Systematical Refinement of a Sub- Model Gábor Kusper Eszterházy Károly."

Similar presentations


Ads by Google