Fog Creek Software
Discussion Board




Railroad Puzzle

Yo...my answer to this puzzle was the railroad going 3 X the speed of the man... is this correct?

I couldn't find the answer on the website.

John Guz
Sunday, August 17, 2003

Nevermind...made bad assumption

the railroad travels 2 X the speed of the man

John Guz
Sunday, August 17, 2003

When the guy reaches the beginning of the tunnel and meets the train, he covers 1/4 of the whole tunnel length. Thus, when he'll run in another direction, he'll be in the middle of the tunnel at the moment the train enters it. Since now they need the same time to reach the end of the tunnel -- one to pass the whole tunnel, anther -- to pass the halv. Thus their speeds are related as 2:1

Dmitri Krylov
Tuesday, August 19, 2003

Let:
S  be the distance from the railroad to the tunnel
T  be the length of the tunnel
Vb be the speed of the boy
Vr be the speed of the railroad

Then, since Distance / Speed = Time, in the first scenario in which the boy run 1/4 of the way back:

S / Vr = T / 4 / Vb or, since we're interested in the ratio of their speeds:

[eq. 1] 4 * S / T = Vr / Vb

In the second scenario in which the boy runs 3/4 out of the tunnel:

( S + T ) / Vr = 3 * T / 4 / Vb or, again solving for the ratio of their speeds:

[eq. 2] 4 * ( S + T ) / 3 / T = Vr / Vb

Set the left side of equation 1 equal to the left side of equation 2, and with a little work, you'll find:

[eq. 3] 2 * S = T

Then, substitute 2 * S in for T in the denominator of the left side of equation 1:

4 * S / 2 * S = Vr / Vb  or,

2 = Vr / Vb

Thus, the railroad has twice the speed of the boy.





anon
Thursday, August 21, 2003

*  Recent Topics

*  Fog Creek Home