1 / 15

CS 2710, ISSP 2610

CS 2710, ISSP 2610. Chapter 8, Part 1 First Order Predicate Calculus FOPC. Propositional Logic to FOPC. B11  (P12 v P21) B23  (P32 v P 23 v P34 v P 43) … “Internal squares adjacent to pits are breezy”: All X Y (B(X,Y) ^ (X > 1) ^ (Y > 1) ^ (Y < 4) ^ (X < 4)) 

callum
Download Presentation

CS 2710, ISSP 2610

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. CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC

  2. Propositional Logic to FOPC B11  (P12 v P21) B23  (P32 v P 23 v P34 v P 43) … “Internal squares adjacent to pits are breezy”: All X Y (B(X,Y) ^ (X > 1) ^ (Y > 1) ^ (Y < 4) ^ (X < 4))  (P(X-1,Y) v P(X,Y-1) v P(X+1,Y) v (X,Y+1))

  3. FOPC Worlds • Rather than just T,F, now worlds contain: • Objects: the gold, the wumpus, people, ideas, … “the domain” • Predicates: holding, breezy, red, sisters • Functions: fatherOf, colorOf, plus Ontological commitment

  4. FOPC Syntax • Add variables and quantifiers to propositional logic

  5. Sentence  AtomicSentence | ComplexSentence AtomicSentence  Predicate(Term,…) | Term = Term Term  Function(Term,…) |Constant |Variable ComplexSentence  (Sentence) | ~Sentence | Sentence ^ Sentence | Sentence v Sentence | Sentence  Sentence | Sentence  Sentence| Quantifier Variable, … Sentence Quantifier  all, exists Constant  john, 1, … Variable  A, B, C, X Predicate  breezy, sunny, red Function  fatherOf, plus Knowledge engineering involves devising the constants, predicates, and functions for your problem

  6. Examples • Everyone likes chocolate • X (person(X)  likes(X, chocolate)) • Someone likes chocolate • X (person(X) ^ likes(X, chocolate)) • Everyone likes chocolate unless they are allergic to it • X (person(X)  (likes(X, chocolate)  allergic(X, chocolate))) • X ((person(X) ^ allergic (X, chocolate))  likes(X, chocolate)) [Messy sentence on board]

  7. Quantifiers • All X p(X) means that p holds for all elements in the domain • Exists X p(X) means that p holds for at least one element of the domain

  8. All • Usually used with implications • All X (student(X,CS2710)  smart(X)) • NOT usually: • All X (student(X,CS2710) ^ smart(X))

  9. Exists • Usually used with ^ to specify information about individuals • Exists X (student(X,CS2710) ^ smart (X) ^ speaks(X,klingon)) • NOT usually: • Exists X (student(X,CS2710)  (smart(X) ^ speaks(X,klingon))) • [Very weak statement! ]

  10. Quantification and Negation • ~(all X p(X)) equiv exists X ~p(X) • ~(exists X p(X)) equiv all X ~p(X)

  11. Nesting of Variables Put quantifiers in front of likes(P,F) Assume the domain of discourse of P is the set of people Assume the domain of discourse of F is the set of foods • Everyone likes some kind of food • There is a kind of food that everyone likes • Someone likes all kinds of food • Every food has someone who likes it

  12. Answers(DOD of P is people and F is food) Everyone likes some kind of food All P Exists F likes(P,F) There is a kind of food that everyone likes Exists F All P likes(P,F) Someone likes all kinds of food Exists P All F likes(P,F) Every food has someone who likes it All F Exists P likes(P,F)

  13. Full Answers (without Domain of Discourse Assumptions) Everyone likes some kind of food All P (person(P)  Exists F (food(F) and likes(P,F))) There is a kind of food that everyone likes Exists F (food(F) and (All P (person(P)  likes(P,F)))) Someone likes all kinds of food Exists P (person(P) and (All F (food(F)  likes(P,F)))) Every food has someone who likes it All F (food (F)  Exists P (person(P) and likes(P,F)))

  14. Semantics of FOPC • Interpretation: assignment of elements from the world to elements of the language • The world consists of a domain ofobjects D, a set of predicates, and a set of functions

  15. Semantics • Each constant is assigned an element of the domain • Each N-ary predicate is assigned a set of N-tuples [which are?] • Each N-ary function symbol is assigned a set of N+1 tuples that does not include any pair of tuples that have the first N elements but different (n+1)st elements

More Related