a set of facts of the form:
flight(DepartCity,DepartTime,ArriveCity,ArriveTime,Cost,Airline);
For example
flight(newyork,1300,chicago 1500,275,united)
Rules:
3. connect(DepartCity,ArriveCity) :- ...
indicates that it's possible to get from DepartCity to ArriveCity
via one or more flights
4. traveltime(DepartCity,ArriveCity,X) :-
indicates that it's possible to get from DepartCity to ArriveCity
via one or more flights, with a total travel time of X
flight(DepartCity,DepartTime,ArriveCity,ArriveTime,Cost,Airline);
For example
flight(newyork,1300,chicago 1500,275,united)
Rules:
3. connect(DepartCity,ArriveCity) :- ...
indicates that it's possible to get from DepartCity to ArriveCity
via one or more flights
4. traveltime(DepartCity,ArriveCity,X) :-
indicates that it's possible to get from DepartCity to ArriveCity
via one or more flights, with a total travel time of X