Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.

Slides:



Advertisements
Similar presentations
Inference in first-order logic
Advertisements

Inference in First-Order Logic
Inference in first-order logic
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
ITCS 3153 Artificial Intelligence Lecture 15 First-Order Logic Chapter 9 Lecture 15 First-Order Logic Chapter 9.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Artificial Intelligence Inference in first-order logic Fall 2008 professor: Luigi Ceccaroni.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Inference in FOL All rules of inference for propositional logic apply to first-order logic We just need to reduce FOL sentences to PL sentences by instantiating.
First-Order Logic Inference
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Fall 2004.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2005.
1 Inference in First-Order Logic. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference in First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
Inference in first-order logic I CIS 391 – Introduction to Artificial Intelligence AIMA Chapter (through p. 278) Chapter 9.5 (through p. 300)
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
1 Inference in first-order logic Chapter 9. 2 Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
Logical Inference 2 rule based reasoning
CS 416 Artificial Intelligence Lecture 12 First-Order Logic Chapter 9 Lecture 12 First-Order Logic Chapter 9.
First-Order Logic and Plans Reading: C. 11 (Plans)
Inference in first- order logic. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward chaining.
Computing & Information Sciences Kansas State University Friday, 29 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 16 of 42 Friday, 29 September.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
Inference in First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
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.
1 Inference in First-Order Logic CS 271: Fall 2009.
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.
5/18/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 13, 5/18/2005 University of Washington, Department of Electrical Engineering Spring.
An Introduction to Artificial Intelligence – CE Chapter 9 - Inference in first-order logic Ramin Halavati In which we define.
1 First Order Logic CS 171/271 (Chapters 8 and 9) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1/19 Inference in first-order logic Chapter 9- Part2 Modified by Vali Derhami.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Inference in first-order logic
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
For Friday Finish chapter 9 Program 1 due. Program 1 Any questions?
Inference in First-Order Logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
1 Chaining in First Order Logic CS 171/271 (Chapter 9, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
EA C461 Artificial Intelligence
Presented By S.Yamuna AP/CSE
Inference in first-order logic
Inference in First-Order Logic
Inference in First-Order Logic
Inference in first-order logic part 1
Artificial intelli-gence 1:Inference in first-order logic
Artificial Intelligence
Artificial intelligence: Inference in first-order logic
Artificial Intelligence Inference in First Order Logic
Inference in first-order logic
Inference in first-order logic part 1
Inference in First Order Logic (1)
First-Order Logic Inference
Presentation transcript:

Inference in First Order Logic

Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward chaining Logic programming Resolution

A brief history of reasoning 450 B.C. Stoics: propositional logic, inference (maybe). 322 B.C. Aristotle: “syllogisms” (inference rules), quantifiers 1565 Cardano: probability theory (propositional logic + uncertainty) 1847 Boole: propositional logic (again) 1879 Frege: first-order logic 1922 Wittgenstein: proof by truth tables 1930 Gödel: complete algorithm for FOL 1930 Herbrand: complete algorithm for FOL (reduce to propositional 1931 Gödel: complete algorithm for arithmetic 1960 Davis/Putnam: “practical” algorithm for propositional logic 1965 Robinson: “practical” algorithm for FOL-resolution

Universal Instantiation (UI) Every instantiation of a universally quantified sentence is entailed by it: for any variable v and ground term g E.g., yields

Existential Instantiation (EI) For any sentence α, variable v, and constant symbol k that does not appear elsewhere in the knowledge base: E.g., yields provided C 1 is a new constant symbol, called a Skolem constant Another example: from we obtain provided e is a new constant symbol.

Universal Instantiation and Existential Instantiation Universal Instantiation (UI) can be applied several times to add new sentences: the new KB is logically equivalent to the old. Existential Instantiation can be applied once to replace the existential sentence: the new KB is not equivalent to the old, but is satisfiable if and only if the old KB is satisfiable.

Reduction to Propositional Inference Suppose the KB contains just the following: Instantiating the universal sentence in all possible ways, we have The new KB is propositionalized: proposition symbols are

Reduction contd. Claim: a ground sentence* is entailed by new KB iff entailed by original KB Claim: every FOL KB can be propositionalized so as to preserver entailment. Idea: propositionalize KB and query, apply resolution, return result. Problem: with function symbols, there are infinitely many ground terms, e.g., Father(Father(Father(John))) Theorem: Herbrand (1930). If a sentence α is entailed by an FOL KB, it is entailed by a finite subset a propositional KB. Idea: For n = 0 to ∞ do create a propositional KB by instantiating with depth-n terms see if α is entailed by this KB Problem: works if α is entailed, loops if α is not entailed Theorem: Turing (1936), Church (1936), entailement in FOL is semidecidable

Problems with propositionalization Propositionalization seems to generate lots of irrelevant sentences. E.g., from it seems obvious that Evil(John), but propositionalization produce lots of facts such as Greedy(Richard) that are irrelevant. With p k-ary predicates and n constants, there are p – n k instantiations!

Unification We can get the inference immediately if we can find a substitution φ such that King(x) and Greedy(x) match King(John) and Greedy(y) φ = {x/John, y/John} works U NIFY (α,ß) = φ if αφ = ßφ Standardizing apart eliminates overlap of variables, e.g., Knows(z 17, OJ)

Generalized Modus Ponens (GMP) GMP used with KB of definite clauses (exactly one positive literal All variables assumed universally quantified.

Soundness of GMP Need to show that provided that for all i Lemma: For any definite clause p, we have by UI

Example knowledge base The law says that it is a crime for an American to sell weapons to hostile nations. The country Nono, an enemy America, has some missiles, and all of its missiles were sold to it by Col. West who is American Prove that Col. West is a criminal

Knowledge base contd. It is a crime for an American to sell weapons to hostile nations: Nono … has some missiles, i.e., … all of it missiles were sold to it by Col. West Missiles are weapons An enemy of America counts as “hostile” West who is American … The country Nono, an enemy of America …

Forward chaining algorithm

Properties of forward chaining Sound and complete for first-order definite clauses (proof similar to propositional proof) Datalog = first-order definite clauses + no functions (e.g., crime KB) FC FC terminates for Datalog in poly iterations: at most pn k literals. May not terminate in general if α is not entailed. This is unavoidable: entailment with definite clauses semidecidable

Efficiency of forward chaining Simple observation: no need to match a rule on iteration k if a premise wasn’t added on iteration k – 1  match each rule whose premise contains a newly added literal. Matching itself can be expensive. Database indexing allows O(1) retrieval of known facts, e.g., query Missile(x) retrieves Missile(M 1 ). Matching conjunctive premises against known facts is NP-hard. FC is widely used in deductive database

Backward chaining algorithm

Properties of backward chaining Depth-first recursive proof search: space is linear in size of proof. Incomplete due to infinite loops  fix by checking current goal against every goal on stack. Inefficient due to repeated subgoals (both success and failure)  fix using caching of previous results (extra space!). Widely used for logic programming

Logic programming Computation as inference on logical KBs Should be easier to debug Capitali(NewYork, USA) than x := x + 2!

Resolution: brief summary Full first-order version: where For example, With Apply resolution steps to ; complete for FOL