Question: 12. Consider the following logic program: f(empty, X, X) . f(cons(X, Y), W, Z) f(Y, W, cons(X, Z)) . Give each top-down derivation, showing
12. Consider the following logic program:
f(empty, X, X) .
f(cons(X, Y), W, Z) ←
f(Y, W, cons(X, Z)) .
Give each top-down derivation, showing substitutions (as in Example 13.32) for the query
???????????? f(cons
(a, cons
(b, cons
(c, empty))), L, empty) .
What are all of the answers?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
