# CS 1571: Homework 8

## Inference in First-Order Logic (Chapter 9): Paper Problems (100 pts)

Assigned: November 11, 2008

Due: November 18, 2008

#### 1. Forward and Backward Chaining (50 pts)

Consider the following KB:

1. Programmer(x) AND Emulator(y) AND People(z) AND Provide(x,y,z) => Criminal(x)
2. Use(Friends,x) AND Runs(x, GameXgames) => Provide(SuperProgrammer,x,Friends)
3. Software(x) AND Runs(x, GameXgames) => Emulator(x)
4. Programmer(SuperProgrammer)
5. People(Friends)
6. Software(Emulator1)
7. Use(Friends,Emulator1)
8. Runs(Emulator1,GameXgames)

(a) Use forward chaining to prove Criminal(SuperProgrammer). If several rules apply, use the one with the smallest number.

(b) Use backward chaining to determine that SuperProgrammer is a criminal. If several rules apply, again use the one with the smallest number.

Grading Criteria: For both parts, you can either use a proof tree, or can show the chaining process step by step, using the numbering of the sentences to identify how you are using the rules and facts in the KB (a good model is on page 281 in the text). For either presentation method, you will need to indicate the unifications.

#### 2. Resolution (50 pts)

Consider the following story: "Anyone passing his history exams and winning the lottery is happy. But anyone who studies or is lucky can pass all his exams. John did not study but he is lucky. Anyone who is lucky wins the lottery. There exists a person who is wealthy."

(a) Represent the story using FOL. To start you off, use the following predicates:

- binary predicates: pass, win
- unary predicates: happy, study, lucky, wealthy

  For example, "John did not study but he is lucky" would be represented as ~study(john) AND lucky(john)

  (b) Put the resulting FOL sentences into Conjunctive Normal Form.

  (c) Using proof by refutation and resolution as the single inference rule, prove that "John is happy"

  Grading Criteria: For part (c), you can either use a graph or show the resolution process step by step. Again, show your unifications. Even if parts (a) and (b) are wrong, you can get credit, if we think you did the correct resolution.