DOC PREVIEW
UCI ICS 171 - Lec 8 Predicate Logic or FOL

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Predicate Logic or FOLPropositional Logic can’t saySyntaxTermGoldbach’s ConjectureSemanticsRepresenting World in FOLSlide 8Negating QuantifiersMore TranslationsUnificationMost General Unifier (MGU)Occurs CheckingModeling with Definite Clauses: at most one positive literalProve: West is a criminalForward ChainingResolution gives forward chainingBackward ChainingResolution yeilds Backward ChainingResolution is non-directionalFOL -> Conjuctive Normal FormSkolemizationResolution in CNFResultsLimitationsSituation Calculus/PlanningBlocks World ExampleMore ExtensionsTimeSpace and moreExample QuestionsExpert Systems: Engineering ApproachMycin: by Shortliffe 1976SoyBean Disease DiagnosisPredicate Logic or FOLChapter 8Propositional Logic can’t say•If X is married to Y, then Y is married to X.•If X is west of Y, and Y is west of Z, then X is west of Z.•And a million other simple things.•Fix: –extend representation: add predicates–Extend operator(resolution): add unificationSyntax•See text for formal rules.•All of propositional + quantifiers, predicates, functions, and constants.•Variables can take on values of constants or terms.•Term = reference to object•Variables not allowed to be predicates.–E.G. What is the relationship between Bill and Hillary?•Text Notation: variables lower case, constants upper•Prolog Notation: variables are upper case, etcTerm•A term with no variables is a ground term.•Composite Objection: function of terms or primitives–Convenience: we don’t want to name all objects–e.g. nounphrase(det(the),adj(tall),noun(tree)).–E.g. leftLeg(John).–Successor of 1 may be s(1), but we write 2.–Successor of 2 s(s(1)), but we write 3.Goldbach’s Conjecture•For all n, if integer(n), even(n), greater(n,2) then there exists p1, p2, integer(p1), integer(p2), prime(p1),prime(p2), and equals(n,sum(p1,p2)).•Quantifiers: for all, there exists•Predicates: integer, greater, prime, even, equals.•Constants: 2•Functions: sum.Semantics•Validity = true in every model and every interpretation. •Interpretation = mapping of constants, predicates, functions into objects, relations, and functions.•For Goldbach wrt to standard integer model: interpretation = mapping n to an even integer. (Context).Representing World in FOL•All kings are persons.  goes to?•for all x, King(x) & Person(x). •for all x, King(x) => Person(x).Representing World in FOL•All kings are persons.•for all x, King(x) => Person(x). OK.•for all x, King(x) & Person(x). Not OK.–this says every object is a king and a person.•In Prolog: person(X) :- king(X).•Everyone Likes icecream.•for all x, Likes(x, icecream).Negating Quantifiers•~ there exist x, P(x)•~ for all x, P(x)For all x, Likes(x,Icecream)No one likes liver.For all x, not Likes(x,Liver)•For all x, ~P(x)•There exists x, ~P(x)•There does not exist an x, not Likes(x,Icecream)•Not there exists x, Iikes(x,Liver).More Translations•Everyone loves someone.•There is someone that everyone loves.•Everyone loves their father.•See text.•For all x, there is a y(x) such that Loves(x,y(x)).•There is an M such that for all x, Loves(x,M).•M is skolem constant•For all x, Loves(x,Father(x)).•Father(x) is skolem function.Unification•If p and q are logical expressions, then Unify(p,q) = Substitution List S if using S makes p and q identical or fail.•Standardize apart: before unifying, make sure that p and q contain different variable names.Most General Unifier (MGU)•f(X,g(Y)) unifies with f(g(Z),U) with substitutions {X/g(a), Y/b, U/g(b), Z/b}.•But also if {X/g(Z), U/g(Y)}. •The MGU is unique up to renaming of variables. •All other unifiers are unify with the MGU.•Use Prolog with = for unification.Occurs Checking•When unifying a variable against a complex term, the complex term should not contain the same variable, else non-match.•Prolog doesn’t check this.• Ex. f(X,X) and f(Y,g(Y)) should not unify.Modeling with Definite Clauses: at most one positive literal1. It is a crime for an american to sell weapons to a hostile country.1’. American(x)&Weapons(y)&Hostile(z) & Sell(x,y,z) => Criminal (x).2. The country Nono has some missiles. There exists x Owns(Nono,x)&Missile(x). 2’. Missile(M1). … Skolem Constant introduction2’’. Owns(Nono,M1).Prove: West is a criminal3. All of its missiles where sold to it by Colonel West.3’. Missile(x)&Owns(Nono,x) => Sells(West,x,Nono).4’. Missile(x) => Weapon(x). .. “common sense”5’. Enemy(x,America) => Hostile(x).6’. American(West).7’. Enemy(Nono,American).Forward Chaining•Start with facts and apply rules until no new facts appear. Apply means use substitutions.•Iteration 1: using facts. •Missile(M1),American(West), Owns(Nono,M1), Enemy(Nono,America)•Derive: Hostile(Nono), Weapon(M1), Sells(West,M1,Nono).•Next Iteration: Criminal(West).•Forward chaining ok if few facts and rules, but it is undirected.Resolution gives forward chaining•Enemy(x,America) =>Hostile(x)•Enemy(Nono,America)•|- Hostile(Nono)•Not Enemy(x,America) or Hostile(x)•Enemy(Nono,America)•Resolve by {x/Nono}•To Hostile(Nono)Backward Chaining•Start with goal, Criminal(West) and set up subgoals. This ends when all subgoals are validated.•Iteration 1: subgoals American(x), Weapons(y) and Hostile(z).•Etc. Eventually all subgoals unify with facts.Resolution yeilds Backward Chaining•A(x) &W(y)&H(z)& S(x,y,z) =>C(x)•-A(x) or –W(y) or –H(z) or –S(x,y,z) or C(x).•Add goal –C(West).•Yields –A(West) or -W(y) or –H(z) or-S(West,y,z). Etc.Resolution is non-directional•Both a power (inference representation) and a weakness (no guidance in search)•-a or –b or –c or d or e equals•a,b,c =>d or e and•a,b,c, -d => e etc.•Prolog forces directionality and results in an incomplete theorem prover.FOL -> Conjuctive Normal Form•Similar to process for propositional logic, but•Use negations rules for quantifiers•Standarize variables apart•Universal quantification is implicit.•Skolemization: introduction of constants and functions to remove existential quantifiers.Skolemization•Introduction of constants or functions when removing existential quantifier.•There exists an x such that P(x) becomes: P(A) for some new constant symbol A.•Everyone has someone who loves him •For all x, Loves(F(x),x) where F(x) is a new function.Resolution in CNF•Just like


View Full Document

UCI ICS 171 - Lec 8 Predicate Logic or FOL

Documents in this Course
Prolog

Prolog

16 pages

PROJECT

PROJECT

3 pages

Quiz 6

Quiz 6

9 pages

Load more
Download Lec 8 Predicate Logic or FOL
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lec 8 Predicate Logic or FOL and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lec 8 Predicate Logic or FOL 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?