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?
The following should be ignored. I solved the problem as if the mine car started at the south end, with the two engineers.
/********************************************/
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 0 minutes
2) Engineer 1 exits car at x minutes
3) Engineer 2 (slower) gets into car -- y minutes later
4) Engineer 2 exits car -- z minutes later
We want to minimize x + y + z
Lets consider possible values for (x, y, z), all of which must be non-zero integers
(1,y,z) is not possible, because x > y > 0. If x = y, then the car has returned to the start, which cannot happen
(2,1,z) is possible, and it is the smallest possible x + y.
Then what could z be?
Well, z must be greater than x, because in order to arrive at the same time, the slower engineer needs more car travel time than the faster engineer.
(2,1,3) 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 12 minutes
c) The car could do the full trip (without turning around) in 4 minutes.
So, engineer 1 takes 2 minutes to ride halfway, and he then takes 4 minutes to walk the other half.
The car takes 1 minute to return to the 1/4 point.
The car meets Engineer 2, who has taken 3 minutes to walk to the 1/4 point. He rides the remaining 3/4 of the way in 3 minutes, arriving at 6 minutes, simultaneous with engineer 1.
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: 30 meters/minute
Engineer 2: 20 meters/minute
Mine Car: 60 meters/minute
Distance: 240 meters
I will try the three or four person case next.
Edited on April 23, 2019, 9:02 am