## AI: Problem Set 4

Assigned: March 4

Due: March 25

### Problem 1

Let D be a domain containing solid objects.
Let L be the first-order language over D with the following non-logical symbols:
i(O1,O2) --- Object O1 is inside O2.

h(O) --- O is hollow.

r(O) --- O is red.

s(O) --- O is small.

m(O) --- O is medium-sized.

b(O) --- O is big.

ox --- Constant symbol.

A. Represent the following statements as Horn clauses in L.

- a. If O1 is inside O2, then O2 is hollow.
- b. If O1 is inside O2 and O2 is inside O3, then O1 is inside O3.
- c. Every small object is inside some medium-sized object.
- d. Every medium-sized object is inside some big object.
- e. Every small object is red.
- e. If O1 is inside O2, O1 is red, and O2 is big, then O2 is red.
- f. ox is small.

B. Prove the statement ``There exists a hollow red object'' using backward
chaining.

C. Prove the statement ``There exists a hollow red object'' using forward
chaining.

### Problem 2

Let A, B, C, D be Boolean random variables.
Given that:

Prob(A=T) = 0.8.

Prob(B=T | A=T) = 0.2

Prob(B=T | A=F) = 0.6

Prob(C=T | A=T) = 0.7

Prob(C=T | A=F) = 0.4

Prob(D=T | B=T) = 0.1

Prob(D=T | B=F) = 0.2

B and C are conditionally independent given A.

A and D are conditionally independent given B.

Evaluate the following expressions.

- Prob(B=T).
- Prob(D=T).
- Prob(B=T,C=T | A=F).
- Prob(B=T,D=T | A=F)
- Prob(A=T | B=T)
- Prob(A=T | B=F, C=T).
- Prob(A=T | D=T).
- Prob(C=T | B=F).