Resolution Method in Logic: Outline and Examples

proof using resolution n.w
1 / 23
Embed
Share

Explore the resolution method in logic through a structured outline covering rules, conjunctive normal forms, and refutation techniques. Dive into practical examples like the Wumpus World scenario and learn how to apply resolution to derive conclusions effectively.

  • Resolution Method
  • Logic
  • Inference Algorithm
  • Conjunctive Normal Form
  • Refutation

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Proof Using Resolution Outline I. Rule of resolution II. Conjunctive normal forms III. Resolution refutation * Figures are from the textbook site unless the source is specifically cited.

  2. I. Resolution An inference algorithm ? is sound if KB ? whenever KB ?? complete if KB ?? whenever KB ? Inference rules covered so far are sound. The inference algorithms using them may not be complete. resolution + a complete search algorithm = a complete inference algorithm single inference rule

  3. Wumpus World Revisited KB: ?1: ?1,1 ?2: ?1,1 (?1,2 ?2,1) ?3: ?2,1 (?1,1 ?2,2 ?3,1) ?4: ?1,1 ?5: ?2,1 Rules Agent: 1,1 2,1 [1,1] ?6: ?1,1 ?1,2 ?2,1 ?1,2 ?2,1 ?1,1 ?7: ?1,2 ?2,1 ?1,1 ?8: ?1,1 ?1,2 ?2,1 ?9: ?1,2 ?2,1 // ?4,?8 ?10: ?1,2 ?2,1 Added to KB via inferences

  4. (contd) 1,1 1,2 : stench but no breeze Add to KB: ?11: ?1,2 ?12: ?1,2 ?1,1 ?2,2 ?1,3 Similarly, as in deriving ?10: ?1,2 ?2,1 ?13: ?2,2 ?14: ?1,3 ?3: ?2,1 (?1,1 ?2,2 ?3,1) biconditional elimination ?5: ?2,1 ?15: ?1,1 ?2,2 ?3,1

  5. Resolvent ?15: ?1,1 ?2,2 ?3,1 ?13: ?2,2 resolving the two literals that are negations of each other ?16: ?1,1 ?3,1(resolvent) If there s a pit in one of [1,1],[2,2], and [3,1] and it s not in [2,2],then it s in [1,1] or [3,1]. ?16: ?1,1 ?3,1 ?1: ?1,1 ?17: ?3,1

  6. Simple Resolution Rule ?1 ?? ??, ? (?? and ? are complementary literals, i.e.,??= ? or ? = ??.) ?1 ?? 1 ??+1 ?? Since ? is true, then ?? must be false. But one of ?1, ,?? must be true. Therefore, we can exclude ?? and assert that one of the remaining ? 1 literals must be true. Clause: a disjunction of literals. ?2,2 ?1,1 ?2,2 ?3,1, ?15: ?1,1 ?2,2 ?3,1 ?1,1 ?3,1 Unit clause: a single literal. ?1: ?2,2 ?5: ?2,1

  7. Full Resolution Rule ?? and ?? are complementary literals: ?1 ?? ??, ?1 ?? ?? ?1 ?? 1 ??+1 ?? ?1 ?? 1 ??+1 ?? If ?? is true, then ?? is false. Hence ?1 ?? 1 ??+1 ??must be true. If ?? is false, then ?1 ?? 1 ??+1 ?? must be true. ?1,1 ?3,1, ?1,1 ?2,2 ?3,1 ?2,2

  8. One Pair at a Time Only one pair of complementary literals can be resolved at each step. ? ? ?, ? ? ? ? ? true ? ? ?, ? ? ? Incorrect conclusion!

  9. II. Conjunctive Normal Form The resolution rule applies to clauses only. Conjunctive normal form (CNF): a conjunction of clauses Every sentence of propositional logic is equivalent to a CNF.

  10. Converting to CNF 1. Eliminate . ?1,1 (?1,2 ?2,1) ? ? replaced with (? ?) (? ?) (?1,1 (?1,2 ?2,1)) ((?1,2 ?2,1) ?1,1) 2. Eliminate . ? ? ( ?1,1 ?1,2 ?2,1) ( (?1,2 ?2,1) ?1,1) ? ? 3. Move inwards, repeatedly applying ( ?) ? (? ?) ( ? ?) (? ?) ( ? ?) ( ?1,1 ?1,2 ?2,1) (( ?1,2 ?2,1) ?1,1) 4. Apply the distributivity law ( ?1,1 ?1,2 ?2,1) ( ?1,2 ?1,1) ( ?2,1 ?1,1)

  11. CNF Conversion Algorithm (Optional) Parse every propositional sentence in the KB as an arithmetic expression to construct an expression tree (Com S 228). Operators (connectives): , , , , Operands (atomic sentences): ?,?,?,?,?, ? ? ? ? ? (infix expression) Construction is similar to the algorithm employing a stack to convert an infix expression into a postfix expression (Com S 228). ?Q ? ?? (postfix expression) Instead of outputting an operator after its two operands in the postfix format, now you just make the logical operator the parent of the two roots of the subtrees that store the same operator s subexpression operands.

  12. Postorder Traversal Perform a postorder traversal of the expression tree. When visiting an internal node ? (representing a connective), its left and right children (or its unique child in the case of a node) store the CNFs for the expressions represented by the left and right subtrees. ? ? Conversion is done in five cases depending on the logical operator stored at ?.

  13. Case 1 The node ? stores . CNF ??? ???1 ???2

  14. Case 2 The node ? stores . ???1 ?1 ?? ?? ???2 ?1 ??? ???1 ???2 ?=1, ,? ?? ?? ?=1, ,?

  15. Case 3 The node ? stores . ??? ?11 ?1?1 ?21 ?2?2 ??1 ???? ??? 1 ?1 ?1 ?1?1 ?2?2 ???? 1 ?? ?? If ??? is a negative literal, i.e., ???= ???, then ??? reduces to ??? because the two occurrences of cancel out.

  16. Case 4 The node ? stores . Logically equivalent to ???1 ???2. First, convert ???1 into conjunctive normal form ???1 (see case 3). Then, convert the disjunction ???1 ???2 into conjunctive normal form (see case 2)

  17. Case 5 The node ? stores . Logically equivalent to ???1 ???2 ???2 ???1. Convert ???1 ???2and ???2 ???1separately into conjunctive normal forms ???1 and ???2 (see case 4). Return ???1 ???2 .

  18. Example ? ? ? ? ?has the following conjunctive normal form:

  19. III. Proof by Resolution An Example KB: ? ? (? ?) ? ? ? ? ? ? ? ? (? ?) ? (? ?) ( ? ?) ( ? ?) Q: KB ? ? 1. Converting sentences to CNF 2. Spilt each conjunction into clauses. KB: KB: ? ? ? ? ? ? ? ? ? ? ? ? ( ? ?) ( ? ?) ? ? ? ?

  20. Proof by Resolution KB (updated): (1) ? (2) ? ? ? (3) ? ? (1) ? (2) ? ? ? (4) ? ? (5) ? ? resolve (3) ? ? (6) ? ? Q: KB ? ? (4) ? ? (7) ? ? (8) ? ? ? Resolution tree

  21. Resolution Refutation (Proof by contradiction) To show that KB ?, we show that KB ? is unsatisfiable. . KB (about a summer day): (1) If it is raining and you are outside then you will get wet. (2) If it is warm and there is no rain then it is a pleasant day. (3) You are not wet. (4) You are outside. (5) It is a warm day. Prove It is a pleasant day. * Example taken from http://watson.latech.edu/book/intelligence/intelligenceApproaches2b2.html

  22. KB in Propositional Sentences KB (rewritten): (1) ( rain outside ) wet (2) ( warm rain ) pleasant (3) wet (4) outside (5) warm converted into clauses (1) rain outside wet (2) warm rain pleasant (3) wet (4) outside (5) warm We add pleasant to KB and try to derive an empty clause .

  23. Resolution Refutation Tree pleasant (2) warm rain pleasant (5) warm warm rain rain (1) rain outside wet outside wet (4) outside (3) wet wet (empty clause) contradiction!

Related


More Related Content