من طرف 3ABED الإثنين 21 يونيو 2010 - 17:38
C Representing facts and reasoning with them
1. Consider the following sentences:
• John likes all kinds of food.
• Apples are food.
• Chicken is food.
• Anything anyone eats and isn’t killed by is food.
• Bill eats peanuts and is still alive.
• Sue eats everything Bill eats.
(a) Translate these sentences into formulas in FOPC.
1. ∀x F ood(x) → Likes(John, x)
2. F ood(Apples)
3. F ood(Chicken)
4. ∀x∃y Eats(y, x) ∧ ¬KilledBy(y, x) → F ood(x)
5. Eats(Bill, P eanuts) ∧ ¬KilledBy(Bill, P eanuts)
6. ∀x Eats(Bill, x) → Eats(Sue, x)
(b) Use backward chaining to prove that John likes peanuts.
To prove Likes(John, P eanuts), we just need to prove F ood(P eanuts), according to sentence 1.
By sentence 4, we just need to prove ∃y Eats(y, P eanuts) ∧ ¬KilledBy(y, P eanuts). Sentence 5
allows us to prove this directly.
(c) Convert the formulas of part (a) into clause form.
1. ¬F ood(x) ∨ Likes(John, x)
2. F ood(Apples)
3. F ood(Chicken)
4. ¬Eats(y, x) ∨ KilledBy(y, x) ∨ F ood(x)
5. Eats(Bill, P eanuts)
6. ¬KilledBy(Bill, P eanuts)
7. ¬Eats(Bill, x) ∨ Eats(Sue, x)
(d) Use resolution to prove that John likes peanuts.
8. ¬Likes(John, P eanuts) negated conclusion
9. ¬F ood(P eanuts) 1 and 8
10. ¬Eats(y, P eanuts) ∨ KilledBy(y, P eanuts) 4 and 9
11. KilledBy(Bill, P eanuts) 5 and 10
12. ⊥ 6 and 11
(e) Use resolution to answer the question, “What food does Sue eat?”
13. ¬Eats(Sue, x) negated query
14. ¬Eats(Bill, x) 7 and 13
15. ⊥ 5 and 14, unifying P eanuts/x