pr propo opositional de defi finite e cla laus use e
play

Pr Propo opositional De Defi finite e Cla laus use e Log - PowerPoint PPT Presentation

Pr Propo opositional De Defi finite e Cla laus use e Log ogic: : Sy Synta tax, x, Se Seman anti tics s an and d Bo Bott ttom om-up p Proof oofs Com omputer Science c cpsc sc322, Lecture 2 20 (Te Text xtboo ook k


  1. Pr Propo opositional De Defi finite e Cla laus use e Log ogic: : Sy Synta tax, x, Se Seman anti tics s an and d Bo Bott ttom om-up p Proof oofs Com omputer Science c cpsc sc322, Lecture 2 20 (Te Text xtboo ook k Chpt 5.1.2 - 5.2.2 ) June, 6 6, 2 2017 CPSC 322, Lecture 20 Slide 1

  2. Lectu ture re Ov Overv rvie iew • Recap: p: Log ogic ic in intr tro • Propositional Definite Clause Logic: Semantics • PDCL: Bottom-up Proof CPSC 322, Lecture 20 Slide 2

  3. Log ogic ics s as as a a R&R &R s sys yste tem • for ormalize ze a dom omain • reaso son abou out it CPSC 322, Lecture 20 Slide 3

  4. Logic ics in in A AI: : Sim imil ilar ar s sli lide de to t the one fo for p pla lannin ing Propositional Definite Semantics and Proof Clause Logics Theory SatisfiabilityT esting (SA T) Propositional First-Order Logics Logics Description Hardware V erification Production Systems Logics Product Configuration Ontologies Cognitive Architectures Semantic Web Video Games Summarization T utoring Systems Information CPSC 322, Lecture 18 Slide 4 Extraction

  5. Pr Prop opos osit itio iona nal l (D (Def efin init ite e Cl Clau ause ses) s) Log ogic ic: Sy Synt ntax ax We start from a restricted form of Prop. Logic: Only two kinds of statements • that a proposition is true • that a proposition is true if one or more other propositions are true CPSC 322, Lecture 20 Slide 5

  6. Lectu ture re Ov Overv rvie iew • Recap: Logic intro • Propositional Definite Clause Logic: Semantics • PDCL: Bottom-up Proof CPSC 322, Lecture 20 Slide 6

  7. Propo posit itio ional al De Defi finit ite Cla Clauses Se Seman antic ics: : Interpr pretat atio ion Semantics allows you to relate the symbols in the logic to the domain you're trying to model. An at atom can be….. Definiti tion (inte terpreta tati tion) An interpretation I assigns a truth value to each atom. If your domain can be represented by four atoms (propositions): So an interpretation is just a………………………….. CPSC 322, Lecture 20 Slide 7

  8. PDC C Seman antic ics: Bo : Body dy We can use the interpretation to determine the truth value of clau auses and knowledge bas ases: Definiti tion (truth values of statements): A body b 1 ∧ b 2 is true in I if and only if b 1 is true in I and b 2 is true in I . p q r s I 1 true true true true I 2 false false false false I 3 true true false false I 4 true true true false I 5 true true false true CPSC 322, Lecture 20 Slide 8

  9. PDC C Seman antic ics: de : defi finit ite c cla lause Definiti tion (truth values of statements cont’ ): A rule h ← b is false in I if and only if b is true in I and h is false in I . p q r s I 1 true true true true I 2 false false false false I 3 true true false false I 4 true true true false ….. …. ….. …. .... In other words: ”if b is true I am claiming that h must be true, otherwise I am not making any claim” CPSC 322, Lecture 20 Slide 9

  10. PDC C Seman antic ics: Kn : Knowle ledg dge Bas ase ( (KB) • A knowledge base KB is true in I if and only if every clause in KB is true in I. p q r s I 1 true true false false Which of the three KB below are T rue in I 1 ? C A B p p p q ← r ∧ s r q s ← q ∧ p s ← q

  11. PDC C Seman antic ics: Kn : Knowle ledg dge Bas ase ( (KB) • A knowledge base KB is true in I if and only if every clause in KB is true in I. p q r s I 1 true true false false KB 3 KB 1 KB 2 p p p q ← r ∧ s r q s ← q ∧ p s ← q Which of the three KB above are True in I 1 ? KB 3

  12. PDC C Seman antic ics: Kn : Knowle ledg dge Bas ase Definiti tion ( truth values of statements cont’ ): A knowledge base KB is true in I if and only if every clause in KB is true in I . CPSC 322, Lecture 20 Slide 12

  13. Mode dels ls Definiti tion (model) A model of a set of clauses (a KB) is an interpretation in which all the clauses are true . CPSC 322, Lecture 20 Slide 13

  14. Exa xamp mple le: Mod odels ls   p q .    . KB q    r s . p q r s I 1 Which interpretations are true true true true models? I 2 false false false false I 3 true true false false I 4 true true true false I 5 true true false true CPSC 322, Lecture 20 Slide 14

  15. Logic ical al C Consequ quenc nce Definiti tion (logical al consequence) If KB is a set of clauses and G is a conjunction of atoms, G is a logical consequence of KB , written KB ⊧ G , if G is true in every model of KB . • we also say that G logically follows from KB , or that KB entails G . • In other words, KB ⊧ G if there is no interpretation in which KB is true and G is false . CPSC 322, Lecture 20 Slide 15

  16. Exa xamp mple le: Log ogic ical al Co Conse sequences p q r s   p q .  I 1 true true true true   . KB q I 2 true true true false    . r s I 3 true true false false I 4 true true false true I 5 false true true true I 6 false true true false I 7 false true false false I 8 false true false true …. … … … … Which of the following is true? • KB ⊧ q, KB ⊧ p, KB ⊧ s, KB ⊧ r CPSC 322, Lecture 20 Slide 16

  17. Lectu ture re Ov Overv rvie iew • Recap: Logic intro • Propositional Definite Clause Logic: Semantics • PDCL: Bottom-up Proof CPSC 322, Lecture 20 Slide 17

  18. On One si simp mple le way ay to to pro rove ve th that at G lo logi gical ally ly fo foll llow ows s fr from om a a KB KB • Collect all the models of the KB • Verify that G is true in all those models Any problem with this approach? • The goal of proof theory is to find proof procedures that allow us to prove that a logical formula follows form a KB avoiding the above CPSC 322, Lecture 20 Slide 18

  19. So Soundness ss an and Co Comp mple lete teness ss • If I tell you I have a proo oof proc ocedure for or PDCL • What do I need to show you in order for you to trust my procedure? • KB ⊦ G means G can be derived by my proof procedure from KB . • Recall KB ⊧ G means G is true in all models of KB . Definiti tion (soundness) A proof procedure is sound if KB ⊦ G implies KB ⊧ G . Definiti tion (complete teness) A proof procedure is complete if KB ⊧ G implies KB ⊦ G . CPSC 322, Lecture 20 Slide 19

  20. Bo Botto ttom-up Gro round Pro roof of Pro rocedure re One rule of derivation, a generalized form of mod odus s ponens : If “ h ← b 1 ∧ … ∧ b m ” is a clause in the knowledge base, and each b i has been derived, then h can be derived. You are forward chaining on this clause. (This rule also covers the case when m=0 . ) CPSC 322, Lecture 20 Slide 20

  21. Bo Botto ttom-up pro roof of pro rocedure re KB ⊦ G if G ⊆ C at the end of this procedure: C :={}; repe peat at sele lect clause “ h ← b 1 ∧ … ∧ b m ” in KB such that b i ∈ C for all i , and h ∉ C ; C := C ∪ { h } until il no more clauses can be selected. KB: e ← a ∧ b a b r ← f CPSC 322, Lecture 20 Slide 21

  22. Bo Botto ttom-up pro roof of pro rocedure re: Exa xamp mple le KB. z ← f ∧ e q ← f ∧ g ∧ z C :={}; e ← a ∧ b repeat at select t clause “ h ← b 1 ∧ … ∧ b m ” in KB such a that b i ∈ C for all i , and h ∉ C ; b C := C ∪ { h } unti til no more clauses can be selected. r f A. B. Slide 22 C. CPSC 322, Lecture 20

  23. Bo Botto ttom-up pro roof of pro rocedure re: Exa xamp mple le z ← f ∧ e q ← f ∧ g ∧ z C :={}; e ← a ∧ b repeat at select t clause “ h ← b 1 ∧ … ∧ b m ” in KB such a that b i ∈ C for all i , and h ∉ C ; b C := C ∪ { h } unti til no more clauses can be selected. r f CPSC 322, Lecture 20 Slide 23

  24. Bo Botto ttom-up pro roof of pro rocedure re: Exa xamp mple le z ← f ∧ e q ← f ∧ g ∧ z e ← a ∧ b C :={}; repeat at a select t clause “ h ← b 1 ∧ … ∧ b m ” in KB such b that b i ∈ C for all i , and h ∉ C ; C := C ∪ { h } r unti til no more clauses can be selected. f r? q? z? CPSC 322, Lecture 20 Slide 24

  25. Learning Goals for today’s class Yo You c can an: • Verify whether an in interpr pretat atio ion is a mode del of a PDCL KB. • Verify when a conjunction of atoms is a lo logic ical al consequ quence nce of a knowledge base. • Define/read/write/trace/debug the bo bottom-up p pr proof f pr procedu dure. CPSC 322, Lecture 4 Slide 25

  26. Ne Next xt cla lass ss (still section 5.2) • Soundness and Completeness of Bottom-up Proof Procedure • Using PDC Logic to model the electrical domain • Reasoning in the electrical domain CPSC 322, Lecture 20 Slide 26

  27. Stu Study y fo for r mi midte term rm (T (This is Thurs rs) Midterm: 6 short questions ( 8pts each ) + 2 problems ( 26pts each) • Study: textbook and inked slides • Work on al all practice exercises and revi vise as assignments ts! • While you revise the lear arning goal als, work on revi view questi tions t) I may even reuse some verbatim  (poste ted on Connect) • Also work on couple of problems (poste ted on Connect) t) from previous offering (maybe slightly more difficult) … but I’ll give you the solutions  CPSC 322, Lecture 20 Slide 27

Recommend


More recommend