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)
The man runs back 1/4 of the length of the tunnel and makes it out just in time. That means if he runs 1/4 of the distance the other way, the train will just be entering. This means that the man is 1/2 way through and the train is just entering.
The man gets out just as the train is about to catch him up. The train travelled twice as far as the man (the length of the tunnel as opposed to 1/2 of the length) in the same time, so it must have been travelling twice as fast.
The man was traveeling at 7 mph, so the train was going at 14 mph.
|
Posted by Lewis
on 2003-06-03 06:26:20 |