CS486/686 Lecture Slides (c) 2008 P. Poupart
1
Propositional Logic CS 486/686 Sept 23, 2008 University of - - PowerPoint PPT Presentation
Propositional Logic CS 486/686 Sept 23, 2008 University of Waterloo 1 CS486/686 Lecture Slides (c) 2008 P. Poupart Outline Knowledge base Propositional logic Syntax and semantics Inference Backtracking (DPLL)
CS486/686 Lecture Slides (c) 2008 P. Poupart
1
CS486/686 Lecture Slides (c) 2008 P. Poupart
2
CS486/686 Lecture Slides (c) 2008 P. Poupart
3
CS486/686 Lecture Slides (c) 2008 P. Poupart
4
CS486/686 Lecture Slides (c) 2008 P. Poupart
5
CS486/686 Lecture Slides (c) 2008 P. Poupart
6
CS486/686 Lecture Slides (c) 2008 P. Poupart
7
CS486/686 Lecture Slides (c) 2008 P. Poupart
8
1 2 3 4 5
Ni = {English, Spaniard, Japanese, Italian, Norwegian} Ci = {Red, Green, White, Yellow, Blue} Di = {Tea, Coffee, Milk, Fruit-juice, Water} Ji = {Painter, Sculptor, Diplomat, Violinist, Doctor} Ai = {Dog, Snails, Fox, Horse, Zebra} The Englishman lives in the Red house The Spaniard has a Dog The Japanese is a Painter The Italian drinks Tea The Norwegian lives in the first house on the left The owner of the Green house drinks Coffee The Green house is on the right of the White house The Sculptor breeds Snails The Diplomat lives in the Yellow house The owner of the middle house drinks Milk The Norwegian lives next door to the Blue house The Violinist drinks Fruit juice The Fox is in the house next to the Doctor’s The Horse is next to the Diplomat’s
CS486/686 Lecture Slides (c) 2008 P. Poupart
9
CS486/686 Lecture Slides (c) 2008 P. Poupart
10
CS486/686 Lecture Slides (c) 2008 P. Poupart
11
1 2 3 4 1 2 3 4
CS486/686 Lecture Slides (c) 2008 P. Poupart
12
1 2 3 4 1 2 3 4
CS486/686 Lecture Slides (c) 2008 P. Poupart
13
CS486/686 Lecture Slides (c) 2008 P. Poupart
14
– define the “meaning” of each sentence – define the truth of each sentence with respect to each possible world
– a possible world – each possible configuration of the variables
– P, Q, R: 8 models (all possible configurations of P, Q and R) – 4-queens problem: 216 models – Street puzzle: 225 models
CS486/686 Lecture Slides (c) 2008 P. Poupart
15
models KB
α
models KB
α
models KB
α KB |= α KB |≠ α KB |≠ α
CS486/686 Lecture Slides (c) 2008 P. Poupart
16
CS486/686 Lecture Slides (c) 2008 P. Poupart
17
CS486/686 Lecture Slides (c) 2008 P. Poupart
18
CS486/686 Lecture Slides (c) 2008 P. Poupart
19
CS486/686 Lecture Slides (c) 2008 P. Poupart
20
– ¬(¬A) ≡ A – (A ⇒ B) ≡ ¬A ∨ B – (A ⇔ B) ≡ (A ⇒ B) ∧ (B ⇒ A) – ¬(A ∨ B) ≡ (¬A ∧ ¬B) – ¬(A ∧ B) ≡ (¬A ∨ ¬B) – (A ∨ (B ∧ C)) ≡ ((A ∨ B) ∧ (A ∨ C))
– No: last rule may yield exponentially many clauses
CS486/686 Lecture Slides (c) 2008 P. Poupart
21
CS486/686 Lecture Slides (c) 2008 P. Poupart
22
CS486/686 Lecture Slides (c) 2008 P. Poupart
23
CS486/686 Lecture Slides (c) 2008 P. Poupart
24
CS486/686 Lecture Slides (c) 2008 P. Poupart
25
number of satisfied clauses
CS486/686 Lecture Slides (c) 2008 P. Poupart
26
– Start with a variable configuration – Repeat until configuration satisfies KB
# of satisfied clauses if # of satisfied clauses increases
1-p, flip random variable.
CS486/686 Lecture Slides (c) 2008 P. Poupart
27
CS486/686 Lecture Slides (c) 2008 P. Poupart
28
CS486/686 Lecture Slides (c) 2008 P. Poupart
29