Prolog example
solution(X,Y,Z) :- p(X),p(Y),p(Z),test(X,Y,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)?
X=14; Y=15; Z=16 ?
no
Previous slide
Next slide
Back to first slide
View graphic version