To eliminate ‘^’ break the clause into two, if you cannot break the clause,
distribute the OR ‘v’ and then break the clause.
EXAMPLE
Now let us see an example which uses resolution.
Problem Statement:
1. Ravi likes all kind of food.
2. Apples and chicken are food
3. Anything anyone eats and is not killed is food
4. Ajay eats peanuts and is still alive
5. Rita eats everything that Ajay eats
Prove by resolution that Ravi likes peanuts using resolution.
Solution:
Step 1: Converting the given statements into Predicate/Propositional Logic
i. ∀x : food(x) → likes (Ravi, x)
ii. food (Apple) ^ food (chicken)
iii. ∀a : ∀b: eats (a, b) ^ killed (a) → food (b)
iv. eats (Ajay, Peanuts) ^ alive (Ajay)
v. ∀c : eats (Ajay, c) → eats (Rita, c)
vi. ∀d : alive(d) → ~killed (d)
vii. ∀e: ~killed(e) → alive(e)
Conclusion: likes (Ravi, Peanuts)
Step 2: Convert into CNF
i. ~food(x) v likes (Ravi, x)
ii. Food (apple)
iii. Food (chicken)
iv. ~ eats (a, b) v killed (a) v food (b)
5
v. Eats (Ajay, Peanuts)
vi. Alive (Ajay)
vii. ~eats (Ajay, c) V eats (Rita, c)
viii. ~alive (d) v ~ killed (d)
ix. Killed (e) v alive (e)
Conclusion: likes (Ravi, Peanuts)
Step 3: Negate the conclusion
~ likes (Ravi, Peanuts)
Step 4: Resolve using a resolution tree
~ likes (Ravi, Peanuts)~food(x) v likes (Ravi, x)
x | peanuts
~food (peanuts) ~ eats (a, b) v killed (a) v food (b)
b | peanuts
~eats (a, peanuts) v killed (a) eats (Ajay, peanuts)
a | Ajay
Killed (Ajay) ~alive(d) v ~killed (d)
d | Ajay
~alive (Ajay) alive (Ajay)
{}
Hence we see that the negation of the conclusion has been proved as a complete
contradiction with the given set of facts.
Hence the negation is completely invalid or false or the assertion is completely valid or
true.
Hence Proved
6
Explanation of Resolution Tree (Unification)
In the first step of the resolution tree, ~ likes (Ravi, Peanuts) and likes (Ravi, x) get
resolved (cancelled). So we are only left with ~food (peanuts). In this ‘x’ is replaced by
peanuts i.e. ‘x’ is bound to peanuts.
In the second step of the resolution tree, ~food(peanuts) and food (b) get resolved, so we
are left with ~eats (a, peanuts) v killed(a). In this ‘b’ is bound to peanuts thus we replace
every instance of ‘b’ by Peanuts in that particular clause. Thus now we are left with ~eats
(a, peanuts) v killed (a).
In the third step of the resolution tree, ~eats (a, peanuts) and eats (Ajay, peanuts) gets
resolved. In this ‘a’ is bound to Ajay. So we replace every instance of ‘a’ by Ajay. Thus
now we are left with killed (Ajay).
In the forth step of the resolution tree, killed (Ajay) and ~killed (d) get resolved. In this ‘d’
is bound to Ajay, thus ever instance of ‘d’ is replaced by Ajay. Now we are left with
~alive(Ajay).
In the fifth step of the resolution tree, ~Alive(Ajay) and Alive(Ajay) get resolved and we
are only left with a null set.