Question:
There are 25 horses and you need to find the fastest 3 among them. You have a race track that can race 5 horses at a time. You do not have any time measuring equipment to record time. How many minimum races are needed to find the the fastest 3.
Hint: Start by eliminating horses that cannot be in fastest 3.
Answer: 7
Explanation: Let us number each horses from 1 to 25 and divide them into group of 5. This can be represented as.
Group 1 | 1 | 2 | 3 | 4 | 5 |
Group 2 | 6 | 7 | 8 | 9 | 10 |
Group 3 | 11 | 12 | 13 | 14 | 15 |
Group 4 | 16 | 17 | 18 | 19 | 20 |
Group 5 | 21 | 22 | 23 | 24 | 25 |
Race each group and get the fastest 3 in each group. Say for simplicity in,
Group 1 – horses 1, 2, 3 were in 1st, 2nd and 3rd positions
Group 1 – horses 6, 7, 8 were in 1st, 2nd and 3rd positions
Group 1 – horses 11, 12, 13 were in 1st, 2nd and 3rd positions
Group 1 – horses 16, 17, 18 were in 1st, 2nd and 3rd positions
Group 1 – horses 21, 22, 23 were in 1st, 2nd and 3rd positions
Now we start by eliminating the horses that can’t be in the fastest 3. Since in each group we already know the fastest 3, the other 2 does not qualify to be the fastest among all 25.
Group 1 | 1 | 2 | 3 | ||
Group 2 | 6 | 7 | 8 | ||
Group 3 | 11 | 12 | 13 | ||
Group 4 | 16 | 17 | 18 | ||
Group 5 | 21 | 22 | 23 |
Now run the 6th race with 5 horses which came first in each group. i.e., horses 1, 6, 11, 16 and 21 runs the race. Now lets eliminate more horses that won’t qualify. For simplicity, lets assume 1, 6 and 11 won the 6th race at 1st, 2nd and 3rd place respectively. This means there are at least 3 horses that are faster than horses in group 4 and 5. So we can eliminate all the horses in group 4 and 5. i.e.,
Group 1 | 1 | 2 | 3 | ||
Group 2 | 6 | 7 | 8 | ||
Group 3 | 11 | 12 | 13 | ||
Group 4 | |||||
Group 5 |
Now if we look at remaining horses in group 1 all are potential candidates for fastest 3. But in group 2, the horse 8 is not a potential candidate as horses 6 and 7 are faster than horse 8 and horse 1 is faster than horse 6 (from 6th race). So we can safely eliminate horse 8.
Similarly horse 1, 6 and 11 are faster than horse 12 and 13. So we can eliminate those too. i.e.,
Group 1 | 1 | 2 | 3 | ||
Group 2 | 6 | 7 | |||
Group 3 | 11 | ||||
Group 4 | |||||
Group 5 |
6th race also tells for sure that 1st horse is the fastest among the 25 horses. This leaves horses 2, 3, 6, 7 and 11 to take 2nd and 3rd fastest position. So 2, 3, 6, 7 and 11 runs the 7th race and whoever takes 1st and 2nd in this race will be the fastest 2nd and 3rd among the 25.