Speeding up the earlier example: reordering conjuncts
solution(X,Y,Z) :- test(X,Y,Z),p(X),p(Y),p(Z).
p(11).
p(3).
p(7).
p(16).
p(15).
p(14).
test(X,Y,Z) :- Y is X+1,Z is Y+1.
solution(X,Y,Z)?
This fails, since X is uninstantiated in test
Previous slide
Next slide
Back to first slide
View graphic version