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
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

CPSC 322, Lecture 20 Slide 1

Pr Propo

  • positional De

Defi finite e Cla laus use e Log

  • gic:

: Sy

Synta tax, x, Se Seman anti tics s an and d Bo Bott ttom

  • m-up

p Proof

  • ofs

Com

  • mputer Science c

cpsc sc322, Lecture 2 20 (Te Text xtboo

  • ok

k Chpt 5.1.2 - 5.2.2 )

June, 6 6, 2 2017

slide-2
SLIDE 2

CPSC 322, Lecture 20 Slide 2

Lectu ture re Ov Overv rvie iew

  • Recap:

p: Log

  • gic

ic in intr tro

  • Propositional Definite Clause Logic:

Semantics

  • PDCL: Bottom-up Proof
slide-3
SLIDE 3

CPSC 322, Lecture 20 Slide 3

Log

  • gic

ics s as as a a R&R &R s sys yste tem

  • for
  • rmalize

ze a dom

  • main
  • reaso

son abou

  • ut it
slide-4
SLIDE 4

CPSC 322, Lecture 18 Slide 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 Logics First-Order Logics Propositional Definite Clause Logics Semantics and Proof Theory SatisfiabilityT esting (SA T) Description Logics Cognitive Architectures Video Games Hardware V erification Product Configuration Ontologies Semantic Web Information Extraction Summarization Production Systems T utoring Systems

slide-5
SLIDE 5

CPSC 322, Lecture 20 Slide 5

Pr Prop

  • pos
  • sit

itio iona nal l (D (Def efin init ite e Cl Clau ause ses) s) Log

  • gic

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

slide-6
SLIDE 6

CPSC 322, Lecture 20 Slide 6

Lectu ture re Ov Overv rvie iew

  • Recap: Logic intro
  • Propositional Definite Clause Logic:

Semantics

  • PDCL: Bottom-up Proof
slide-7
SLIDE 7

CPSC 322, Lecture 20 Slide 7

Propo posit itio ional al De Defi finit ite Cla Clauses Se Seman antic ics: : Interpr pretat atio ion

Definiti tion (inte terpreta tati tion) An interpretation I assigns a truth value to each atom. Semantics allows you to relate the symbols in the logic to the domain you're trying to model. An at atom can be….. If your domain can be represented by four atoms (propositions): So an interpretation is just a…………………………..

slide-8
SLIDE 8

CPSC 322, Lecture 20 Slide 8

PDC C Seman antic ics: Bo : Body dy

Definiti tion (truth values of statements): A body b1 ∧ b2 is true in I if and only if b1 is true in I and b2 is true in I. We can use the interpretation to determine the truth value of clau auses and knowledge bas ases: p q r s I1 true true true true I2 false false false false I3 true true false false I4 true true true false I5 true true false true

slide-9
SLIDE 9

CPSC 322, Lecture 20 Slide 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. In other words: ”if b is true I am claiming that h must be true,

  • therwise I am not making any claim”

p q r s I1 true true true true I2 false false false false I3 true true false false I4 true true true false ….. …. ….. …. ....

slide-10
SLIDE 10

PDC C Seman antic ics: Kn : Knowle ledg dge Bas ase ( (KB)

p q r s I1 true true false false p r s ← q ∧ p p q s ← q p q ← r ∧ s

A B C Which of the three KB below are T rue in I1 ?

  • A knowledge base KB is true in I if and only if

every clause in KB is true in I.

slide-11
SLIDE 11

PDC C Seman antic ics: Kn : Knowle ledg dge Bas ase ( (KB)

p q r s I1 true true false false

p r s ← q ∧ p p q s ← q p q ← r ∧ s

KB1 KB2 KB3 Which of the three KB above are True in I1 ?KB3

  • A knowledge base KB is true in I if and only if

every clause in KB is true in I.

slide-12
SLIDE 12

CPSC 322, Lecture 20 Slide 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.

slide-13
SLIDE 13

CPSC 322, Lecture 20 Slide 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.

slide-14
SLIDE 14

CPSC 322, Lecture 20 Slide 14

Exa xamp mple le: Mod

  • dels

ls

        . . . s r q q p KB Which interpretations are models? p q r s I1 true true true true I2 false false false false I3 true true false false I4 true true true false I5 true true false true

slide-15
SLIDE 15

CPSC 322, Lecture 20 Slide 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.

slide-16
SLIDE 16

CPSC 322, Lecture 20 Slide 16

Exa xamp mple le: Log

  • gic

ical al Co Conse sequences

        . . . s r q q p KB

p q r s I1 true true true true I2 true true true false I3 true true false false I4 true true false true I5 false true true true I6 false true true false I7 false true false false I8 false true false true

…. … … …

Which of the following is true?

  • KB ⊧ q, KB ⊧ p, KB ⊧ s, KB ⊧ r
slide-17
SLIDE 17

CPSC 322, Lecture 20 Slide 17

Lectu ture re Ov Overv rvie iew

  • Recap: Logic intro
  • Propositional Definite Clause Logic:

Semantics

  • PDCL: Bottom-up Proof
slide-18
SLIDE 18

CPSC 322, Lecture 20 Slide 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

  • ws

s fr from

  • m 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

slide-19
SLIDE 19

CPSC 322, Lecture 20 Slide 19

So Soundness ss an and Co Comp mple lete teness ss

  • If I tell you I have a proo
  • of proc
  • cedure for
  • r PDCL
  • What do I need to show you in order for you to trust

my procedure?

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.

  • 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.
slide-20
SLIDE 20

CPSC 322, Lecture 20 Slide 20

Bo Botto ttom-up Gro round Pro roof

  • f Pro

rocedure re

One rule of derivation, a generalized form of mod

  • dus

s ponens: If “h ← b1 ∧ … ∧ bm” is a clause in the knowledge base, and each bi has been derived, then h can be derived. You are forward chaining on this clause. (This rule also covers the case when m=0. )

slide-21
SLIDE 21

CPSC 322, Lecture 20 Slide 21

Bo Botto ttom-up pro roof

  • f pro

rocedure re

KB ⊦ G if G ⊆ C at the end of this procedure: C :={}; repe peat at sele lect clause “h ← b1 ∧ … ∧ bm” in KB such that bi ∈ 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

slide-22
SLIDE 22

CPSC 322, Lecture 20 Slide 22

Bo Botto ttom-up pro roof

  • f pro

rocedure re: Exa xamp mple le

z ← f ∧ e q ← f ∧ g ∧ z e ← a ∧ b a b r f

C :={}; repeat at select t clause “h ← b1 ∧ … ∧ bm” in KB such that bi ∈ C for all i, and h ∉ C; C := C ∪ { h } unti til no more clauses can be selected.

A. B. C. KB.

slide-23
SLIDE 23

CPSC 322, Lecture 20 Slide 23

Bo Botto ttom-up pro roof

  • f pro

rocedure re: Exa xamp mple le

z ← f ∧ e q ← f ∧ g ∧ z e ← a ∧ b a b r f

C :={}; repeat at select t clause “h ← b1 ∧ … ∧ bm” in KB such that bi ∈ C for all i, and h ∉ C; C := C ∪ { h } unti til no more clauses can be selected.

slide-24
SLIDE 24

CPSC 322, Lecture 20 Slide 24

Bo Botto ttom-up pro roof

  • f pro

rocedure re: Exa xamp mple le

z ← f ∧ e q ← f ∧ g ∧ z e ← a ∧ b a b r f r? q? z?

C :={}; repeat at select t clause “h ← b1 ∧ … ∧ bm” in KB such that bi ∈ C for all i, and h ∉ C; C := C ∪ { h } unti til no more clauses can be selected.

slide-25
SLIDE 25

CPSC 322, Lecture 4 Slide 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.

slide-26
SLIDE 26

CPSC 322, Lecture 20 Slide 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
slide-27
SLIDE 27

CPSC 322, Lecture 20 Slide 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 (poste ted on Connect) t) I may even reuse some verbatim 

  • 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 

slide-28
SLIDE 28

midte term rm (T (This s Thurs rs)

  • Midterm on June 8 – first block of class
  • Search
  • CSP
  • SLS
  • Planning
  • Possibly simple/minimal intro to logics

CPSC 322, Lecture 20 Slide 28