Four safety engineers set out to inspect a newly cut tunnel through Mt. Popocaterpillar in the Andes. Each person walks at a different constant integer speed measured in meters per minute. In the tunnel there is a mine car which travels along a fixed track, automatically going from end to end at a fixed integer speed. When people board the car they may reverse its direction, but cannot change its speed.
At noon on Monday all four engineers start at the south end, while the mine car starts at the north end. The first (fastest) engineer meets the car, and takes it some distance north. The engineer gets out and continues going north, while the car resumes heading south. Then the second engineer meets the car and also takes it some distance north. Likewise for the third and fourth engineers. All the people, and the mine car, travel continuously with no pauses. The inspectors always go north. Each person enters and exits the car at an integral number of minutes.
All four engineers reach the end of the tunnel simultaneously. What is the earliest time this could happen?
I thought I would tackle an easier problem, to get some insight. Namely the case with just two engineers.
In the real two-person problem, there are four car changes:
1) Engineer 1 (faster) gets into car at w minutes
2) Engineer 1 exits car -- x minutes later
3) Engineer 2 (slower) gets into car -- y minutes later
4) Engineer 2 exits car -- z minutes later
Note that the car ends where it started, so w + y = x + z
We want to minimize w + x + y + z
Lets consider possible values for (w, x, y, z), all of which must be non-zero integers
(1,x,y,z) is not possible, because w > x > 0. If w = x, the first engineer finishes while the second is still walking.
(2,1,y,z) is possible, and it is the smallest possible w + x.
Then what could y, z be?
(2,1,1,2) is possible, if we can find speeds that fit.
And we can!
With a little playing around, I find that
a) Engineer 1 can do the full trip on foot in 8 minutes
b) Engineer 2 can do the full trip on foot in 16 minutes
c) The car could do the full trip (without turning around) in 2 and 2/3 minutes.
So, engineer 1 takes 2 minutes to walk 1/4 of the way, 1 minute to ride 3/8 of the way, and then takes 3 minutes to walk the other 3/8, finishing after 6 minutes.
Engineer 2 takes 4 minutes to walk to the 1/4 point. He rides the remaining 3/4 of the way in 2 minutes, arriving at 6 minutes, The car takes 2 minutes to traverse 3/4 of the shaft, where it encounters Engineer 1 at the 1/4 point. It carries Engineer 1 North for 1 minute, turns around and picks up Engineer 2 at the 1/4 point at the 4 minute mark, and carries Engineer 2 to the end in 2 more minutes.
SO, THE MINIMUM TIME IS 6 MINUTES FOR THE TWO PERSON CASE.
KEY TAKEAWAY: We do not really need to worry about the distance or the integral speeds, as long as the minutes work out. As long as the speeds are rational, we can scale everything up by multiplying by the GCD of the speed and distance denominators to make everything integral.
In this problem the speeds, for instance, might be:
Engineer 1: 40 meters/minute
Engineer 2: 20 meters/minute
Mine Car: 120 meters/minute
Distance: 320 meters
I will try the three or four person case next.
Edited on April 23, 2019, 9:53 am