|
|Store|
|
|
|
|
|
|
|
|
CTK Exchange
nbro0
Member since Jan-2-04
|
Jan-02-04, 05:14 PM (EST) |
|
"Optimization mod problem"
|
Folks, I came across this problem studying for GRE. Seems like a possibility for a mod-based solution. An airline passenger is planning a trip that involves 3 connecting flights that leave from airport A, B, C. The first flight leaves the airport A starting at 8:00am and arrives at Airport B, 2 1/2 hrs later. The second flight leaves Airport B every 20 mins beginning at 8:00am, and arrives at airport C 1 1/6 hours later. The third flight leaves airport C every hour, beginning at 8:45 am. What is the least amount of time that the passenger can spend between flights to keep their connections? I was able the brute force the correct answer (65 mins). However couldn't help shake the fact that there might be a more general, elegant modulo solution. Any takers? |
|
Alert | IP |
Printer-friendly page |
Reply |
Reply With Quote | Top |
|
|
mptack
Member since Nov-24-04
|
Nov-24-04, 11:05 AM (EST) |
|
1. "RE: Optimization mod problem"
In response to message #0
|
I was also able to brute force the solution with the help of a spreadsheet. Have you tried converting flight times into minutes and then trying mod(flighttime,time between flights)? At the end you'll have to add another 15 mins because the flights from the last airport leave hourly beginning at 8:45 rather than on the half hour. If the flights from the airport C left every 20min beginning at 8:30 or even 9:30 waiting time would have been 50min. Which I arrive at via a couple of modulo functions. Try it first. If you can't get it. Post another e-mail.
|
|
Alert | IP |
Printer-friendly page |
Reply |
Reply With Quote | Top |
|
|
Graham C
Member since Feb-5-03
|
Nov-24-04, 05:50 PM (EST) |
|
2. "RE: Optimization mod problem"
In response to message #0
|
> >An airline passenger is planning a trip that involves 3 >connecting flights that leave from airport A, B, C. The >first flight leaves the airport A starting at 8:00am and >arrives at Airport B, 2 1/2 hrs later. The second flight >leaves Airport B every 20 mins beginning at 8:00am, and >arrives at airport C 1 1/6 hours later. The third flight >leaves airport C every hour, beginning at 8:45 am. What is >the least amount of time that the passenger can spend >between flights to keep their connections? >Am I missing something here? There should be a choice of flights from A perhaps? For every extra 20 minutes he waits at B (in the first hour) he cuts his waiting time at C by 20 minutes. Makes no difference therefore which flight he takes. Timetable .......B................C .arr.......dep.......arr.......dep.......wait 10:30.....10:40.....11:50.....12:45......10 plus 55 = 65 ..........11:00.....12:10.....12:45......30 plus 35 = 65 ..........11:20.....12:30.....12:45......50 plus 15 = 65 Briefly he has to arrive at B at 10:30 and has to leave C at 12:45 at the earliest, which is 2:15 in all. He spends 1:10 on the plane, so he has to wait 1:05 minutes. |
|
Alert | IP |
Printer-friendly page |
Reply |
Reply With Quote | Top |
|
|
You may be curious to have a look at the old CTK Exchange archive. Please do not post there.
|Front page|
|Contents|
Copyright © 1996-2018 Alexander Bogomolny
71544472
|
|