Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity.

Similar presentations


Presentation on theme: "1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity."— Presentation transcript:

1 1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity

2 2 Some KR Languages zPropositional Logic zPredicate Calculus zFrame Systems zRules with Certainty Factors zBayesian Belief Networks zInfluence Diagrams zSemantic Networks zConcept Description Languages zNonmonotonic Logic

3 3 Propositional Logic zSyntax yAtomic sentences: P, Q, … yConnectives: , , ,  zSemantics y Truth Tables zInference yModus Ponens yResolution ySoundness and completeness zComplexity issues.

4 4 Semantics zSyntax: a description of the legal arrangements of symbols (Def “sentences”) zSemantics: what the arrangement of symbols means in the world Sentences Facts Sentences Representation World Semantics Inference

5 5 Propsitional Logic: Syntax zAtoms zLiterals zSentences yAny literal is a sentence yIf S1 and S2 are sentences, then xThen (S1  S2) is a sentence xThen (S1  S2) is a sentence xThen (S1  S2) is a sentence xThen  S1 is a sentence

6 6 Propositional Logic: SEMANTICS zAn interpretation is an assignment to each variable either True or False. zAssignments to compound sentences are defined by the standard truth tables: zA propositional knowledge base says which sentences must be true in the world. P T T F F Q P T T F F Q P  Q P  Q  P T FF F F TT T T F Q P T F T F

7 7 Example Knowledge Base z(Smoke  fire) Alarm zAlarm

8 8 More Definitions zvalid = tautology = always true zsatisfiable = sometimes true zunsatisfiable = never true 1) smoke  fire 2) smoke  smoke 3) smoke  fire   fire 4)(smoke  fire)  (  smoke   fire)

9 9 Making Inferences zA knowledge base gives us partial information about the world: it constrains the world to a set of possible truth assignments. zBy inference, we decide what else holds in all of the truth assignments allowed by the knowledge base. zInference question: does KB  = S ?

10 10 Proof Procedures zTo decide whether KB  = S, we can try to look for a proof of S from KB. zA proof procedure is some algorithm that we apply to a KB to produce its logical consequences. zA proof uses: ythe knowledge base, yaxiom schemas yinference rules.

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

12 12 Modus Ponens zFrom A and A  B, infer B. 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.

13 13 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)

14 14 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!

15 15 Resolution Example prove P (A B C) (B) (  B D) (  C A D) (  D P Q) (  Q)

16 16 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 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?

17 17 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


Download ppt "1 AI=Knowledge Representation & Reasoning zSyntax zSemantics zInference Procedure yAlgorithm ySound? yComplete? yComplexity."

Similar presentations


Ads by Google