# A logic problem, which involves math

Imagine I'm walking in a tunnel and I stop, seeing that I am three eights of the way in. The tunnel is divided into eight equal length sections.

All of a sudden, I hear the engine noise of a train behind me. Now, the speed of the train is unknown. To survive, I have to run out of the tunnel as quickly as possible.

I have two choices, running forwards or backwards. If I run backwards in the direction of the train, I will be able to get out of the tunnel right at the moment the train comes in the tunnel. If I run forwards in the way the train is coming, the train will exit the tunnel at the same time as I do.

What is my speed?

• @Anupam: Pretty clearly the ground. It'd be just weird to use the train's reference frame; you might as well use your own reference frame and declare the answer is 0. – user2357112 Apr 27 '14 at 16:14
• Say the train is distance $x$ from the tunnel, and moves with speed $v$. The you run $3/8$ in $x/v$, and you run $5/8$ in $(x+1)/v$. Does that help? – CunningTF Apr 27 '14 at 16:15
• You can't find an exact value if it is not given the speed of the train and its distance from the beginning of the tunnel. – Emin Apr 27 '14 at 16:17
• You can find it in terms of the trains speed though. – CunningTF Apr 27 '14 at 16:17
• You're going to have to give your speed in units of the train's speed. There's nothing in this that would let you give a number like "50 mph" or "0.5 c". – user2357112 Apr 27 '14 at 16:19

All I can figure out is that the train is $4$ times faster than you.

Let's say that you can run with a speed $v$, and the train, $u$. Let's also assume that the tunnel has length $8L$, and that the train is originally a distance $x$ away from the entrance of the tunnel. Then we have $$\frac{3L}{v} = \frac{x}{u}$$ and $$\frac{5L}{v} = \frac{x+8L}{u}$$

We therefore have $$\frac{5}{3} \cdot \frac{x}{u} = \frac{x+8L}{u}$$

Solving this, we get $$\frac{2}{3} x = 8L \Rightarrow x = 12L$$

Plugging it back in, we get $$\frac{3L}{v} = \frac{12L}{u} \Rightarrow \frac{u}{v} = 4$$

• So Anupams question is right! We can find the speed of the man in terms of the speed of the train. – Emin Apr 27 '14 at 16:24
• @Emin: In that sense, though, it doesn't make sense to find the speed of the man in terms of the speed of the ground. Either way I look at it, that comment seems kind of strange. – user2357112 Apr 27 '14 at 16:28
• Yeah, this seems right – most venerable sir Apr 27 '14 at 16:45
• @user2357112 My bad. – user103816 Apr 27 '14 at 17:15

In the time it takes the train to reach the start of the tunnel, you can travel 3/8 the length of the tunnel. That means if you had instead run away from the train, you would be 3/4 of the way through the tunnel when the train reached the entrance. How fast would you have to go to traverse the remaining 1/4 of the tunnel in the time it takes the train to go through the whole tunnel?

• It is actually great, I didn't realize it in time. – most venerable sir May 3 '14 at 21:52

According to the data you are giving, you die if you run. Either way, you leave the tunnel just as the train enters or exits. No time to leave the tracks. Big splash, that's it.

Now some people calculated that you run at 1/4th the speed of the train. That's not quite right. You run either 3/8ths or 5/8ths of the tunnel, obviously at maximum speed. It is inevitable that your speed for 5/8ths of the tunnel will be lower because of exhaustion. If you can run 3/8ths of the tunnel at x meter/second, and 5/8ths of the tunnel at y meter/second, and the length of the tunnel is t meters, then your running time it (3t/8x) vs (5t/8y) seconds. The train therefore takes t/8 (5/y - 3/x) seconds to cross the tunnel, which means 8 / (5/y - 3/x) meter per seconds. The proportion of your speed divided by the speed of the train is (5x/y - 3) / 8 over the shorter distance, and (5 - 3y/x) / 8 over the longer distance. The first is a bit more than 1/4, the latter is a bit less, unless x = y.

Since the train is going quite slow, I'd recommend taking off any lose clothing as quickly as possible, then lying down as flat as possible between the tracks and praying while you let the train drive over you.

"Imagine I'm walking in a tunnel and I stop [...] What is my speed?"

You stopped, your speed is zero.

• Funny seeing someone who has no idea what logic really is posting a logic problem. Sorry – most venerable sir Apr 27 '14 at 21:37
• This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – naslundx Apr 27 '14 at 22:12
• @naslundx The question is "What is my speed?" to which the answer is zero. As the question stands, until you stop thinking and start running, your speed is zero. If the question was "How fast can I run?" then all this fun math would be useful. – RiverFog Apr 27 '14 at 22:20
• Being pedantic can be fun at times, but this is not a useful answer. – Henry Swanson Apr 27 '14 at 23:56