2008-12-14

Re: Practice Final Question 10.

Originally Posted By: ekaqu somethingekaqu1028@gmail.com
That example doesnt really work. Since you have . at the end of the statements, they are all separate, so the variables being different doesnt change anything. g(a,b). g(b,c). g(a,d). connected(X,Y) :- g(X,Y). connected(X,Z) :- g(X,Y), g(Y,Z). connected(X,Z) :- g(X,Y), g(Z,Y). connected(X,Y) :-
'''Originally Posted By: ekaqu somethingekaqu1028@gmail.com''' That example doesnt really work. Since you have . at the end of the statements, they are all separate, so the variables being different doesnt change anything. g(a,b). g(b,c). g(a,d). connected(X,Y) :- g(X,Y). connected(X,Z) :- g(X,Y), g(Y,Z). connected(X,Z) :- g(X,Y), g(Z,Y). connected(X,Y) :-
X