• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

A riddle

FreshFish

Golden Member
I was asked this as part of an interview for a job:

There are 25 horses and you want to find the fastest 3 horses. You have no stop watch. Races can have a maximum of 5 horses. What is the minimum number of races you have to run to find the fastest 3 horses?
 
6 races
5 races of 5 each, take the fastest one from each race, put them all together, top 3 are your 3 fastest.
 
Originally posted by: Sqube
6 races
5 races of 5 each, take the fastest one from each race, put them all together, top 3 are your 3 fastest.

Wrong.
What if #1 and #2 from one race are faster than #1 from the other 4 races?
The #2 from that race isn't included in the final race, despite being the second fastest horse overall.
 
Originally posted by: Sqube
6 races
5 races of 5 each, take the fastest one from each race, put them all together, top 3 are your 3 fastest.


But what if you had 3 really fast horses in one heat, and are eliminating 2 fast ones because they lost to the number one dude?

That said, I have no clue to the answer.
 
Originally posted by: Lonyo
Originally posted by: Sqube
6 races
5 races of 5 each, take the fastest one from each race, put them all together, top 3 are your 3 fastest.

Wrong.
What if #1 and #2 from one race are faster than #1 from the other 4 races?
The #2 from that race isn't included in the final race, despite being the second fastest horse overall.

QFT.
 
Originally posted by: Lonyo
Originally posted by: Sqube
6 races
5 races of 5 each, take the fastest one from each race, put them all together, top 3 are your 3 fastest.

Wrong.
What if #1 and #2 from one race are faster than #1 from the other 4 races?
The #2 from that race isn't included in the final race, despite being the second fastest horse overall.

It's not possible to come up with an answer unless you know the results of the first 5 races.
 
i can't do that kind of stuff, i would just tell the interviewer "no thanks, if you want someone to do riddles, i am not your man"
 
Well for this, you'll need a rifle and 23 rounds.

Have all your horses around, fire one round into the air. Proceed to kill the 22 slowest horses, and you're left with your 3 fastest.

So that being said, 0 races.
 
Originally posted by: BigJ
Well for this, you'll need a rifle and 23 rounds.

Have all your horses around, fire one round into the air. Proceed to kill the 22 slowest horses, and you're left with your 3 fastest.

So that being said, 0 races.

lol, I should have said this :thumbsup:
 
11 for a conservative guess.

Start with 5, take fastest three, race those against 2 new ones, take fastest three from that race, and so on.
After the first, there are 20 left, go through those in groups of two, so 11 races total. 3 fastest from the final race are the 3 fastest overall.

I'm sure this can be changed so there are fewer races.
 
Originally posted by: Furyline
11 for a conservative guess.

Start with 5, take fastest three, race those against 2 new ones, take fastest three from that race, and so on.
After the first, there are 20 left, go through those in groups of two, so 11 races total. 3 fastest from the final race are the 3 fastest overall.

I'm sure this can be changed so there are fewer races.

This was my first thought too, but not correct 🙁
 
0, shoot all but three horses and use them for dog food and you now have the three fastest.

edit... someone beat me to it!
 
Originally posted by: FreshFish
Originally posted by: Furyline
11 for a conservative guess.

Start with 5, take fastest three, race those against 2 new ones, take fastest three from that race, and so on.
After the first, there are 20 left, go through those in groups of two, so 11 races total. 3 fastest from the final race are the 3 fastest overall.

I'm sure this can be changed so there are fewer races.

This was my first thought too, but not correct 🙁


🙁 I keep thinking of different ways but it keeps coming out to 11.
 
Either 10 or 11 races

Do 5 races on the original 25 to get the top 15
Do 3 races on these 15 to get the top 9
Do 1 race on 5 of these 9 to get the top 3+remaining 4
Do 1 race on the remaining 4+slowest of the top 3
If the slowest is in first or there is only one faster, you can stop now, otherwise run one last race between the top 3 of the last race and the top 2 from the race before that
 
6 races.
problem doesn't say to guarantee finding the solution. But, for one particular solution, 6 races is sufficient:

Horses are A->Y
Race 1:
A, B, C, D, E
race 2:
winner of 1, plus F,G, H, I
If winner of race 1 does not place in the top 3 of race 2, then all in race 1 are eliminated.
race 3: winner of race 2, plus j, k, l, m
again, if winner of race 2 doesn't place in the top 3, then many more are eliminated.
race 4: winner of race 3, plus n, o, p, q
ditto
race 5: winner of race 4, plus r, s, t, u
again, if winner of 4 doesn't place in the top 3, then winner of 4 and all those slower are eliminated.
race 6: winner of 5, plus v, w, x, y.
Top 3 finishers in race 6 are the 3 fastest horses.
This neglects that the horses run slower because they are tired.

So, minimum is 6 races (as far as I can figure out.)
However, a minimum of 6 races doesn't *guarantee* that you'll have the top 3 horses. It's just the case for one particular situation. After that, there's a huge if-then tree before you have the minimum to guarantee.
 
I read this question, and then I went and dropped a deuce. While sitting on the john, I was thinking about this problem and I found a way to do it in 8 races. I'll post it after I unclog the toilet.
 
11 is an answer, but I don't kow if it is the minimum.

Basically, you race 5, then always keep the top 3 winners and bring in 2 other horses. This takes 11 races.

edit: Yeah, what FuryLine said..
 
i think the answer is either:

1. 42
2. eleventybillion
3. one!11

actually, i have no idea, my guess would be anywhere from 10-12 as well using same logic as many above.

What's the ans. OP?
 
Ok got it to 9...

5 races of 5 horses each. Keep the top 3 from each race, section them into race 1 2 3 4 5.
Race the 5 winners from the initial races. The bottom two in that race, drop other horses in their group.
Now you have 9 horses left. Race 5, keep top 3, add in 2, keep top 3, add in 2, those top 3 are the overall top 3.

So yeah 9 races!
 
Back
Top