Twenty-Five Horses

  • Hard
  • Mathematical puzzles
  • Tests: Eliminating by transitivity

The puzzle

You have twenty-five horses and a track that holds five at a time. Each horse runs at a fixed speed and no two are equal.

You have no stopwatch - a race tells you only the order the five finished in, not their times, so you cannot compare horses from different races directly.

What is the smallest number of races that guarantees you identify the fastest three, in order?

Stuck?

One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.

Hint 1

Five races gets every horse onto the track once. What do you know afterwards?

Hint 2

After the race of winners, work out for each horse whether three horses are already known to be faster than it. If so, it cannot be in the top three.

Show the answer Hide the answer

Seven races.

How to get there

Races 1 to 5: run all twenty-five in five groups of five. Call the groups A to E and write A1 for the winner of group A, A2 for its runner-up, and so on.

Race 6: run the five group winners, A1 to E1. Say they finish in the order A1, B1, C1, D1, E1. A1 beat every other group winner, and each group winner beat its own group - so A1 is the fastest of all twenty-five. That is one of the three found, with no further racing needed.

Now eliminate. D1 and E1 are slower than A1, B1 and C1, so neither they nor anything in their groups can be in the top three. In group C, only C1 survives: C2 is behind C1, which is behind B1 and A1, making three horses faster. In group B, B1 and B2 survive and B3 does not. In group A, A2 and A3 survive and A4 does not.

Five horses remain in contention: A2, A3, B1, B2 and C1. Race 7 puts exactly those five on the track, and its first two finishers are the second and third fastest overall.

The technique worth keeping

The work is the elimination, not the racing. For each horse, ask how many horses are already known to beat it - if the answer is three or more, it is out, and you never need to race it again. Counting known-faster horses is the move, and it is why exactly five candidates survive, which is exactly one track.