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.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

First-Order Logic Chapter 8.
First-Order Logic.
First-order Logic.
The Logic of Quantified Statements
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"
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
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.
Predicate Calculus Russell and Norvig: Chapter 8,9.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
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.
Inference and Resolution for Problem Solving
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity.
Knowledge Representation III First-Order Logic
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
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.
Predicate Calculus.
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
FIRST ORDER LOGIC Levent Tolga EREN.
1st-order Predicate Logic (FOL)
UIUC CS 497: Section EA Lecture #3 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Knowledge Representation IV Inference for First-Order Logic CSE 473.
First Order Predicate Logic
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
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.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
Bertram Ludäscher Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies in Data Integration.
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.
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.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
First-Order Logic. Outline Why FOL? Syntax and semantics of FOL Using FOL Knowledge engineering in FOL.
First-Order Logic Daniel Weld CSE 473 Spring 2012.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
© Daniel S. Weld Topics Agency Problem Spaces SearchKnowledge Representation Planning PerceptionNLPMulti-agentRobotics Uncertainty MDPs Supervised.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Syntax of First-Order Predicate Calculus (FOPC): 1. Alphabet Countable set of predicate symbols, each with specified arity  0. Countable set of function.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
6/11/2016 Linear Resolution and Introduction to First Order Logic Michael Leuschel Softwaretechnik und Programmiersprachen Lecture 5.
Announcements  Upcoming due dates  Thursday 10/1 in class Midterm  Coverage: everything in lecture and readings except first-order logic; NOT probability.
Knowledge Representation III First-Order Logic
The function of knowledge representation scheme is
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.
Knowledge Representation III First-Order Logic
1st-order Predicate Logic (FOL)
Horn Clauses and Unification
Chapter 8, Part 1 First Order Predicate Calculus FOPC
1st-order Predicate Logic (FOL)
Presentation transcript:

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 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).

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

3 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).

4 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

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

6 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”

7 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)

8 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. zIf an interpretation I satisfies a formula S, we say that I is a model of S.

9 When is a formula satisfied? zDefine I |= S:

10 Example z  X, Person(X)  (Man(X)  Woman(X)) zPerson(Pam) z  Man(Pam) z  Woman(Rex)

11 Entailment (first order) zA knowledge base KB entails a sentence S, if S is satisfied in model of KB: yFor every I, if I |= KB, then I |= S. zUnlike propositional logic, we cannot exhaustively check every interpretation. zSatisfiability and validity of a knowledge base are defined as before. zKB |= S if and only if {KB   S} is not satisfiable.

12 Decidability of Entailment zIn general, deciding satisfiability (and hence, entailment) is semi-decidable. zIt is decidable if every sentence has at most 2 variables, but undecidable with 3 or more. zSubsets of FOL are decidable: yNo function symbols yHorn with no function symbols (a.k.a. Datalog) yDescription Logics (Friday) zResolution is refutation complete (but may go on forever with a satisfiable KB).

13 Unification zUseful for first order inference  x,y,z edge(x,z)  path(z,y)  path(x,y)  x,y edge(x,y)  edge(y,x)  path(x,x) zQueries: ypath(a,b) ypath(a,a) ypath(a, parent(a)) zTo determine which rules are applicable, we need to unify the query and the rule heads. Unify(path(a,b), path(x,y)) returns:

14 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))

15 Skolemization zWe want to transform formulas to a canonical form:  X,Y,Z {P(X)  Q(Y)  R(Z,Y)} zSometimes, it’s easy:  x,y,z edge(x,z)  path(z,y)  path(x,y) y{  edge(x,z),  path(z,y), path(x,y) } zWhat about:  X, Woman(X) ? yWe invent a new Skolem constant: yWoman (the-woman). zHow about  Y  X Loves(X,Y)? yLoves(f(Y), Y).

16 Resolution A  B  C,  C  D   E A  B  D   E zFirst, convert all formulas to CNF (possibly Skolemizing). zNegate the query. zIterate:  Let  be the mgu of C and  C yThen, we can derive the clause   (A)   (B)   (D)   (  E)

17 Example Resolution z  X  (Dem(X)  Rep(X)) z  X (Dem(X)  Rep(X)) z  X Rep(X)   Z (Know(X,Z)  Rep(Z)) z  X Know(A,Z)  Dem(Z) zQuery: Dem(A)?

18 Example Resolution: Clauses z  X  (Dem(X)  Rep(X)) y{  Dem(X),  Rep(X)} z  X (Dem(X)  Rep(X)) y{Dem(X), Rep(X)} z  X Rep(X)   Z (Know(X,Z)  Rep(Z)) y{  Rep(X), Know(x, f(x)}, {  Rep(X), Rep(f(X)} z  X Know(A,Z)  Dem(Z) y{  Know(A,Z), Dem(Z)} zDem(A)? y{  Dem(A)}

19 Example: Resolve Away... z {  Dem(X),  Rep(X)} z{Dem(X), Rep(X)} z{  Rep(X), Know(x, f(x)}, z{  Rep(X), Rep(f(X)} z{  Know(A,Z), Dem(Z)} z{  Dem(A)}