Propositional Logic Part 2 Yingyu Liang yliang@cs.wisc.edu - - PowerPoint PPT Presentation

propositional logic part 2
SMART_READER_LITE
LIVE PREVIEW

Propositional Logic Part 2 Yingyu Liang yliang@cs.wisc.edu - - PowerPoint PPT Presentation

Propositional Logic Part 2 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison slide 1 [Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu] Method 4: chaining with Horn clauses


slide-1
SLIDE 1

slide 1

Propositional Logic Part 2

Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison

[Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu]

slide-2
SLIDE 2

slide 2

Method 4: chaining with Horn clauses

  • Resolution is too powerful for many practical situations.
  • A weaker form: Horn clauses

▪ Disjunction of literals with at most one positive

  • R  P  Q

no

  • R   P  Q

yes ▪ What’s the big deal?

  • R   P  Q
  • (R  P)  Q

?

slide-3
SLIDE 3

slide 3

Horn clauses

  • R   P  Q
  • (R  P)  Q

(R  P)  Q Every rule in KB is in this form P (special case, no negative literals): fact

  • The big deal:

▪ KB easy for human to read ▪ Natural forward chaining and backward chaining algorithm, proof easy for human to read ▪ Deciding entailment with Horn clauses in time linear to KB size

  • But…

▪ Can only ask atomic queries

slide-4
SLIDE 4

slide 4

Forward chaining

  • Fire any rule whose premises are satisfied in the KB
  • Add its conclusion to the KB until query is found

KB: query: Q AND-OR graph AND OR

slide-5
SLIDE 5

slide 5

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-6
SLIDE 6

slide 6

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-7
SLIDE 7

slide 7

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-8
SLIDE 8

slide 8

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-9
SLIDE 9

slide 9

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-10
SLIDE 10

slide 10

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-11
SLIDE 11

slide 11

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-12
SLIDE 12

slide 12

Forward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-13
SLIDE 13

slide 13

Backward chaining

  • Forward chaining problem: can generate a lot of

irrelevant conclusions ▪ Search forward, start state = KB, goal test = state contains query

  • Backward chaining

▪ Reverse search from goal ▪ Find all implications of the form (…)  query ▪ Prove all the premises of one of these implications

slide-14
SLIDE 14

slide 14

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-15
SLIDE 15

slide 15

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-16
SLIDE 16

slide 16

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-17
SLIDE 17

slide 17

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-18
SLIDE 18

slide 18

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-19
SLIDE 19

slide 19

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-20
SLIDE 20

slide 20

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-21
SLIDE 21

slide 21

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-22
SLIDE 22

slide 22

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-23
SLIDE 23

slide 23

Backward chaining

P  Q L  M  P B  L  M A  P  L A  B  L A B

slide-24
SLIDE 24

slide 24

Forward vs. backward chaining

  • Forward chaining is data-driven

▪ May perform lots of work irrelevant to the goal

  • Backward chaining is goal-driven

▪ Appropriate for problem solving

  • Some form of bi-directional search is even better
slide-25
SLIDE 25

slide 25

What you should know

  • A lot of terms
  • Use truth tables
  • Proofs
  • Conjuctive Normal Form
  • Proofs with resolution
  • Horn clauses
  • Forward chaining algorithm
  • Backward chaining algorithm