0% found this document useful (0 votes)
158 views2 pages

Solution To Problem From Rich and Knight

1) The document provides the steps to solve a homework problem using predicate logic. It defines several statements and writes them as well-formed formulas (wffs). 2) It then uses the technique of backward chaining to prove that John likes peanuts. This involves substituting statements into implications to derive contradictions. 3) The statements are rewritten as clauses to prepare for resolution proofs. 4) It proves that John likes peanuts by deriving a contradiction from assuming the negation of the statement. 5) Finally, it derives that Sue eats peanuts by substituting and resolving clauses.

Uploaded by

somi26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views2 pages

Solution To Problem From Rich and Knight

1) The document provides the steps to solve a homework problem using predicate logic. It defines several statements and writes them as well-formed formulas (wffs). 2) It then uses the technique of backward chaining to prove that John likes peanuts. This involves substituting statements into implications to derive contradictions. 3) The statements are rewritten as clauses to prepare for resolution proofs. 4) It proves that John likes peanuts by deriving a contradiction from assuming the negation of the statement. 5) Finally, it derives that Sue eats peanuts by substituting and resolving clauses.

Uploaded by

somi26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Here is a solution to the homework problem from Rich and Knight,

Chapter 5, exercise 4. Note that I have written out the names of the
predicate calculus symbols rather than trying to emulate them
typographically.

a. Write wff's for the statements:

1. forall(x): food(x) implies likes(John,x)

2. food(Apples)

3. food(Chicken)

In this next one, the braces are important, and in class I got it
wrong. You need the existential quantifier here, not the universal
quantifier, otherwise you can't do the proof asked for.

4. forall(y): {exists(z): [eats(z,y) and not killed-by(z,y)]}
implies food(y)

5. eats(Bill,Peanuts) and not killed-by(Bill,Peanuts)

6. forall(w): eats(Bill,w) implies eats(Sue,w)

b. Use backward chaining:

1. Need to prove likes(John,Peanuts) so substitute Peanuts for x in
a.1 giving food(Peanuts) implies likes(John,Peanuts)

2. Now we need to prove food(Peanuts) so substitute Peanuts for y in
a.4 giving {exists(z): [eats(z,Peanuts) and not killed-by(z,Peanuts)]}
implies food(Peanuts)

3. Now we need a z that will make both eats(z,Peanuts) and not
killed-by(z,Peanuts) true, so substitute Bill for z in the above, and
we get [eats(Bill,Peanuts) and not killed-by(Bill,Peanuts)]}
implies food(Peanuts)

4. Now we have the left hand side in our original assertions, so we
have completed the proof.

c. Rewrite as a set of clauses:

1. not food(x) or likes(John,x)

This one takes a couple of steps. First, negate the first part, and
when you move the existential quantifier past the negation, it turns
into a universal, then moving the negation into the bracketed part
turns the and into an or, so you end up with only one clause.

2. not eats(z,y) or food(y) or killed-by(z,y)

3. eats(Bill,Peanuts)

4. not killed-by(Bill,Peanuts)

5. not eats(Bill,w) or eats(Sue,w)

(The other two are already clauses, and useless too.)

d. To prove an assertion, start with its negation and show that it
leads to a contradiction, i.e., an empty clause.

1. assert not likes(John,Peanuts)

2. substitute in c.1 Peanuts for x giving
not food(Peanuts) or likes(John,Peanuts)

3. resolution with not likes(John,Peanuts) gives not food(Peanuts)

4. substitutein c.2 Peanuts for y and Bill for z, giving
not eats(Bill,Peanuts) or food(Peanuts) or killed-by(Bill,Peanuts)

5. resolve this with not food(Peanuts) from above, giving
not eats(Bill,Peanuts) or killed-by(Bill,Peanuts)

6. and resolve with eats(Bill,Peanuts) giving
killed-by(Bill,Peanuts)

7. which resolved with not killed-by(Bill,Peanuts) gives an empty
clause, indicating a contradiction, so we can say our initial
assertion, not likes(John,Peanuts), is false, or likes(John,Peanuts)
is true.

e. And coasting to the finish, it is easy to derive what Sue eats,

1. substitute in c.5 Peanuts for w, giving
not eats(Bill,Peanuts) or eats(Sue,Peanuts)

2. resolve with eats(Bill,Peanuts), giving eats(Sue,Peanuts)

You might also like