Download presentation
Presentation is loading. Please wait.
Published byImogene Foster Modified over 8 years ago
1
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 1Resolution And yet Another Example: Resolving P Q R with P W Q R on Q yields P R R W, which is True. on Q yields P R R W, which is True. on R yields P Q Q W, which is also 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 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. Any clause that contains and has value True regardless of the value of.
2
March 8, 2016Introduction 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.
3
March 8, 2016Introduction 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)
4
March 8, 2016Introduction 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.
5
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 5 More Explanation of Resolution Refutations You have a set of hypotheses h 1, h 2, …, h n, and a conclusion c. Your argument is that whenever all of the h 1, h 2, …, h n are true, then c is true as well. In other words, whenever all of the h 1, h 2, …, h n are true, then c is false. If and only if the argument is valid, then the conjunction h 1 h 2 … h n c is false, because either (at least) one of the h 1, h 2, …, h n 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.
6
March 8, 2016Introduction 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. 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. 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.
7
March 8, 2016Introduction 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.”
8
March 8, 2016Introduction 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
9
March 8, 2016Introduction 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.
10
March 8, 2016Introduction 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.”
11
March 8, 2016Introduction 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
12
March 8, 2016Introduction 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.)
13
March 8, 2016Introduction 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.
14
March 8, 2016Introduction 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.
15
March 8, 2016Introduction 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, object constants, relation constants, and relation constants, and function constants function constants These symbols will be used to refer to objects in the world and to propositions about the word.
16
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 16Components 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: fatherOf 1, distanceBetween 2
17
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 17Components Relation constants: Strings of alphanumeric characters beginning with a capital letter and (sometimes) superscripted by their “arity”: Examples: BeatsUp 2, Tired 1 Other symbols: Propositional connectives , , , and , delimiters (, ), [, ], and separator,.
18
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 18Terms An object constant is a term.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.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))
19
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 19WffsAtoms: A relation constant of arity n followed by n terms in parentheses and separated by commas is an atom. An atom is a wff.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)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.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)Example: OlderThan(John, Peter) OlderThan(Peter, Jennifer)
20
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 20Interpretations An interpretation of an expression in the predicate calculus is an assignment that maps object constants into objects in the world, object constants into objects in the world, n-ary function constants into n-ary functions, n-ary function constants into n-ary functions, n-ary relation constants into n-ary relations. n-ary relation constants into n-ary relations. These assignments are called the denotations of their corresponding predicate-calculus expressions.
21
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 21Interpretations Example: Blocks world: B A C Predicate CalculusWorld AAAAAAAA BBBBBBBB CCCCCCCC FlFloor OnOn = {,, } ClearClear = { } Floor
22
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 22Quantification Introducing the universal quantifier and the existential quantifier facilitates the translation of world knowledge into predicate calculus. Examples: Paul beats up all professors who fail him. x(Professor(x) Fails(x, Paul) BeatsUp(Paul, x)) There is at least one intelligent UMB professor. x(UMBProf(x) Intelligent(x))
23
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 23Homework! a) There are no crazy UMB students. x (UMBStudent(x) Crazy(x)) 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.