Resolution And yet Another Example:

Slides:



Advertisements
Similar presentations
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
Inference Rules Universal Instantiation Existential Generalization
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
First Order Logic Resolution
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
Logic Use mathematical deduction to derive new knowledge.
Resolution Theorem Proving
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Inference and Resolution for Problem Solving
Knoweldge Representation & Reasoning
Artificial Intelligence
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
1 Knowledge Representation and Reasoning. 2 Knowledge Representation & Reasoning How knowledge about the world can be represented How knowledge about.
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
I NTRO TO L OGIC Dr Shlomo Hershkop March
November 7, 2012Introduction to Artificial Intelligence Lecture 13: Neural Network Basics 1 Note about Resolution Refutation You have a set of hypotheses.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
October 17, 2012Introduction to Artificial Intelligence Lecture 11: Knowledge Representation and Reasoning I 1Semantics In propositional logic, we associate.
CS6133 Software Specification and Verification
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
PREDICATE CALCULS In Propositional Calculus, each atomic symbol denotes a proposition. But there is no way to access the components of an individual assertion.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
March 8, 2016Introduction to Artificial Intelligence Lecture 13: Knowledge Representation & Reasoning II 1Resolution And yet Another Example: Resolving.
Knowledge Representation and Reasoning 2
Chapter 7. Propositional and Predicate Logic
2. The Logic of Compound Statements Summary
Introduction to Logic for Artificial Intelligence Lecture 2
Knowledge Representation and Reasoning
Applied Discrete Mathematics Week 5: Mathematical Reasoning
Resolution in the Propositional Calculus
Propositional Logic Resolution
The Propositional Calculus
Proposition & Predicates
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Mathematical Reasoning
Logic Use mathematical deduction to derive new knowledge.
Biointelligence Lab School of Computer Sci. & Eng.
Artificial Intelligence Chapter 15. The Predicate Calculus
Applied Discrete Mathematics Week 1: Logic
CS 416 Artificial Intelligence
Back to “Serious” Topics…
Applied Discrete Mathematics Week 2: Proofs
Biointelligence Lab School of Computer Sci. & Eng.
Reasoning with the Propositional Calculus
Reasoning with the Propositional Calculus
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Propositional Calculus
Encoding Knowledge with First Order Predicate Logic
Reasoning with the Propositional Calculus
Reasoning with the Propositional Calculus
Encoding Knowledge with First Order Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Mathematical Reasoning
Encoding Knowledge with First Order Predicate Logic
Knowledge Representation
Presentation transcript:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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