1 Soundness and Completeness zKB |- S: S is provable from KB. zA proof procedure is sound if: yIf KB |- S, then KB |= S. yThat is, the procedure produces.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Inference in First-Order Logic
Artificial Intelligence 8. The Resolution Method
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),
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"
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Artificial Intelligence
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.
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Logic.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
1 Limitations of Prop. Logic zCumbersome for large domains: yMan-Abraham, Man-Isaac, Man-Jacob yWoman-Sara, Woman-Rachel, Woman-Leah yMan-Abraham  Human-Abraham.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 6.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Knowledge Representation I (Propositional Logic) CSE 473.
1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity.
Knowledge Representation III First-Order Logic
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Prop logic First order predicate logic (FOPC) Prob. Prop. logic Objects, relations Degree of belief First order Prob. logic Objects, relations.
Predicate Calculus.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
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.
Logic & Knowledge Representation I Foundations of Artificial Intelligence.
Knowledge Representation IV Inference for First-Order Logic CSE 473.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Logic in AI CSE 573. © Daniel S. Weld 2 Logistics Monday? Reading Ch 8 Ch 9 thru p 278 Section 10.3 Projects Due 11/10 Teams and project plan due by this.
Computing & Information Sciences Kansas State University Wednesday, 20 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 12 of 42 Wednesday, 20 September.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 11 of 41 Wednesday, 15.
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 12 Friday, 17 September.
1 Logical Inference Algorithms CS 171/271 (Chapter 7, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
CS6133 Software Specification and Verification
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 15 of 41 Friday 24 September.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
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.
Propositional Logic Predicate Logic
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
First-Order Logic Daniel Weld CSE 473 Spring 2012.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
© Daniel S. Weld Topics Agency Problem Spaces SearchKnowledge Representation Planning PerceptionNLPMulti-agentRobotics Uncertainty MDPs Supervised.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Computing & Information Sciences Kansas State University Monday, 18 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 11 of 42 Monday, 18 September.
The Propositional Calculus
Knowledge Representation II
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
First-Order Logic CSE 573 A handful of GENERAL SEARCH TECHNIQUES lie at the heart of practically all work in AI We will encounter the SAME PRINCIPLES again.
CS 416 Artificial Intelligence
Logical Agents Chapter 7.
Presentation transcript:

1 Soundness and Completeness zKB |- S: S is provable from KB. zA proof procedure is sound if: yIf KB |- S, then KB |= S. yThat is, the procedure produces only correct consequences. zA proof procedure is complete if: yIf KB |= S, then KB |- S. yThat is, the procedure produces all the consequences. zIdeally, the procedure should be sound and complete. (Ideals are nice in theory).

2 Knock Knock Logic zWho’s there? yJoe  Mike, Sally zBackground knowledge: yMike => Sally y  Sally   Rita zHence?

3 Modus Ponens zFrom A and A  B, infer B. zA and B can be any sentence. zModus ponens with a few axiom schemas is sound and complete: y A  (B  A) yA  (B  C)  ((A  B)  (A  C)) y(  A   B)  (B  A) yMore in the book.

4 Some Useful Equivalences zP  Q is equivalent to:  P  Q z  (P  Q) is equivalent to:  P   Q z  (P  Q) is equivalent to:  P   Q

5 Normal Forms zCNF = Conjunctive Normal Form zConjunction of disjuncts (each disjunct = “clause”) (P  Q)  R (P  Q)  R  (P  Q)  R  P   Q  R (  P   Q)  R (  P  R)  (  Q  R)

6 Resolution A  B  C,  C  D   E A  B  D   E zRefutation Complete yGiven an unsatisfiable KB in CNF, yResolution will eventually deduce the empty clause zProof by Contradiction yTo show   = Q yShow   {  Q} is unsatisfiable!

7 Knock Knock Resolution yJoe  Mike, ySally, y  Mike  Sally, y  Sally   Rita

8 Resolution Example prove P (A B C) (B) (  B D) (  C A D) (  D P Q) (  Q)

9 Computational Complexity zDetermining satisfiability is NP-complete. zEven when all clauses have at most 3 literals. zHence, also validity and entailment testing are NP-complete. zBut, some recent progress is encouraging! zIf all clauses have at most 2 literals, it is polynomial. zBut if the KB is in DNF, satisfiability is polynomial. yWhat does this tell us about transforming a CNF into a DNF knowledge base?

10 Horn Clauses zIf every sentence in KB is of the form: Then Modus Ponens is –Polynomial time, and –Complete! A  B  C ...  F  Z equivalently  A   B   C ...   F  Z Clause means a big disjunction At most one positive literal

11 Horn Rule Inference zBackward or forward chaining. yP  Q  S yP1  Q  S1 yR1  R2  Q yR1, R2, P.

12 Limitations of Prop. Logic zCumbersome for large domains: yMan-Abraham, Man-Isaac, Man-Jacob yWoman-Sara, Woman-Rachel, Woman-Leah yMan-Abraham  Human-Abraham yWoman-Sara  Human-Sara zCannot deal with infinite domains. zWe’d like to say: yAbraham, Sara etc. are objects. yfor all X, Man(X)  Human(X) yfor all n, Integer(n)  Integer(n+1).

13 First Order Logic (FOPC) zWe identify the objects in our domain. yAbraham, Sara, Isaac, Rachel, yFather-of(Isaac), Mother-of(Isaac). zPredicates specify properties of objects, and tuples of objects: yMan(Abraham), Woman(Sara), yMarried(Abraham, Sara). zQuantified formulas: y  X Man(X)  Human(X) y  X  Y Loves(Y,X).

14 FOL Definitions zConstants: a,b, dog33, Abraham. yName a specific object. zVariables: X, Y. yRefer to an object without naming it. zFunctions: dad-of yMapping from objects to objects. zTerms: father-of(mother-of(dog33)) yRefer to objects zAtomic Sentences: in(father-of(dog33), h1) yCan be true or false yCorrespond to propositional symbols P, Q

15 More Definitions zLogical connectives: , ,   zQuantifiers: y  Forall y  There exists zExamples yAbraham is a man. yAll professors wear glasses. yEvery person is loved by someone who isn’t their mother.

16 Quantifier / Connective Interaction z  x E(x)  G(x) yequivalent to  x E(x)   x G(x)? z  x E(x)  G(x) yequivalent to  x E(x)   x G(x)? z  x E(x)  G(x) z  x E(x)  G(x) z  x E(x)  G(x) E(x) == “x is an elephant” G(x) == “x has the color grey”

17 Nested Quantifiers: Order matters! zExamples yEvery dog has a tail ySomeone is loved by everyone  x  y P(x,y)   y  x P(x,y)

18 If your thesis is entirely vacuous, add a few formulas in predicate calculus. - famous disgruntled advisor

19 FOPC Semantics zAn interpretation includes: yA non-empty universe of discourse, O yA mapping from the constants to elements of O. yFor every function symbol of arity n, a mapping from O n to O. yFor every predicate symbol of arity n, a subset of O n. zWe can now define the truth value of every well formed formula.

20 Unification zUseful for first order inference  a,b city(a)  city(b)  connected(a,b) city(kent) city(seattle) zAlso for compilation zEmphasize variables with ? zUnify(x, y) return mgu yUnify(city(?a), city(kent)) returns ?a/kent

21 Unification Examples zUnify(road(?a, kent), road(seattle, ?b)) zUnify(road(?a, ?a), road(seattle, kent)) zUnify(f(g(?x, dog), ?y)), f(g(cat, ?y), dog) zUnify(f(g(?x)), f(?x))

22 Skolemization z  d  t dog(d)  connected(d, t) z  x  y person(y)  loves(y, x)