A man was walking through a tunnel. He is 1/4 of the way through when he hears a train approaching the tunnel from behind him.
If he turns and runs back, he will make it out of the tunnel just as the train is entering it (and will save himself by a hair). If he goes forward to the far end of the tunnel, he will also just barely make it, emerging from the tunnel just as the train is about to catch up to him.
If the man's running speed is 7 miles per hour, how fast is the train moving?
(from techInterview.org)
let the speed of train be X , tunnel length be D distance of train from tunnel be Z
The time taken by man to reach the end where train is coming is
D/28 = Z/X
D= 28Z/X
The time taken by man to reach the other end
3D/28 = (D+Z)/X
3Z/X = (28Z+XZ)/X^2
2XZ=28Z
X=14miles/hr
|
Posted by salil
on 2006-02-25 12:13:01 |