Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 2 If your thesis is entirely vacuous, add a few formulas in predicate calculus. - famous disgruntled advisor

3 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 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 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 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 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 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 9 When is a formula satisfied? zDefine I |= S:

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

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


Download ppt "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."

Similar presentations


Ads by Google