Propositional SAT The search for a model of a given proposition
Propositional Logic ATOM: set of propositional atoms P,Q,... Boolean operators: ¬, or, and etc. Most used: clauses, see Def Literal: atom or negated atom Clause, examples: c = {P, ¬Q,¬R}, d = {A} Notation: c\Q = {P,¬R}, d\A = {} etc. Clause set C
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
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)
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
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.
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
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!