Logic Programming
What
versus
How
 

Assignment - Analysis


Suppose we have n blocks in a stack where n > 3. In this Blocks World representation, we use block(x) to say that x is a block and on(x,y) to say block x is on top of block y. (These are the only facts in the dataset.) In terms of n, using full indexing, what is the number of unifications it takes to evaluate the following query? Please provide a few sentences of justification.

goal(Y) :- block(Y) & on(X,Y)