1 / 19

Limitations of Prop. Logic

Limitations of Prop. Logic. Cumbersome for large domains: Man-Abraham, Man-Isaac, Man-Jacob Woman-Sara, Woman-Rachel, Woman-Leah Man-Abraham  Human-Abraham Woman-Sara  Human-Sara Cannot deal with infinite domains. We’d like to say: Abraham, Sara etc. are objects.

hisoki
Download Presentation

Limitations of Prop. Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Limitations of Prop. Logic • Cumbersome for large domains: • Man-Abraham, Man-Isaac, Man-Jacob • Woman-Sara, Woman-Rachel, Woman-Leah • Man-Abraham  Human-Abraham • Woman-Sara  Human-Sara • Cannot deal with infinite domains. • We’d like to say: • Abraham, Sara etc. are objects. • for all X, Man(X)  Human(X) • for 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) • We identify the objects in our domain. • Abraham, Sara, Isaac, Rachel, • Father-of(Isaac), Mother-of(Isaac). • Predicates specify properties of objects, and tuples of objects: • Man(Abraham), Woman(Sara), • Married(Abraham, Sara). • Quantified formulas: •  X Man(X)  Human(X) •  X  Y Loves(Y,X).

  4. FOL Definitions • Constants: a,b, dog33, Abraham. • Name a specific object. • Variables: X, Y. • Refer to an object without naming it. • Functions: dad-of • Mapping from objects to objects. • Terms: father-of(mother-of(dog33)) • Refer to objects • Atomic Sentences: in(father-of(dog33), h1) • Can be true or false • Correspond to propositional symbols P, Q

  5. More Definitions • Logical connectives: , ,  • Quantifiers: •  For all •  There exists • Examples • Abraham is a man. • All professors wear glasses. • Every person is loved by someone who isn’t their mother.

  6. Quantifier / Connective Interaction E(x) == “x is an elephant” G(x) == “x has the color grey” • x E(x)  G(x) • equivalent to x E(x)  x G(x)? • x E(x)  G(x) • equivalent to x E(x)  x G(x)? • x E(x) G(x) • x E(x)  G(x) • x E(x) G(x)

  7. Nested Quantifiers: Order matters! • Examples • Every dog has a tail • Someone is loved by everyone xy P(x,y) yx P(x,y)

  8. FOPC Semantics • An interpretation includes: • A non-empty universe of discourse, O • A mapping from the constants to elements of O. • For every function symbol of arity n, a mapping from O n to O. • For every predicate symbol of arity n, a subset of O n. • We can now define the truth value of every well formed formula. • If an interpretation I satisfies a formula S, we say that I is a model of S.

  9. When is a formula satisfied? • Define I |= S:

  10. Example •  X, Person(X)  (Man(X)  Woman(X)) • Person(Pam) •  Man(Pam) •  Woman(Rex)

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

  12. Decidability of Entailment • In general, deciding satisfiability (and hence, entailment) is semi-decidable. • It is decidable if every sentence has at most 2 variables, but undecidable with 3 or more. • Subsets of FOL are decidable: • No function symbols • Horn with no function symbols (a.k.a. Datalog) • Description Logics (Friday) • Resolution is refutation complete (but may go on forever with a satisfiable KB).

  13. Unification • Useful 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) • Queries: • path(a,b) • path(a,a) • path(a, parent(a)) • To 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 • Unify(road(?a, kent), road(seattle, ?b)) • Unify(road(?a, ?a), road(seattle, kent)) • Unify(f(g(?x, dog), ?y)), f(g(cat, ?y), dog) • Unify(f(g(?x)), f(?x))

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

  16. A  B  C, C D  E A  B  D  E Resolution • First, convert all formulas to CNF (possibly Skolemizing). • Negate the query. • Iterate: • Let f be the mgu of C and C • Then, we can derive the clause • f(A)  f(B)  f(D)  f(E)

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

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

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

More Related