Answer to Puzzle #53: The train, the Station and the Bee.

53. A train enters a station at 50m/s where it starts to decelerate uniformly, coming to a complete stop at the end of the platform. The distance from the entrance to the station to the platform end is 500m. At the exact same moment as the train enters the station a Bee takes off from the buffers at the end of the platform and heads towards the train, when it reaches the front of the train it turns around and heads back to where it started. It continues to do this, start of the platform, front of the train, start of the platform back and forth until the train stops where up on it is crushed.

If the speed of the Bee is 40m/s how far does the Bee travel?
You can expand this question to determine, for example, the time of the first impact or, is there such a thing as (and if so what is it,) a minimum speed the Bee needs to travel at in order to be able to perform this feat?

This puzzle is just not as hard as it appears. No tricks. It's actually quite easy. It's based on a classic puzzle with two trains approaching each other, I've introduced the variable speed for bonus fun!:

picture of a train with a bee on the frontBefore reading the answer can I interest you in a clue?

Firstly some preamble. Don't let the meters per second, arbitrary units, unsettle if you are not used to working metric. Call them miles per hour if it suits. Secondly interview type questions are very rarely going to be testing your maths or your physics directly, there are other ways of demonstrating that. Probably the more maths you have done the more complicated you are making this in your head imagining summing some kind of geometric series of shortening Bee flights. Not necessary. These puzzles are designed to test the way you think not your maths.

We have the speed of the Bee and we can easily determine the total travel time from the uniform deceleration of the train. Using s=(u+v)t/2 the time the train spends in the station is 20 seconds. For more on how this is determined click here to display a paragraph on simple equations of motion.

In 20 seconds the Bee travels 800m

I think in terms of interviews that is probably about where it ends. Realising you don't have to sum an infinite series is the main thing. The rest is algebra heavy, probably too so to be asked in an interview. It doesn't mean though that you couldn't be asked how you might go about it.

Time of First Collision

Let's take a closer look at what's going on. The following graph is position up the Y axis and time along the X axis.

graph showing position over time for the bee and train

We can see there is a collision around 6 seconds that happens half way along the platform and this is what we will solve for. Using the strict sign convention of the buffers being 0 position and away from them is positive we have our setup. The maths is a bit messy.

vT0 = -50m/s
aT = 2.5m/s2 (from above)
vB = 40m/s
Position of the Bee = sB = vBt = 40t
Position of the train = sT = sT0 + vT0t + ½aTt2 = 500 - 50t + 1.25t2

graph to show positions for the bee and train over an extended time We are interested in when sB = sT so we put the two together and end up with a quadratic that looks likes
s = (90 ± √5600)/2.5 = 36 ± 29.933259 = 6.06674s

The significance of the other solution: Our model had the bee continuing, it didn't turn round, secondly the train was accelerating in a positive direction at a constant rate, it would not have stopped, it would have reversed it's path and continued to gain speed. As shown the train and the Bee would have met again at 2637m or 65.93s

Further Extension

My thinking was this. Can we be sure that when the Bee reaches the train and turns around, flying in the same direction as the train that the Bee will be able to fly faster than the train is currently travelling. I thought this might be interesting because, the faster the Bee is travelling the further down the track it will be when it meets the train and therefore the faster the train will be going. Conversely the slower the Bee flies the slower the train will be going at that point where it meets the train. So modelling this might be interesting. I had some help with this from the people over at stack exchange.

Firstly let's just check that our Bee will be OK. From the graph the gradients of the position, ie the velocity, look similar. That the point where they meet the Bee is travelling faster than the train. Keeping to our sign convention and origin we know vT = -50 + aTt, where aT = 2.5m/s2, this gives us the train moving at -34.833m/s at the point where they meet for the first time. So the Bee will indeed be able to out run it.

But at what speed would it not? Some equations we have already:
1) vT = -50 + (5/2)t
2) sT = -50t + (5/4)t2 + 500
3) sB = vBt

Now at the point we are interested in the front of the train and the Bee are in the same place on the track, as in sB = sT. So
vBt = -50t + (5/4)t2 + 500

Which is essentially the equation for collision time we solved above. Now however we are interested in the point when the Bee is just able to escape. As in vB = - vT, so we can substitute in equation 1.

-(-50 + (5/2)t)t = -50t + (5/4)t2 + 500
50t - (5/2)t2 = -50t + (5/4)t2 + 500
(15/4)t2 - 100t + 500 = 0

which solves to give t = 0 and t = 20/3

The significance of the t = 0 solution is that if the fly has zero velocity then they will meet at the buffers where the train will have zero speed. The intersting solution is t = 20/3. The speed associated with this time is 33⅓m/s and that is the minimum speed the Bee needs to be able to travel in order that it can survive.


As always with this kind of puzzle the assumptions are based around the fact that the train and the Bee are just analogues for idealised particles. So it's really anything you can think of to do with that. Such as the Bee turns instantly, (obviously defying the laws of physics,) has zero size, that sort of thing.

Both AI's got this puzzle wrong. Differently wrong, but wrong nonetheless.

If you're curious what Bard made of this puzzle...

If you're curious what ChatGPT made of this puzzle...

© Nigel Coldwell 2004 -  – The questions on this site may be reproduced without further permission, I do not claim copyright over them. The answers are mine and may not be reproduced without my expressed prior consent. Please inquire using the link at the top of the page. Secure version of this page.

PayPal - The safer, easier way to pay online.
I always think it's arrogant to add a donate button, but it has been requested. If I help you get a job though, you could buy me a pint! - nigel

This Website Uses Cookies

To increase the functionality of the site. The cookies I apply do not uniquely identify you, by continuing to use this site you agree to let me place a cookie. I also have advert and analytics providers, my advertising provider (Google,) does provide personalised adverts unless you specify otherwise, with them. For more information click here.x