Presentation is loading. Please wait.

Presentation is loading. Please wait.

Propositional SAT The search for a model of a given proposition.

Similar presentations


Presentation on theme: "Propositional SAT The search for a model of a given proposition."— Presentation transcript:

1 Propositional SAT The search for a model of a given proposition

2 Propositional Logic ATOM: set of propositional atoms P,Q,... Boolean operators: ¬, or, and etc. Most used: clauses, see Def. 2.7.1 Literal: atom or negated atom Clause, examples: c = {P, ¬Q,¬R}, d = {A} Notation: c\Q = {P,¬R}, d\A = {} etc. Clause set C

3 Idea: a partial interpretation can make a clause set false Partial mapping I: ATOM - - -> {0,1} I(¬p) = I(p) provided I(p) is defined I({L 1,…,L k }) = 1 if some I(L i ) = 1, = 0 if all I(L i ) = 0, undefined otherwise I(C) = 1 if I(c) = 1 for all c in C = 0 if I(c) = 0 for some c in C undefined otherwise

4 Extending partial interpretations I2 extends I1 if I2(p) = I1(p) for all p in ATOM such that I1(p) is defined Extensions preserves truth and falsity of clauses (but not undefinedness, of course!) For all p in ATOM and clause sets C, partial interpretation I can be extended to a model of C iff either I[p:=0] or I[p:=1] can be extended to a model of C (maybe both)

5 Naive algorithm, example Clause set (unsatisfiable): {P 1,Q 1, A}, {¬P 1,Q 1 }, {P 1, ¬Q 1 }, {¬P 1, ¬Q 1 }, {P 2,Q 2, ¬A}, {¬P 2,Q 2 }, {P 2, ¬Q 2 }, {¬P 2, ¬Q 2 } Atom order (arbitrary): P 1,Q 1, A, P 2,Q 2 Development on the blackboard

6 Relevance analysis If an atom is not used, you don’t have to consider an alternative truth value for it Trivial example: clauses {P},{Q},{¬Q}, developed on the blackboard Let C be a clause set not containing p. If I[p:=0] can’t be extended to a model of C, then neither I[p:=1] can.

7 Forward reasoning: one literal rule If I(c\p) = 0 for some p occurring in c, then there is at most one extension of I which is a model of c (and we know its value for p!) Combined with relevancy analysis: c as above is a parent clause of p wrt I Development of the running example on the blackboard

8 Clause learning It is a waste to throw away all the knowled- ge obtained by the forward reasoning. This knowledge can elegantly be recovered for future use (beware: this can also slow down the algorithm). In the running example, {P 2, ¬Q 2 } led to a contradiction with P 2 = 0 and Q 2 inferred by {P 2,Q 2, ¬A}: learn {P 2, ¬A} by resolution!

9


Download ppt "Propositional SAT The search for a model of a given proposition."

Similar presentations


Ads by Google