Answer: 7 races.
Optimal strategy:
Races 1-5: Divide the 25 horses into 5 groups of 5. Race each group.
- Let's call the groups: A, B, C, D, E
- Sorted in each group: A1 < A2 < A3 < A4 < A5 (and analogous for B, C, D, E)
Race 6: The winners of each group run: A1, B1, C1, D1, E1
- Suppose result: A1 < B1 < C1 < D1 < E1
Analysis:
- A1 is the fastest horse (guaranteed top 1)
- D1 and E1 (and everyone from D, E) cannot be in the top 3
- C1: could be top 3, but C2, C3, C4, C5 cannot
- B1: definitely top 3, B2 could be top 3
- A2, A3: they could be in the top 3
Candidates for positions 2 and 3:
Race 7: Race these 5 candidates
- The first two are global positions 2 and 3
Result:
- Fastest: A1
- Top 3: A1 + the first two of race 7
Total: 7 races