# Tricky question

#### MichNugget

On a particularly strange railway line, there is just one infinitely long track, so overtaking
is impossible. Any time a train catches up to the one in front of it, they link up to form a
single train moving at the speed of the slower train. At first, there are three equally spaced
trains, each moving at a different speed. After all the linking that will happen has happened,
how many trains are there? What would have happened if the three equally spaced trains
had started in a different order, but each train kept its same starting speed? On average
(where we are averaging over all possible orderings of the three trains), how many trains will
there be after a long time has elapsed? What if at the start there are 4 trains (all moving
at different speeds)? Or 5? Or n? (Assume the Earth is flat and extends infinitely far in all
directions.)

#### romsek

Math Team
The final number of trains is a function of the order that the trains are initially placed on the track relative to to their speeds.

Suppose trains 1,2,3 have speeds a,b,c where a > b > c
The second train never catches the first and the third never catches the second. There will end up being 3 trains.

Now reverse this. In this case there will end up being a single train. We can make a table.
Assume that train 1 is faster than train 2 is faster than train 3 below.

$\begin{array}{cc}\text{order}&\text{# trains at end}\\ 123 &3\\ 231 &2\\ 312 &1\\ 132 &2\\ 321 &1\\ 213 &2 \end{array}$

You can average these.

I've given you enough of an idea about what's going on for you to be able to look at the 4 and 5 train cases.
Good luck!

#### skipjack

Forum Staff
Is this a current quiz or exam question? If so, isn't it expected that you use your skills rather than ours?