Fog Creek Software
Discussion Board




answer to railroad bridge

simple bit of math.

Let the length of the Tunnel be L. If it takes him X time to get to the start of the tunnel, it takes him 3X time to get to end of tunnel. This is the same for the train. Therefore the train is 0.5*L away from the start of the tunnel.

Speed of train = L/2X
Speed of man = L/4X

Train is twice as fast as the man.

Alan Riddell
Saturday, April 19, 2003

Let the man take "t sec" to get to the start of the tunnel. Because the train would have hit him at the start of tunnel, after "t sec", even train is at the start of tunnel.

Now consider the case where man runs towards the end of the tunnel. The distance to the end of the tunnel is (3/4)th length of the tunnel. Because man takes "t sec" to cover (1/4) length of tunnel, he will take "3t sec" to get to the end. In this "3t sec", train covers one full length tunnel.

Time remaining the same, ratio of speeds is same as ratio of distance covered. Hence the ratio of train speed to man speed is
          (1/1)*L  :  (3/4)*L

This is  to say that train is (4/3) times as fast as the man.

Sinha
Saturday, April 19, 2003

In the '3t sec' time, the train travels the length of the tunnel, plus the distance from where the train starts to the start of the tunnel.  The train starts some distance before the tunnel, otherwise the man would not be able to escape by running back toward the entrance of the tunnel.

So lets say the distance from the train to the start of the tunnel is 'A', and the distance from the start of the tunnel to the man is 'B'.  Also, the man travels at speed 'M' and the train travels at speed 'T'.

We know that the time it takes the man to go distance B is the same as the time it takes the train to go distance A.  So:

(B / M) = (A / T)

And cross multiplying we get:

BT = AM

We also know that the time it takes the man to go distance 3B is equal to the time it takes the train to go distance A + 4B.  SO:

(3B / M) = ((A + 4B) / T)

Cross multipled is:

3BT = AM + 4BM

Since BT = AM, substitute BT for AM:

3BT = BT + 4BM

And a little algebra later:

T = 2M

So the train is twice as fast as the man.

Matt Bridges
Tuesday, April 22, 2003

I think I have a solution that requires the least math.
Since the man is at the 1/4 way point of the tunnel, and we know that the train will reach the tunnel when the man walk back to the entrance, we can deduce that if he walk the other way, he would be at the 1/2 way point when the train enters.  Since we know that they would reach the end of the tunnel at the same time, it follows that the train cover twice the distance and thus is twice as fast.

Karl Cheng
Tuesday, April 29, 2003

*  Recent Topics

*  Fog Creek Home