Fog Creek Software
Discussion Board




railroad bridge


the problem:

a man needs to go through a train tunnel.  he starts through the tunnel and
when he gets 1/4 the way through the tunnel, he hears the train whistle behind
him. you don't know how far away the train is, or how fast it is going, (or how
fast he is going).  all you know is that

if the man turns around and runs back the way he came, he will just barely make
it out of the tunnel alive before the train hits him. if the man keeps running
through the tunnel, he will also just barely make it out of the tunnel alive
before the train hits him. assume the man runs the same speed whether he goes
back to the start or continues on through the tunnel.  also assume that he
accelerates to his top speed instantaneously.  assume the train misses him by
an infintisimal amount and all those other reasonable assumptions that go along
with puzzles like this so that some w@nker doesn't say the problem isn't well
defined.

how fast is the train going compared to the man?


-------------------------------------------

I think


|<--------D------->|<------------L-------------->|
train->v1              |<---L/4--->|

case (1)                      v2<-man
case (2)                                    man->v2


so the picture isn't to scale, however..............

time=distance/speed

t1=time to left end of tunnel
t2=time to right end of tunnel

case (1) => t1 = L/4v2 = D/v1
case (2) => t2 = 3L/4v2 = (D+L)/v1

2 equations, 2 'unknowns' (D & L)

eliminate D & divide by L

=> v1=2 v2

i.e. the train is twice as quick as the man.

dm
Monday, December 08, 2003

I arrived at the same conclusion; less mathematically.

The man starts at the 1/4 point, and to reach the half way point of the tunnel takes the same time as to reach the start.  We know the train will be at the start of the tunnel in the same amount of time as it takes the man to reach half way.  By the end of the tunnel, the train will have covered twice the distance as the man in the same time.

James
Wednesday, December 10, 2003

*  Recent Topics

*  Fog Creek Home