Professional Documents
Culture Documents
ORing
fido/y
~animal (fido)
~dog(x) V animal (x) (i)
fido/x
Hence Proved
Example 2:
Consider the following facts:
1. John likes all kinds of food.
2. Apples are food.
3. Anything anyone eats and is not killed by is food.
4. Bill eats peanuts and is still alive.
5. Sue eats everything Bill eats.
a) Convert these facts to wffs in predicate logic.
b) Using resolution, prove that “John likes peanuts”.
Step 1:
Step 2:
a → b is equivalent to ~a \/ b.
1. ~ food(x) V likes(John,x)
2. food(apple)
3. ~ eats(x,y) V ~ alive (x) V food(y) #~killedby ==alive(x)
4.eats(ajay, peanut ) Ù alive(ajay)
~ food(x) V ~eats (ajay,x) V eats(Sue,x)
Step 3: Negate the stmt to be
proved
John likes peanuts == likes(John,peanuts) (predicate stmt)
Neagation: ~likes(John, peanuts)
Step 2:
a → b is equivalent to ~a \/ b.
1. ~ food(x) V likes(John,x)
2. food(apple)
3. ~ eats(x,y) V ~ alive (x) V food(y) # ~killedby ==alive(x)
4.eats(ajay, peanut ) Ù alive(ajay)
~ food(x) V ~eats (ajay,x) V eats(Sue,x)
STEP 4. DRAW RESOULTION GRAPH
(i)
~likes (john, peanut) ~food(x) V likes (John, x)
ORing
x, peanut
y, peanut
x, ajay Rule: V~ = Ù
Hence Proved
Example 3: Lucky Student
1. Anyone passing his AI exam and winning the lottery is
happy.
2. Anyone who studies or is lucky can pass all his exams.
3. John did not study but he is lucky.
4. Anyone who is lucky wins the lottery.