CSc 8710 Deductive Databases and Logic Programming
Fall 1999
Programming Assignment #3
October 18, 1999 (Monday)

Consider the following Prolog query:

  trip(L,S,E) :- leg(L,S,E).
  trip(L,S,E) :- leg(L,S,I), trip(L,I,E). 
  trip(L,S,E) :- interchange(I,L,M), trip(L,S,I), trip(M,I,E).

  query(X) :- trip(blue,suwanee,X).
where the base predicates are defined as follows: