General Game Playing

Problem op.3 - Analysis

For each of the rules shown below, select the expression that captures the worst case complexity of our standard evaluation algorithm without indexing. The symbol n represents the total number of objects in the domain.

r(X,Y) :- p(X,Y) & q(Y) & q(Z)
n4 + n3 + n2 + n
2n4 + 2n3 + n2 + n
2n4 + 2n3
 
r(X,Y) :- p(X,Y) & q(Y)
n4 + n3 + n2 + n
2n4 + 2n3 + n2 + n
2n4 + 2n3