Fog Creek Software
Discussion Board




Solution to the railroad bridge problem

The train is travelling twice as fast as the man, and when the whistle is blown, the train is positioned a distance from the near entrance that is equal to half the length of the tunnel.

For the man to run back 1/4 of the tunnel's length and escape the train, the train might be any distance away from the tunnel, but this distance will be some multiple of the distance away from the entrance of the tunnel as the man is. If the train is travelling 3 times as fast as the man, the train will cover three times the distance that the man does, hence the train must be a 3/4-tunnel length from the entrance.

Likewise, if the man runs toward the far end of the train, the train must cover the distance that the man runs, plus the disance from the train's starting point to the man's starting point. This also results in a similar speed/distance multiple.

However, to satisfy both requirements, the train must be twice the distance from the near end of the tunnel as the man is, and travelling twice the man's speed. The man covers a 3/4-length distance, and the train covers a 1.5-length distance, and they both reach the far end of the tunnel at precisely the same time.

This type of problem can of course be worked out using simultaneous equations, although I worked it out by trial and error in about 5 minutes , since this  problem is relatively simple.

Joey Kelly
Wednesday, July 24, 2002

I think it's even simpler than that. Start at time 0. t is the time at which the man would arrive at the entrance to the tunnel. 3t is the time at which the man would arrive at the exit. The difference, 2t, is the time it would take the train to cover the length of the tunnel. Since the man would take 4t to cover the same distance, the train is moving twice as fast as the man.

At 0 time, the train must be time t from the entrance to the tunnel. The man covers 1/4 the length of the tunnel in time t, the train therefore covers 1/2 the length of the tunnel in the same time, hence the train starts 1/2 tunnel length from the entrance.

Rupert
Wednesday, July 24, 2002

*  Recent Topics

*  Fog Creek Home