CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove.

Slides:



Advertisements
Similar presentations
Inference in first-order logic
Advertisements

Artificial Intelligence 8. The Resolution Method
Some Prolog Prolog is a logic programming language
Resolution Proof System for First Order Logic
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Standard Logical Equivalences
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: – Constant symbols (i.e., the "individuals"
Resolution.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Automated Reasoning Systems For first order Predicate Logic.
Artificial Intelligence
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
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.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Resolution
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Resolution Theorem Proving
Predicate Calculus Russell and Norvig: Chapter 8,9.
Using Predicate Logic Chapter 5.
Resolution Theorem Prover in First-Order Logic
Prolog IV Logic, condensed. 2 Propositional logic Propositional logic consists of: The logical values true and false ( T and F ) Propositions: “Sentences,”
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
AI - Week 16 Logic and Reasoning in AI: Resolution Refutation Lee McCluskey, room 2/07
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
Inference and Resolution for Problem Solving
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Fall 2004.
Artificial Intelligence
Propositional logic It represents real-world facts as logical propositions in well formed formulas. It presented as an atomic propositions, and complex.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2005.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
UIUC CS 497: Section EA Lecture #3 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
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 Chapter 8 Inference and Resolution for Problem Solving.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Logical Representations and Resolution. Boolean Logic Conjunctive normal form Resolution.
1CS3754 Class Notes 14B, John Shieh, Figure 2.5: Further steps in the unification of (parents X (father X) (mother bill)) and (parents bill.
Chapter 2 Problems, Problem Spaces, and Search?
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
1 Inference in First Order Logic CS 171/271 (Chapter 9) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Reasoning using First-Order Logic
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Resolution Theorem Proving in Predicate Calculus Lecture No 10 By Zahid Anwar.
Artificial Intelligence
Introduction to Logic for Artificial Intelligence Lecture 2
The Hebrew University of Jerusalem
Artificial Intelligence
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Prolog IV Logic, condensed.
Horn Clauses and Unification
Horn Clauses and Unification
RESOLUTION.
CS621: Artificial Intelligence
Resolution Proof System for First Order Logic
Resolution Preliminaries
Presentation transcript:

CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove

2 Proving Theorem in FOL Proving theorem in FOL raises two additional problems: –Need to remove quantifiers –Need to be able to compare variable (which represent unknown values)

3 Substitution and Unification A substitution is a set of variable/ term pairs that one can apply to sentences to perform some needed unification or other manipulation SUBST( ,  ) denoted the result of applying substitution  to sentence  e.g., SUBST({x/A, y/ f(x)}, P (x,y)) = P(A, f(A)) Unification is the process of taking 2 atomic statements and finding a substitution that make them equivalent UNIFY(p,q) =  where SUBST( , p) = SUBST( , q) e.g. UNIFY(P(x), P(A) = { x/A }

4 Unification Example Knows(John, x)  Hates(John, x) Knows(John, Jane) Knows(y, Leonid) Knows(y, Mother(y)) Knows(x, Elizabeth) UNIFY(Knows(John, x), Knows(John, Jane)) = {x/John} UNIFY(Knows(John, x), Knows(y, Leonid)) = {x/John, y/Leonid} UNIFY(Knows(John, x), Knows(y, Mother(y))) = {y/John, x/Mother(John)} UNIFY(Knows(John, x), Knows(x, Elizabeth) = fail

5 Unification Example Before beginning unification, all variable names must be unique UNIFY(Knows(John, x1), Knows(x2, Elizabeth) = {x1/Elizabeth, x2/John} Unification makes as few commitments about variable bindings as possible UNIFY(Knows(John, x), Knows(y, z) = {y/John, x/z} Or {y/John, x/z, w/Freda} Or {y/John, x/John, z/John} Or … {y/John, x/z} is the most general unifier (MGU)

6 First Order Resolution

7 Convert to Clausal Form

8

9

10 Example : Convert to Clausal Form

11 Resolution Using Unification Given:  P(A)  (  x) (P(x)  Q(f(x))), prove: (  z) (Q(z)) Negate the theorem: (  z) (  Q(z)) Drop universal quantifiers and separate into disjunctive clauses. 1.  P(A) 2.(P(x)  Q(f(x))) 3.  Q(z) Clause 1 and 2 are resolved by substituting A for x {x/A}. Resulting clause is Q(f(A)), which is added to original set. Q(f(A)) is resolved against clause 3, using {z/f(A)}. Result is Q(f(A)) and  Q(f(A)) Contradiction proves original theorem.

12 Resolution Proof Question (informal): Is Marcus alive in the year 2001? Axioms (informal) 1.Marcus was a man. 2.Marcus was a Pompeian. 3.Marcus was born in 40 A.D. 4.All man are mortal. 5.The volcano erupted in 79 A.D. 6.All Pompeians died when the volcano erupted. 7.No mortal lives longer than 150 years. Additional axioms are required. 8. Alive means not dead 9. If someone dies, they remain dead.

13 Resolution Proof Axioms in clause form 1.Man(Marcus) 2.Pompeian(Marcus) 3.Born(Marcus, 40) 4.  Man(x1)  Mortal(x1) from...  x Man(x)  Mortal(x) 5.Erupted(Volcano, 79) 6.  Pomepeian(x2)  Died(x2, 79) from...  x Pompeian(x)  Died(x, 79) 7.  Mortal(x3)   Born(x3, t1)   Gt(t2-t1, 150)  Dead(x3, t2) from...  x,t1,t2 (Mortal(x)  Born(x,t)  Gt(t2-t1, 150)  Dead(x, t2))

14 Resolution Proof 8a.  Alive(x4, t3)   Dead(x4, t3) 8b. Dead(x4, t3)  Alive(x4, t3) from...  x,t Alive(x, t)   Dead(x, t) 9.  Died(x6, t5)   Gt(t6,t5)  Dead(x6,t6) from...  x,t1,t2 Died(x, t1) Gt(t2,t1)  Dead(x, t2) Prove:  alive(Marcus, 2001) Negate clause to be proved and add to list: alive(Marcus, 2001)

15 Alive(Marcus, 2001)  Alive(x4, t3)  Dead(x4, t3)  Dead(x4, 2001) {x4/Marcus, t3/2001}  Mortal(x3)   Born(x3, t1)   Gt(t2-t1, 150)  Dead(x3, t2)  Mortal(Marcus)   Born(Marcus, t1)   Gt(2001-t1, 150)  Man(x1)  Mortal(x1)  Man(Marcus)   Born(Marcus, t1)   Gt(2001-t1, 150) Man(Marcus)  Born(Marcus, t1)   Gt(2001-t1, 150)  Born(Marcus, 40)  Gt( , 150)  Gt(1961, 150) {x3/Marcus, t2/2001} {x1/Marcus} {t1/40}

16 Try this Use Resolution prove that West is a criminal