#include "randompath1000". % 2nd way of reading input facts path(X,Y) :- edge(X,Y). % Way 1 %path(X,Y) :- edge(X,Z), path(Z,Y). % Way 2 %path(X,Y) :- path(X,Z), edge(Z,Y). % Way 3 %path(X,Y) :- path(X,Z), path(Z,Y). %cycle(X) :- path(X,X).