Question: You are designing a flight scheduler for an airline AlgorithmAir. You will have access to a list of daily flights, F 1 d o t

You are designing a flight scheduler for an airline AlgorithmAir. You will have access to a list of daily
flights, F1dotsFn, each with a departure airport, departure time, arrival airport, arrival time, and cost,
Fi=(DAi,DTi,AAi,ATi,ci).(Times are measured in minutes after midnight UTC time.)
A passenger can make a flight connection from (DAi,DTi,AAi,ATi,ci) to (DAj,DTj,AAj,ATj,cj) if
and only if AAi==DAj. This connection will have a total layover time of DTj-ATi if 24-(ATi-DTj)DTjATijn{F1,dots,Fn}DADADAnF1dotsFnkP1,dots,PkDAnF1,dots,FnkP1,dots,PnDAPiPiDAATi
or24-(ATi-DTj)ifDTjATi,i.e., the passenger will have to wait until the next day to take flight
j.
(a) Given a list ofn available daily flights {F1,dots,Fn}, a departure airport D and an arrival airport A,
design an algorithm that returns the minimum cumulative layover time among all valid sequences
of flights starting from airport D and ending at airport A.(You can ignore cost for this question.)
(7 points for reasonably efficient correct high level algorithm description (with correctness proof),
5 points for correct time analysis, and 3 points for efficiency of your algorithm.)
(b) You notice that the route from DtoAis very popular and you want to make that particular
route cheaper than itis. There are n available daily flights F1dotsFn that are already running.
There are k potential future flights P1,dots,Pk that the airline is considering to add. You wish
to find exactly one of the potential future flights to make available that will result in the cheapest
sequence of flights from DtoA.
Given a list ofn available daily flights F1,dots,Fn and list ofk potential future daily flights
P1,dots,Pn and a departure airport D and arrival airport A, design an algorithm that returns
the index of the potential future daily flight Pi such that ifPiis included in the list of available
flights, it will result in the minimum cost among all valid sequences of flights from DtoA.
(7 points for reasonably efficient correct high level algorithm description (with correctness proof),
5 points for correct time analysis, and 3 points for efficiency of your algorithm.)
 You are designing a flight scheduler for an airline AlgorithmAir. You

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!