You have 25 horses and a track that can race 5 horses at a time. You don't know their times but can see their speed relative to other horses. What is the least possible amount of races to find the fastest 5 horses.
My thought process is I race 5 of them in order and (for simplicity's sake) get 1,6,11,16,21 as the fastest of each group. Then for the 6th race, race these 5 and get them in order again for simplicity's sake. We now know that 1 is the fastest of all horses. For the 7th race I would race 3,7,11,12,16 to try and get information on other horses knowing that 2 or 6 will be guaranteed to be in top 5. But when I begin casing it out, I get confused. Any help or insight would be appreciated.
Edit: Similar problems were considered , for example
(rank all horses) How to find a total order with constrained comparisons
(top 3 horses instead of top 5) Why $6$ races are not sufficient in the $25$ horses, $5$ tracks problem
Not the same as top 3 as racing 2,3,6,7,11 is insufficient for top 5 as the case of 6,7,11,2,3 requires 2 extra races and I believe (might be wrong) that this can be done in 8. I am just not sure which horses are required for race 7.