Problem Set 5

Assigned: Mar. 22
Due: Apr. 5.

Problem 1

Using the fact and rules from the backward chaining handout, example 1, trace Prolog inference for the goal ?- sister_in_law(jennifer,rachel).

Problem 2

The append relation for lists can be defined as follows:
append(nil,L,L). 
append(c(X,L),M,c(X,N)) :- append(L,M,N).
Trace Prolog inference for the goal "append(c(p,c(q,nil)),c(r,nil),Q)".

Problem 3

In problem 2, trace Prolog inference for the goal "append(X,c(r,nil),c(q,c(r,nil)))".

Problem 4

In problem 1, give a forward chaning proof of sister_in_law(jennifer,rachel). You need only show the chain of inference that leads to the goal.