Artificial Intelligence University Politehnica of Bucharest 2008-2009 Adina Magda Florea

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Some Prolog Prolog is a logic programming language
Resolution Proof System for First Order Logic
Inference Rules Universal Instantiation Existential Generalization
SLD-resolution Introduction Most general unifiers SLD-resolution
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.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove.
Standard Logical Equivalences
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Automated Reasoning Systems For first order Predicate Logic.
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2010 Adina Magda Florea
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.
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.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Resolution Theorem Prover in First-Order Logic
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
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
Artificial Intelligence
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
Automated Reasoning ARTIFICIAL INTELLIGENCE 6th edition George F Luger
All rights reservedL. Manevitz Lecture 51 Artificial Intelligence Logic Part 2 L. Manevitz.
0 1 Todays Topics Resolution – top down and bottom up j-DREW BU procedure Subsumption – change to procedure Infinite Loops RuleML input – Prolog output.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
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.
Lecture on Programming Languages
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 [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 17 Wednesday, 01 October.
The AI War LISP and Prolog Basic Concepts of Logic Programming
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.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Procedural Semantics Soundness of SLD-Resolution.
Automated Reasoning Systems For first order Predicate Logic.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 18 of 41 Friday, 01 October.
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.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
Resolution Preliminaries Computational LogicLecture 9 By Prof. Michael Genesereth, Computer Science, Stanford Univ Spring 2005 Modified by Charles Ling.
Resolution Theorem Proving in Predicate Calculus Lecture No 10 By Zahid Anwar.
Answer Extraction To use resolution to answer questions, for example a query of the form  X C(X), we must keep track of the substitutions made during.
Copyright 1999Paul F. Reynolds, Jr. Foundations of Logic Programming.
Artificial Intelligence
Introduction to Logic for Artificial Intelligence Lecture 2
Resolution in the Propositional Calculus
Propositional Logic Resolution
Propositional Resolution
Biointelligence Lab School of Computer Sci. & Eng.
Soundness of SLD-Resolution
CS 416 Artificial Intelligence
Biointelligence Lab School of Computer Sci. & Eng.
Inference in FOL All PL inference rules hold in FOL, as well as the following additional ones: Universal elimination rule: x, A ===> Subst({x / g}, A).
RESOLUTION.
Resolution in predicate Logic
Resolution Proof System for First Order Logic
Resolution Theorem Proving
Soundness of SLD-Resolution
Presentation transcript:

Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea

Lecture No. 5 Theorem proving through resolution refutation Standard form Expression unification Resolution in propositional logic Resolution in predicate logic Resolution strategies Answers through resolution

1. Standard form (clausal) Clause Horn Clause Definite Horn Clause Empty clause Transformation into clausal form

2. Expression unification Substitution  Unifier Most general unifier  Expression Unification algorithm

Algorithm Unify(E1,E2):Expression unification 1.if E1 and E2 are constants then 1.1.if E1=E2 then return { } 1.2. return FAIL 2. if E1 is a variable or E2 is a variable then 2.1.Exchange E1 with E2 such as E1 to be a variable 2.2. if E1=E2 then return { } 2.3. if E1 occurs in E2 then return FAIL 2.4. return {E1/E2}

3.if E1=simb(t 11,…,t 1n ) and E2=simb(t 21,…t 2n ) then 3.1 x  t 11, y  t Rest 1  t 12,…,t 1n, Rest 2  t 22,…t 2n 3.3  1  Unify(x,y) 3.4 if  1= FAIL then return FAIL 3.5 G 1  Rest 1 /  1, G 2  Rest 2 /   2  Unify(Rest 1, Rest 2 ) 3.7 if  2= FAIL then return FAIL else return (  1,  2 ) 4.return FAIL end.

3. Resolution in propositional logic Resolvent Clauses that resolve Proof principle Proof tree

Algorithm:Resolution refutation in propositional logic. 1.Transform the set of axioms A in clausal form and get S0 2.Negate the theorem, transform the negated theorem in clausal form and add it to S0 3.repeat 3.1.Select two clauses C1 and C2 from S 3.2.Compute R = Res(C1,C2) 3.3.if R   then add R to S until R =  or there are no two other clauses that resolve 4.if R =  then the theoren is proven 5.else it is not a theorem end.

Example Mihai has money The car is white The car is beautiful If the car is white or the car is beautiful and Mihai has money then Mihai goes to the mountain B A F (A  F)  B  C

4. Resolution in predicate logic Resolvent Clauses that resolve Factor of a clause

Algorithm: Resolution refutation in predicate logic. 1. Transform the set of axioms A in clausal form and get S0 2.Negate the theorem, transform the negated theorem in clausal form and add it to S0 3.repeat 3.1.Select two clauses C1 and C2 from S 3.2.Compute R = {Res(C1,C2)} 3.3.if   R then add R to S until   R or there are no two other clauses that resolve or a predefined amount of effort has been exhausted 4.if   R then the theoren is proven 5.else if there are no two other clauses that resolve then it is not a theorem else there is not a definite conclusion end.

Example Horses are faster than dogs and there is a greyhound that is faster than every rabbit. We know that Harry is a horse and that Ralph is a rabbit. Derive that Harry is faster than Ralph. Horse(x) Greyhound(y) Dog(y) Rabbit(z) Faster(y,z))  y Greyhound(y)  Dog(y)  x  y  z Faster(x,y)  Faster(y,z)  Faster(x,z)  x  y Horse(x)  Dog(y)  Faster(x,y)  y Greyhound(y)  (  z Rabbit(z)  Faster(y,z)) Horse(Harry) Rabbit(Ralph)

A1.  x  y Horse(x)  Dog(y)  Faster(x,y) A2.  y Greyhound(y)  (  z Rabbit(z)  Faster(y,z)) A3. Horse(Harry) A4. Rabbit(Ralph) A5.  y Greyhound(y)  Dog(y) A6.  x  y  z Faster(x,y)  Faster(y,z)  Faster(x,z) T Faster(Harry,Ralph) C1. ~Horse(x)  ~Dog(y)  Faster(x,y) C2. Greyhound(Greg) C2’ ~Rabbit(z)  Faster(Greg,z) C3. Horse(arry) C4. Rabbit(Ralph) C5. ~Greyhound(y)  Dog(y) C6. ~Faster(x,y)  ~Faster(y,z)  Faster(x,z) C7. ~Faster(Harry,Ralph)

5. Resolution strategies Breadth first (level order) strategy Set of support strategy Linear resolution Input linear resolution Unit resolution Elimination strategy

Level order strategy

S 0, L 0 L k+1  {Res(C i, C j )| C i  L k, C j  S k } S k+1  S k  L k+1 k = 0,1,2,…

Linear resolution S, C 0  S C 1  {Res(C 0, C i )| C 0, C i  S} C k+1  {Res(C k, C i )| C i  {C k-1, C k-2,.. }  S} k=1, 2, 3,… Input linear resolution S, C 0  S C 1  {Res(C 0, C i )| C 0, C i  S} C k+1  {Res(C k, C i )| C i  S} k=1, 2, 3,…

A clause C subsumes a clause D iff there is a substitution  such that C   D. D is called subsumed clause. C=P(x)D=P(a)  Q(a) Subsumed clauses

6. Obtaining answers C1 C2 C3