Presentation is loading. Please wait.

Presentation is loading. Please wait.

Resolution

Similar presentations


Presentation on theme: "Resolution"— Presentation transcript:

1 Resolution

2 Resolution Principle Resolution refutation proves a theorem by negating the statement to be proved and adding this negated goal to the set of axioms that are known to be true. Use the resolution rule of inference to show that this leads to a contradiction. Once the theorem prover shows that the negated goal is inconsistent with the given set of axioms, it follows that the original goal must be consistent.

3 Resolution Principle Prove that “Fido will die.” from the statements “Fido is a dog.”, “All dogs are animals.” and “All animals will die.” Changing premises to predicates dog(fido)  (x) (dog(X)  animal(X))  (Y) (animal(Y)  die(Y)) Modus Ponens and {fido/X} animal(fido)  (Y) (animal(Y)  die(Y)) Modus Ponens and {fido/Y} die(fido)

4 Resolution Principle Equivalent Reasoning by Resolution Convert predicates to clause form Predicate formClause form 1.  dog(fido) dog(fido) 2.  (x) (dog(X)  animal(X))  dog(X)  animal(X) 3.  (Y) (animal(Y)  die(Y))  animal(Y)  die(Y) Negate the conclusion 4.  die(fido)  die(fido)

5 Converting to Clause Form 1.Eliminate , using: a  b=  a v b. 2.Reduce the scope of each  to a single term, using:  (  p) = p deMorgan's laws:  (a  b) =  a V  b  (a V b) =  a   b   x P(x) =  x  P(x)   x P(x) =  x  P(x) 3.Standardize variables. 4.Move all quantifiers to the left of the formula without changing their relative order. 5.Eliminate existential quantifiers by inserting Skolem functions. 6.Drop the prefix. 7.Convert the expression into a conjunction of disjuncts, using associativity and distributivity. 8.Create a separate clause for each conjunct. 9.Standardize apart the variables in the set of clauses generated in step 8, using the fact that: (  x: P(x)  Q(x)) =  x: P(x)   x: Q(x)

6 Skolem Functions in FOL Skolem’s Theorem Every existentially quantified variable can be replaced by a unique Skolem function whose arguments are all the universally quantified variables on which the existential depends, without changing FOL. Examples “Everybody likes something”  (x)  (y) [Person(x) & Likes(x,y)]  (x) [Person(x) & Likes(x, S1(x))] Where S1(x) = “that which x likes” “Every philosopher writes at least one book”  (x)  (y)[Philosopher(x) & Book(y)) => Write(x,y)]  (x)[(Philosopher(x) & Book(S2(x))) => Write(x,S2(x))]

7 Examples of Conversion to Clause Form Example:  x: [Roman(x)  know(x, Marcus)]  [hate(x,Caesar) V (  y:  z: hate(y,z)  thinkcrazy(x,y))] Eliminate   x:  [Roman(x)  know(x, Marcus)] V [hate(x,Caesar) V (  y:  z: hate(y,z) V thinkcrazy(x,y))] Reduce scope of .  x: [  Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (  y:  z:  hate(y,z) V thinkcrazy(x,y))] “Standardize” variables:  x: P(x) V  x: Q(x) converts to  x: P(x) V  y: Q(y) Move quantifiers.  x:  y:  z: [  Roman(x) V  know(x, Marcus)] V [hate(x,Caesar) V (  hate(y,z) V thinkcrazy(x,y))]

8 Examples of Conversion to Clause Form Eliminate existential quantifiers.  y: President(y) will be converted to President(S1)  x:  y: father-of(y,x) will be converted to  x: father- of(S2(x),x)) Drop the prefix. [  Roman(x) V  know(x,Marcus)] V [hate(x, Caesar) V (  hate(y,z) V thinkcrazy(x,y))] Convert to a conjunction of disjuncts.  Roman(x) V  know(x,Marcus) V hate(x,Caesar) V  hate(y,z) V thinkcrazy(x,y)

9 Algorithm: Resolution 1.Convert all the propositions of F to clause form. 2.Negate P and convert the result to clause form. Add it to the set of clauses obtained in 1. 3.Repeat until either a contradiction is found, no progress can be made, or a predetermined amount of effort has been expended. a) Select two clauses. Call these the parent clauses. b) Resolve them together. The resolvent will be the disjunction of all the literals of both parent clauses with appropriate substitutions performed and with the following exception: If there is one pair of literals T1 and  T2 such that one of the parent clauses contains T1 and the other contains  T2 and if T1 and T2 are unifiable, then neither T1 nor  T2 should appear in the resolvent. If there is more than one pair of complementary literals, only one pair should be omitted from the resolvent. c) If the resolvent is the empty clause, then a contradiction has been found. If it is not, then add it to the set of clauses available to the procedure.

10 Resolution in Propositional Logic 1. a  b  ca  b  c 2. bb 3. c  d  e c   d   e 4. e  f e  f 5. d   fd  f

11 Resolution in Propositional Logic – First, the goal to be proved, a, is negated and added to the clause set. – The derivation of indicates that the database of clauses is inconsistent.  a a   b  c  b  c b  c c  d  e e  f  d  e d f   d f  f

12 Resolution on the predicate calculus o A literal and its negation in parent clauses produce a resolvent only if they unify under some substitution .  Is then applied to the resolvent before adding it to the clause set. o C 1 =  dog(X)  animal(X) C 2 =  animal(Y)  die(Y) Resolvent :  dog(Y)  die(Y) {Y/X}

13 Resolution Proof Axioms in clause form: 1. man(marcus) 2. pompeian(marcus) 3.  pompeian(X 1 ) v roman(X 1 ) 4. ruler(caesar) 5.  roman(X 2 ) v loyalto(X 2, caesar) v hate(X 2, caesar) 6. loyalto(X 3, f1(X 3 )) 7.  man(X 4 ) v  ruler(Y 1 ) v  tryassassinate(X 4, Y 1 ) v  loyalto (X 4, Y 1 ) 8. tryassassinate(marcus, caesar)

14 Resolution Proof Prove: hate(marcus, caesar)  hate(marcus, caesar)  roman(marcus) V loyalto(marcus,caesar) marcus/X marcus/X 1  pompeian(marcus) V loyalto(marcus,caesar) loyalto(marcus,caesar) marcus/X 4, caesar/Y 1  man(marcus) V  ruler(caesar) V  tryassassinate(marcus, caesar)  ruler(caesar) V  tryassassinate(marcus, caesar)  tryassassinate(marcus, caesar)

15 Resolution Proof q “Lucky student” 1. Anyone passing his history exams and winning the lottery is happy   X(pass(X,history)  win(X,lottery)  happy(X)) 2. Anyone who studies or is lucky can pass all his exams.   X  Y(study(X)  lucky(X)  pass(X,Y)) 3. John did not study but he is lucky   study(john)  lucky(john) 4. Anyone who is lucky wins the lottery.   X(lucky(X)  win(X,lottery))

16 Resolution Proof q Clause forms of “Lucky student” 1.  pass(X,history)   win(X,lottery)  happy(X) 2.  study(X)  pass(Y,Z)  lucky(W)  pass(W,V) 3.  study(john) lucky(john) 4.  lucky(V)  win(V,lottery) 5. Negate the conclusion “John is happy”  happy(john)

17 Resolution Proof q “Exciting Life” 1. All people who are not poor and are smart are happy.   X(  poor(X)  smart(X)  happy(X)) 2. Those people who read are not stupid.   Y(read(Y)  smart(Y))  {assume  X(smart(X)   stupid(X))} 3. John can read and is wealthy.  read(john)  poor(john)  {assume  Y(wealthy(Y)   poor(Y))} 4. Happy people have exciting lives.   Z(Happy(Z)  exciting(Z)) 5. Negate the conclusion.  “Can anyone be found with an exciting life?”   X(exciting(W))

18 Resolution Proof q Clause forms of “exciting life” 1. poor(X)  smart(X)  happy(X) 2.  read(Y)  smart(Y) 3. read(john)  poor(john) 4.  happy(Z)  exciting(Z) 5.  exciting(W)

19 Summary of this lecture In this lecture we have – Converting Clause Form – Resolution Proof


Download ppt "Resolution"

Similar presentations


Ads by Google