Fog Creek Software
Discussion Board




Railroad Tunnell

Basically this problem is simple algebra

Lets say that
x = distance between the train and the start of the tunnel
y = distance between the start and end of the tunnel
a = time for the man (and train) to get to the tunnel start
b = time for the man (and train) to get to the tunnel end
m = man's speed
t  = train's speed

t = x/a
t = (x+y)/b
m = (1/4)y/a
m = (3/4)y/b

Now we just solve
ta = x
tb = x+y
ma = y/4
mb = 3y/4

4ma = y
4mb = 3y
a = x/t
b = (x+y)/t
4m(x/t) = y
4m ((x+y)/t) = 3y

4mx = ty
4mx + 4my = 3ty

ty + 4my = 3ty
4my = 2ty
4m = 2t
2m = t

the train's speed is 2 times that of the man.

Mark
Thursday, May 22, 2003

Without going into the mathemetics of it, there is a logical way of doing this.

When the man runs towards the train. He covers 1/4th the length of the tunnel in as much time as the train takes to reach the start of the tunnel.

If he was to run away from the train, he would cover 1/4 the length of the tunnel again. Hence he would be standing in the middle of the tunnel. At this point the train would be at the start of the tunnel.

Now the man will cover the remaining half of the tunnel in as much time as the train would cover the full length of the tunnel, making the speed of the train 2 times that of the man !!

Yamini Kaur
Monday, May 26, 2003

*  Recent Topics

*  Fog Creek Home