Download presentation
Presentation is loading. Please wait.
1
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 only correct consequences. zA proof procedure is complete if: yIf KB |= S, then KB |- S. yThat is, the procedure produces all the consequences. zIdeally, the procedure should be sound and complete. (Ideals are nice in theory).
2
2 Knock Knock Logic zWho’s there? yJoe Mike, Sally zBackground knowledge: yMike => Sally y Sally Rita zHence?
3
3 Modus Ponens zFrom A and A B, infer B. zA and B can be any sentence. zModus ponens with a few axiom schemas is sound and complete: y A (B A) yA (B C) ((A B) (A C)) y( A B) (B A) yMore in the book.
4
4 Some Useful Equivalences zP Q is equivalent to: P Q z (P Q) is equivalent to: P Q z (P Q) is equivalent to: P Q
5
5 Normal Forms zCNF = Conjunctive Normal Form zConjunction of disjuncts (each disjunct = “clause”) (P Q) R (P Q) R (P Q) R P Q R ( P Q) R ( P R) ( Q R)
6
6 Resolution A B C, C D E A B D E zRefutation Complete yGiven an unsatisfiable KB in CNF, yResolution will eventually deduce the empty clause zProof by Contradiction yTo show = Q yShow { Q} is unsatisfiable!
7
7 Knock Knock Resolution yJoe Mike, ySally, y Mike Sally, y Sally Rita
8
8 Resolution Example prove P (A B C) (B) ( B D) ( C A D) ( D P Q) ( Q)
9
9 Computational Complexity zDetermining satisfiability is NP-complete. zEven when all clauses have at most 3 literals. zHence, also validity and entailment testing are NP-complete. zBut, some recent progress is encouraging! zIf all clauses have at most 2 literals, it is polynomial. zBut if the KB is in DNF, satisfiability is polynomial. yWhat does this tell us about transforming a CNF into a DNF knowledge base?
10
10 Horn Clauses zIf every sentence in KB is of the form: Then Modus Ponens is –Polynomial time, and –Complete! A B C ... F Z equivalently A B C ... F Z Clause means a big disjunction At most one positive literal
11
11 Horn Rule Inference zBackward or forward chaining. yP Q S yP1 Q S1 yR1 R2 Q yR1, R2, P.
12
12 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).
13
13 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).
14
14 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
15
15 More Definitions zLogical connectives: , , zQuantifiers: y Forall y There exists zExamples yAbraham is a man. yAll professors wear glasses. yEvery person is loved by someone who isn’t their mother.
16
16 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”
17
17 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)
18
18 If your thesis is entirely vacuous, add a few formulas in predicate calculus. - famous disgruntled advisor
19
19 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.
20
20 Unification zUseful for first order inference a,b city(a) city(b) connected(a,b) city(kent) city(seattle) zAlso for compilation zEmphasize variables with ? zUnify(x, y) return mgu yUnify(city(?a), city(kent)) returns ?a/kent
21
21 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))
22
22 Skolemization z d t dog(d) connected(d, t) z x y person(y) loves(y, x)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.