% Recursive Rules
% Date: 18/09/2008

edge(a,c).
edge(a,b).
edge(d,e).
edge(c,d).
edge(b,d).
edge(f,g).

connected(Node,Node).
connected(Node1,Node2):-edge(Node1,Link),connected(Link,Node2).