Suppose you are given a timetable, which consists of:
· a set A of N airports, and for each airport a A, a minimum connecting
time c(a);
· a set F of M flights, and for each flight f A, the following information:
origin airport a1 (f) A;
destination airport a2 (f) A;
departure time t1 (f); and
arrival time t2 (f).
Give an efficient algorithm for the following problem:
Given airports a and b, and a time t, find a sequence of flights that allows
one to arrive at the earliest possible time in b when departing from a at or
after time t. Minimum connecting times at intermediate airports should
be observed.
Also, give the time complexity of your algorithm as a function of N and M .
