Presentation is loading. Please wait.

Presentation is loading. Please wait.

Resolution And yet Another Example:

Similar presentations


Presentation on theme: "Resolution And yet Another Example:"— Presentation transcript:

1 Resolution And yet Another Example:
Resolving P  Q  R with P  W  Q  R on Q yields P  R  R  W, which is True. on R yields P  Q  Q  W, which is also True. You cannot resolve on Q and R simultaneously! Note: Any set of wffs containing  and   is unsatisfiable, i.e. if one wff is the negation of another wff in that set, it is impossible that all wffs in that set are true. Any clause that contains  and  has value True regardless of the value of . October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

2 Converting wffs to Conjunctions of Clauses
Resolution is a powerful tool for algorithmic inference, but we can only apply it to conjunctions of clauses (conjunctive normal form, CNF). So is there a way to convert any wff into such a conjunction of clauses? Fortunately, there is such a way, allowing us to apply resolution to any wff. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

3 Converting wffs to Conjunctions of Clauses
Example: (P  Q)  (R  P). Step 1: Eliminate implication operators: (P  Q)  (R  P) Step 2: Reduce the scopes of  operators by using DeMorgan’s laws and eliminating double  operators: (P  Q)  (R  P) Step 3: Convert to CNF by using the associative and distributive laws: (P  R  P)  (Q  R  P), and then (P  R)  (Q  R  P) October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

4 Resolution Refutations
Resolution is a sound rule of inference, but it is not complete. For example, PR = PR, but the resolution rule does not allow us to infer PR from {P}, {R}. However, we can use resolution to show that the negation of PR is inconsistent with {P}, {R} and thereby showing that PR = PR. The negation of PR is P  R. Conjunctively combining all clauses results in P  R  P  R. This resolves to the empty set, so by contradiction we have indirectly shown that PR = PR. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

5 More Explanation of Resolution Refutations
You have a set of hypotheses h1, h2, …, hn, and a conclusion c. Your argument is that whenever all of the h1, h2, …, hn are true, then c is true as well. In other words, whenever all of the h1, h2, …, hn are true, then c is false. If and only if the argument is valid, then the conjunction h1  h2  …  hn  c is false, because either (at least) one of the h1, h2, …, hn is false, or if they are all true, then c is false. Therefore, if this conjunction resolves to false, we have shown that the argument is valid. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

6 Resolution Refutations
The following statements about resolution refutation are true (see p. 234 for references to proof): Completeness of resolution refutation: For a set of wffs  and a wff , if  = , then resolution refutation will produce the empty clause. This means that propositional resolution is refutation complete. Decidability of propositional calculus by resolution refutation: if  is a finite set of clauses and if   , then resolution refutation will terminate without producing the empty clause. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

7 Resolution Refutations
Example: “Gary is intelligent or a good actor. If Gary is intelligent, then he can count from 1 to 10. Gary can only count from 1 to 2. Therefore, Gary is a good actor.” Propositions: I: “Gary is intelligent.” A: “Gary is a good actor.” C: “Gary can count from 1 to 10.” October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

8 Resolution Refutations
Hypotheses: I  A, I  C, C In CNF: (I  A)  (I  C)  C Conclusion: A Conjunction of Clauses for Resolution Refutation: (I  A)  (I  C)  C  A October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

9 Resolution Refutations
(I  A)  (I  C)  C  A Resolution on A: I  (I  C)  C Resolution on I: C  C Resolution on C: False Therefore, the initial set of clauses is inconsistent, and the conclusion is correct: Gary is a good actor. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

10 Resolution Refutations
Another Example: “If Jim visits a pub on Thursday, he is late for work on Friday. If Jim is late for work on Friday, he has to work during the weekend. Jim had to work during the weekend. Therefore, Jim visited a pub on Thursday.” Propositions: T: “Jim visits a pub on Thursday.” F: “Jim is late for work on Friday.” W: “Jim has to work during the weekend.” October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

11 Resolution Refutations
Hypotheses: T  F, F  W, W In CNF: (T  F)  (F  W)  W Conclusion: T Conjunction of Clauses for Resolution Refutation: (T  F)  (F  W)  W  T October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

12 Resolution Refutations
(T  F)  (F  W)  W  T Resolution on F: (T  W)  W  T Simplification: W  T No further resolution is possible. Therefore, the argument is invalid and the conclusion that Jim went to a pub on Thursday is incorrect. (He could have been forced to work during the weekend for other reasons.) October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

13 Propositional Calculus
You have seen that resolution, including resolution refutation, is a suitable tool for automated reasoning in the propositional calculus. If we build a machine that represents its knowledge as propositions, we can use these mechanisms to enable the machine to deduce new knowledge from existing knowledge and verify hypotheses about the world. However, propositional calculus has some serious restrictions in its capability to represent knowledge. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

14 Propositional Calculus
In propositional calculus, atoms have no internal structure; we cannot reuse the same proposition for a different object, but each proposition always refers to the same object. For example, in the toy block world, the propositions ON_A_B and ON_A_C are completely different from each other. We could as well call them PETER and BOB instead. So if we want to express rules that apply to a whole class of objects, in propositional calculus we would have to define separate rules for every single object of that class. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

15 Predicate Calculus So it is a better idea to use predicates instead of propositions. This leads us to predicate calculus. Predicate calculus has symbols called object constants, relation constants, and function constants These symbols will be used to refer to objects in the world and to propositions about the word. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

16 Components Object constants:
Strings of alphanumeric characters beginning with either a capital letter or a numeral. Examples: XY, George, 154, H1B Function constants: Strings of alphanumeric characters beginning with a lowercase letter and (sometimes) superscripted by their “arity”: Examples: fatherOf1, distanceBetween2 October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

17 Components Relation constants:
Strings of alphanumeric characters beginning with a capital letter and (sometimes) superscripted by their “arity”: Examples: BeatsUp2, Tired1 Other symbols: Propositional connectives , , , and , delimiters (, ), [, ], and separator ,. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

18 Terms An object constant is a term.
A function constant of arity n, followed by n terms in parentheses and separated by commas, is a term. Examples: fatherOf(George), times(3, minus(5, 2)) October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

19 Wffs Atoms: A relation constant of arity n followed by n terms in parentheses and separated by commas is an atom. An atom is a wff. Examples: Tired(John), OlderThan(Hans, Peter) Propositional wffs: Any expression formed out of predicate-calculus wffs in the same way that the propositional calculus forms wffs out of other wffs is a propositional wff. Example: OlderThan(John, Peter)  OlderThan(Peter, Jennifer) October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

20 Interpretations An interpretation of an expression in the predicate calculus is an assignment that maps object constants into objects in the world, n-ary function constants into n-ary functions, n-ary relation constants into n-ary relations. These assignments are called the denotations of their corresponding predicate-calculus expressions. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

21 Interpretations B Example: Blocks world: A C Floor
Predicate Calculus World A A B B C C Fl Floor On On = {<B,A>, <A,C>, <C, Floor>} Clear Clear = {<B>} October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

22 Quantification Introducing the universal quantifier  and the existential quantifier  facilitates the translation of world knowledge into predicate calculus. Examples: All UMB Students are intelligent. x(UMBStudent(x)  Intelligent(x)) There is at least one intelligent UMB professor. x(UMBProf(x)  Intelligent(x)) October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II

23 Voluntary Homework! a) There are no crazy UMB students.
x (UMBStudent(x)  Crazy(x)) b) All computer scientists are either rich or crazy, but not both. c) All UMB students except one are intelligent. d) Jerry and Betty have the same friends. e) No mouse is bigger than an elephant. October 16, 2018 Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II


Download ppt "Resolution And yet Another Example:"

Similar presentations


Ads by Google