Propositional Logic and Resolution: Artificial Intelligence
Propositional Logic and Resolution: Artificial Intelligence
INT3401 21
Instructor: Nguyễn Văn Vinh, UET - Hanoi VNU
2020
5/4/2020
The Big Picture
General Search:
states are arbitrary
CSPs
structured states: vars ∊ domains
constraint propagation
Satisfiability:
variables ∊ {true, false}
Constraint Manipulation: constraints = logical formulae
cycle cutset; tree
decomposition
Constraint Manipulation:
resolution theorem proving
Wumpus World
Bij = breeze felt
G = gold
𝛂 ⇒ 𝛃 is equivalent to ¬𝛂 ∨ 𝛃
Says who?
𝛂 ⇔ 𝛃 is equivalent to (𝛂 ⇒ 𝛃) ∧ (𝛃 ⇒ 𝛂)
Prove it!
𝛂 𝛃 𝛂⇒𝛃 ¬𝛂 ¬𝛂 ∨ 𝛃
F F T T T
F T T T T
T F F F F
T T T F T
𝛂 𝛃 𝛂⇔ 𝛂 ⇒ 𝛃 𝛃 ⇒ 𝛂 (𝛂⇒𝛃) ∧ (𝛃⇒𝛂)
𝛃
F F T T T T
F T F T F F
T F F F T F
T T T T T T
Positive literal: P
Negative literal: ¬ P
Literals represent simple claims about the world.
Literal sentences are unary constraints on the
model.
¬P P = False
Constraints:
P2,1⇒ B1,1∧B2,2∧ B3,1
B2,1⇔ P1,1∨ P2,2 ∨P3,1
Constraints:
P2,1⇒ B1,1∧B2,2∧ B3,1
B2,1⇔ P1,1∨ P2,2 ∨P3,1
𝛂⇒𝛃 , 𝛂
____________________
𝛂∧𝛃
_______________
𝛂 , 𝛃
_______________
𝛂∧𝛃
Commutativity:
(𝛂 ∧ 𝛃) ≡ (𝛃 ∧ 𝛂)
(𝛂 ∨ 𝛃) ≡ (𝛃 ∨ 𝛂)
Associativity:
((𝛂 ∧ 𝛃) ∧ 𝛄) ≡ (𝛂 ∧ (𝛃 ∧ 𝛄))
((𝛂 ∨ 𝛃) ∨ 𝛄) ≡ (𝛂 ∨ (𝛃 ∨ 𝛄))
Double-negation elimination:
¬(¬𝛂) ≡ 𝛂
Contraposition:
(𝛂 ⇒ 𝛃) ≡ (¬𝛃 ⇒ ¬𝛂)
Implication elimination:
(𝛂 ⇒ 𝛃) ≡ (¬𝛂 ∨ 𝛃)
Biconditional elimination:
(𝛂 ⇔ 𝛃) ≡ ((𝛂 ⇒ 𝛃) ∧ (𝛃 ⇒ 𝛂))
De Morgan’s Laws:
¬ (𝛂 ∧ 𝛃) ≡ (¬𝛂 ∨ ¬𝛃)
¬ (𝛂 ∨ 𝛃) ≡ (¬𝛂 ∧ ¬𝛃)
Distributivity:
(𝛂 ∧ (𝛃 ∨ 𝛄)) ≡ ((𝛂 ∧ 𝛃) ∨ (𝛂 ∧ 𝛄))
(𝛂 ∨ (𝛃 ∧ 𝛄)) ≡ ((𝛂 ∨ 𝛃) ∧ (𝛂 ∨ 𝛄))
1 ¬ B1,1 Given
Soundness of I: if 𝛂 ⊦I 𝛃 then 𝛂 ⊧ 𝛃
Using I, we only derive entailed sentences.
“We don’t make stuff up.”
Completeness of I: if 𝛂 ⊧ 𝛃 then 𝛂 ⊦I 𝛃
All entailed sentences are derivable using I.
“If it’s true, we can deduce it.”
27 Nguyen Van Vinh – UET, VNU Hanoi 5/4/2020
Validity and Satisfiability
l1 ∨ l 2 ∨ … ∨ ln
Example:
(P ∨ ¬Q ∨ R) ∧ (Q ∨ S) ∧ (P ∨ ¬R ∨ T)
(a ∧ b) ∨ (c ∧ d) ∨ (e ∧ f) This sentence
happens to be in
DNF.
converts to
(a ∨ c ∨ e) ∧ (a ∨ c ∨ f) ∧
(a ∨ d ∨ e) ∧ (a ∨ d ∨ f) ∧
(b ∨ c ∨ e) ∧ (b ∨ c ∨ f) ∧
(b ∨ d ∨ e) ∧ (b ∨ d ∨ f) ∧
34 Nguyen Van Vinh – UET, VNU Hanoi 5/4/2020
The Resolution Inference Rule
l1 ∨ l2 ∨ … ∨ lk , m1 ∨ m2 ∨ … ∨ mn
________________________________________________________
l1 ∨ … ∨ li-1 ∨ li+1 ∨ … ∨ lk ∨
m1 ∨ … ∨ mj-1 ∨ mj+1 ∨ … ∨ mn
P1,1 ∨ P3,1
P , ¬P
_____________________
⃞
Not a horn
clause
Tautology
(useless)