Predicate logic by resolution

312 Views Asked by At

I've been trying to study logic lately, as part of my AI course, and I've been going through some old, simple exam questions from my school. There is one question about resolution in particular that I don't know how to solve (there are no answers/explanations provided). So, here goes:

Sonny, Bonny and Conny are all elephants. We know that:

  1. Sonny is gray.
  2. Conny is pink and Conny likes Bonny.
  3. Bonny is either pink or gray (but not both) and Bonny likes Sonny.

Using resolution, prove that the sentence: "A pink elephant likes a gray elephant" is true.

Additional question: How exactly does the 'but not both' part affect the sentence? I doubt I should be using XOR since we haven't mentioned it once in the entire course.

Thanks a lot in advance!

2

There are 2 best solutions below

0
On

If Bonnie is grey then since Connie likes Bonnie and Connie is pink then there is a pink elephant (namely Connie) that likes a grey elephant (namely Bonnie). Otherwise, Bonnie is pink and there is a pink elephant (namely Bonnie) that likes a grey elephant (namely Sonny).

0
On

There are two cases to consider: (1) Bonny is pink or (2) Bonny is gray.

Case 1: Bonny is pink

Then Bonny is a pink elephant who likes a gray elephant, namely Sonny.

Case 2: Bonny is gray

Then Conny is a pink elephant who likes a gray elephant, namey Bonny.

Conclusion: In both cases (there are no others), a pink elephant likes a gray elephant. The phrase "but not both" makes no difference to the result, i.e. if Bonny was both pink and gray, there would still be a pink elephant that liked a gray elephant.