3.14 Consider the program: t(0+1, 1+0). t(X+0+1, X+1+0). t(X+1+1, Z) :- t(X+I, X1), t(X1+1, Z). How will

Question:

3.14 Consider the program: t(0+1, 1+0). t(X+0+1, X+1+0). t(X+1+1, Z) :- t(X+I, X1), t(X1+1, Z).

How will this program answer the following questions if '+' is an infix operator of type yfx (as usual):

(a) ?-t(0+1, A).

(b) ?-t(0+1+1, B).

(c) t(1+0+1+1+1, C).

(d) ?-t(D, 1+1+1+0).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Artificial Intelligence In Power System Optimization

ISBN: 9781578088058

1st Edition

Authors: Weerakorn Ongsakul, Vo Ngoc Dieu

Question Posted: