CSC266 · 2078 · 10 marks
Consider following facts: Every traffic chases driver. Every driver who horns is smart. No traffic catches any smart driver. Any traffic who chases some driver but does not catch him frusted. Now configure FoPL knowledge base for above statements. Use resolution algorithm to draw a conclusion that “
Consider following facts: Every traffic chases driver. Every driver who horns is smart. No traffic catches any smart driver. Any traffic who chases some driver but does not catch him frusted. Now configure FoPL knowledge base for above statements. Use resolution algorithm to draw a conclusion that “If all drivers horn, then all traffics are frusted.”[10]
Quick answer
Using Skolemization (replace existential variables with constants a and b).
Resolution Algorithm: Proving "If All Drivers Horn, Then All Traffics Are Frustrated"
Step 1: Identify the Facts and Convert to FoPL (First Order Predicate Logic)
Let us define the predicates:
Traffic(x): x is a trafficDriver(x): x is a driverHorns(x): x hornsSmart(x): x is smartChases(x, y): x chases yCatches(x, y): x catches yFrustrated(x): x is frustrated
FoPL Knowledge Base
| # | Natural Language Statement | FoPL Formula |
|---|---|---|
| F1 | Every traffic chases (every) driver | ∀x ∀y [Traffic(x) ∧ Driver(y) → Chases(x, y)] |
| F2 | Every driver who horns is smart | ∀x [Driver(x) ∧ Horns(x) → Smart(x)] |
| F3 | No traffic catches any smart driver | ∀x ∀y [Traffic(x) ∧ Smart(y) → ¬Catches(x, y)] |
| F4 | Any traffic who chases some driver but does not catch him is frustrated | ∀x ∀y [Traffic(x) ∧ Driver(y) ∧ Chases(x,y) ∧ ¬Catches(x,y) → Frustrated(x)] |
Goal (to prove):
If all drivers horn, then all traffics are frustrated.
∀x ∀y [Driver(y) ∧ Horns(y) ∧ Traffic(x) → Frustrated(x)]
Step 2: Convert All Statements to Conjunctive Normal Form (CNF) / Clause Form
Using the implication elimination rule: A → B ≡ ¬A ∨ B
C1 (from F1):
∀x ∀y [Traffic(x) ∧ Driver(y) → Chases(x, y)]
≡ ¬Traffic(x) ∨ ¬Driver(y) ∨ Chases(x, y)
C2 (from F2):
∀x [Driver(x) ∧ Horns(x) → Smart(x)]
≡ ¬Driver(x) ∨ ¬Horns(x) ∨ Smart(x)
C3 (from F3):
∀x ∀y [Traffic(x) ∧ Smart(y) → ¬Catches(x, y)]
≡ ¬Traffic(x) ∨ ¬Smart(y) ∨ ¬Catches(x, y)
C4 (from F4):
∀x ∀y [Traffic(x) ∧ Driver(y) ∧ Chases(x,y) ∧ ¬Catches(x,y) → Frustrated(x)]
≡ ¬Traffic(x) ∨ ¬Driver(y) ∨ ¬Chases(x,y) ∨ Catches(x,y) ∨ Frustrated(x)
Step 3: Negate the Goal (for Proof by Refutation / Resolution)
The goal to prove:
∀x ∀y [Traffic(x) ∧ Driver(y) ∧ Horns(y) → Frustrated(x)]
Negate the goal:
¬[∀x ∀y (Traffic(x) ∧ Driver(y) ∧ Horns(y) → Frustrated(x))]
≡ ∃x ∃y [Traffic(x) ∧ Driver(y) ∧ Horns(y) ∧ ¬Frustrated(x)]
Using Skolemization (replace existential variables with constants a and b):
C5: Traffic(a)
C6: Driver(b)
C7: Horns(b)
C8: ¬Frustrated(a)
Step 4: Apply Resolution Algorithm
We now have the clause set:
C1: ¬Traffic(x) ∨ ¬Driver(y) ∨ Chases(x, y)
C2: ¬Driver(x) ∨ ¬Horns(x) ∨ Smart(x)
C3: ¬Traffic(x) ∨ ¬Smart(y) ∨ ¬Catches(x, y)
C4: ¬Traffic(x) ∨ ¬Driver(y) ∨ ¬Chases(x,y) ∨ Catches(x,y) ∨ Frustrated(x)
C5: Traffic(a)
C6: Driver(b)
C7: Horns(b)
C8: ¬Frustrated(a)
Resolution Steps:
Step R1: Resolve C2 with C6 and C7
C2 : ¬Driver(x) ∨ ¬Horns(x) ∨ Smart(x) [x = b]
C6 : Driver(b)
C7 : Horns(b)
----------------------------------------------
R1 : Smart(b)
Step R2: Resolve C1 with C5 and C6
C1 : ¬Traffic(x) ∨ ¬Driver(y) ∨ Chases(x, y) [x = a, y = b]
C5 : Traffic(a)
C6 : Driver(b)
----------------------------------------------
R2 : Chases(a, b)
Step R3: Resolve C3 with C5 and R1
C3 : ¬Traffic(x) ∨ ¬Smart(y) ∨ ¬Catches(x, y) [x = a, y = b]
C5 : Traffic(a)
R1 : Smart(b)
----------------------------------------------
R3 : ¬Catches(a, b)
Step R4: Resolve C4 with C5, C6, and R2
C4 : ¬Traffic(x) ∨ ¬Driver(y) ∨ ¬Chases(x,y) ∨ Catches(x,y) ∨ Frustrated(x) [x = a, y = b]
C5 : Traffic(a)
C6 : Driver(b)
R2 : Chases(a, b)
----------------------------------------------
R4 : Catches(a, b) ∨ Frustrated(a)
Step R5: Resolve R4 with R3
R4 : Catches(a, b) ∨ Frustrated(a)
R3 : ¬Catches(a, b)
----------------------------------------------
R5 : Frustrated(a)
Step R6: Resolve R5 with C8
R5 : Frustrated(a)
C8 : ¬Frustrated(a)
----------------------------------------------
NIL (Empty Clause -- Contradiction!)
Step 5: Conclusion
Since resolution derives the empty clause (NIL) from the knowledge base together with the negated goal, the negated goal is unsatisfiable together with the facts. By the refutation principle, this proves the original statement:
$$\boxed{\text{If all drivers horn, then all traffics are frustrated.}}$$
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.