Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discussion #18 1/13 Discussion #18 Resolution with Propositional Calculus; Prenex Normal Form.

Similar presentations


Presentation on theme: "Discussion #18 1/13 Discussion #18 Resolution with Propositional Calculus; Prenex Normal Form."— Presentation transcript:

1 Discussion #18 1/13 Discussion #18 Resolution with Propositional Calculus; Prenex Normal Form

2 Discussion #18 2/13 Topics Motivation for resolution Resolution Why resolution works Examples Prenex normal form

3 Discussion #18 3/13 Programming a Computer to do Proofs Too much work to program all the possibilities we have considered. We need a better way. 1.Better = more uniform  not so many cases (even though it may sometimes be longer). 2.Better = fewer rules of inference. 3.Better = a heuristic guide to lead us to the conclusion. 4.Better = easier to convert to an algorithm.

4 Discussion #18 4/13 Resolution Resolution answers these “demands:” Uniform: Only disjunctions of literals in every rule Fewer Rules: Only one inference rule Heuristic Guide: Reduce the number of literals with the goal of reaching False Algorithmic: 1.Negate the conclusion and add it as a premise. 2.Convert the premises to CNF (conjunction of disjunction of literals). 3.Write each premise (which is a disjunction of literals) as a line of the proof. 4.Repeatedly apply resolution (the one inference rule) & simplify as needed. 5.Success iff F is reached.

5 Discussion #18 5/13 Resolution Rule This says: In two disjunctive clauses, if we have complementary literals, we can discard them and “OR” the remaining clauses. P  A  P  B A  B literals clauses: A and B will always be disjunctions of literals or just a literal or possibly missing.

6 Discussion #18 6/13 Resolution is Valid F T T T F T T T T T T T T T T T T T T T F T F T T T T T F F F F F F T T F T F T F F T T T T T T FFF TFF FTF TTF FFT TFT FTT TTT A  B  B)(P(P  (P  A) BAP

7 Discussion #18 7/13 Resolution Subsumes “the big 3” Inference Rules P P  Q Q P  F  P  Q Q  F  P Q  P  Q  P  F  Q  P  Q  F P  Q Q  R P  R  P  Q  Q  R  P  R Modus ponensModus tollens Hypothetical syllogism We now have one rule to rule them all!

8 Discussion #18 8/13 Example #1 If P  Q, Q  R, P then R. 1.Negate the conclusion (  R becomes another premise). 2.Convert to CNF: (  P  Q)  (  Q  R)  P   R 3.Write the premises as the first lines of the proof. 4.Do resolution. 1.  P  Q premise 2.  Q  Rpremise 3.Ppremise 4.  Rpremise 5.  P  Rresolution 1,2 6.Rresolution 3,5 7.resolution 4,6 } Sometimes called the support. empty = F

9 Discussion #18 9/13 Example #2 If P  (Q  R),  R  Q then  P. 1.Negate conclusion:  P  P 2.Convert to CNF: (  P  Q)  (  P  R)   R  Q  P 1.  P  Qpremise (not used  could discard) 2.  P  Rpremise 3.  Rpremise 4.Qpremise (not used  could discard) 5.Ppremise 6.Rresolution 2,5 7.Fresolution 3,6 Also, resolution 1,5 yields Q, which need not be added to the derivation  already there. Do we always need to use all the premises? If not, we can discard them from the statement to be proved.

10 Discussion #18 10/13 Example #3 If P  Q, Q  P, P  Q then P  Q. 1.Negate conclusion:  (P  Q)  (  P   Q) 2.CNF: (P  Q)  (  Q  P)  (  P  Q)  (  P   Q) 1.P  Qpremise 2.  Q  Ppremise 3.  P  Qpremise 4.  P   Qpremise 5.Presolution 1,2 (idemp. P  P  P) 6.Q resolution 3,5 7.  Q resolution 4,5 8.Fresolution 6,7

11 Discussion #18 11/13 Example #4 If (P  Q)  (P  R), P then Q  R. 1.Negate conclusion:  (Q  R)  (  Q   R) 2.CNF: ((  P  Q)  (  P  R))  P  (  Q   R)  (  P  Q  R)  P   Q   R 1.  P  Q  Rpremise 2.Ppremise 3.  Qpremise 4.  Rpremise 5.Q  Rresolution 1,2 6.R resolution 3,5 7. resolution 4,6

12 Discussion #18 12/13 Prenex Normal Form Prenex Normal Form  preparation to do resolution in predicate calculus –All quantifiers in front –More formally: No quantifier in the scope of any logical connector ( , , , ,  ) Algorithm to obtain prenex normal form: 1.Remove  and  2.Move  in 3.Rectify (standardize all variables apart) 4.Move quantifiers to the front

13 Discussion #18 13/13 Prenex Normal Form – Example  y(  xP(x)   xQ(x, y))   y(  xP(x)   xQ(x, y)) implication   y  (  xP(x)   xQ(x, y))  xA   x  A ( de Morgan’s )   y(  xP(x)   xQ(x, y)) de Morgan’s, double neg.   y(  xP(x)   x  Q(x, y))  xA   x  A (de Morgan’s)   y(  xP(x)   z  Q(z, y)) rectification   y  x(P(x)   z  Q(z, y))  xA  B   x(A  B) (x not free in B)   y  x  z(P(x)   Q(z, y)) A  zB   z(A  B) (z not free in A)


Download ppt "Discussion #18 1/13 Discussion #18 Resolution with Propositional Calculus; Prenex Normal Form."

Similar presentations


Ads by Google