Fog Creek Software
Discussion Board




railroad bridge

The answer is :
The train's speed is 8 times faster than the Man's speed.

Assuming the bridge lenght is X and the distance of the train from the bridge is Y, we can compose the following equations :

1/4X      Y
------ = ---
Ms      Ts

3/4X    Y+X
------ = -----
Ms        Ts

Where "Ms" is the Man's Speed and "Ts" is the Train's Speed.

You get : Ts = 8*Ms

Rami Tomer
Monday, August 04, 2003

Corection : The train goes 2 times faster than the man.

Rami Tomer
Monday, August 04, 2003

There's an "aha" way to solve this:

In the time it takes for the man to run 1/4 of the bridge distance, the train reaches the bridge.  If he tries to run the long way, then the train reaches the bridge when the man is halfway across the bridge (since he starts at the 1/4 point).

Now it's just a problem of a man is halfway across a bridge, and a train is just entering the bridge, and we know that they both reach the other end at the same time, so the train has to be going twice as fast as the man.

Tim H
Wednesday, August 06, 2003

The Aha way is definitely a different way of solving the problem. To be more explanative on the mathematical solution:
TimetrainBT = time taken by train to reach the beginning fo the tunnel
TimetrainET = time taken by train to reach the end of the tunnel
similarly
TimemanBT = time taken by man to ....
TimemanET = time taken by man to ....

since    TimetrainBT = TimemanBT  ----1
            TimetrainET = TimetrainET  -----2

therefore
                                  Trainspeed            Manspeed
1 corresponds to      --------------    =    ---------------
                              DistancetrainBT          DistmanBT

similar equation for 2
Assuming the train's distance from the tunnel is D
and the tunnel is X units long we have

    Trainspeed          Manspeed
    --------------    =  -------------------  for 1
          D                      1/4  X

and

    Trainspeed            Manspeed
    ---------------  =  -----------------    for 2
        D + X                3/4X

using 1 we get the value of

                          Trainspeed * X
                D =    ---------------------          as 3
                            4 * Manspeed

Replace 3 in 2 to get Trainspeed = 2*Manspeed

Hadi Mohammed
Thursday, August 07, 2003

Can I rephrase the "aha" way in case it makes it clearer (for those who think like I do)?

There are two ways for the man to go, backwards or forwards. One way is three quarters of a tunnel, the other is one quarter of a tunnel, so the difference between the two narrow escapes is half a tunnel.
From the train's point of view the difference between the two narrow escapes is a whole tunnel.
Therefore the train goes a whole tunnel in the time it takes the person to go half a tunnel.

lionel
Wednesday, August 13, 2003

*  Recent Topics

*  Fog Creek Home