A riddle

FreshFish

Golden Member
May 16, 2004
1,180
0
0
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?
 

Sqube

Diamond Member
Dec 23, 2004
3,078
1
0
6 races
5 races of 5 each, take the fastest one from each race, put them all together, top 3 are your 3 fastest.
 

Lonyo

Lifer
Aug 10, 2002
21,938
6
81
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.
 

laurenlex

Platinum Member
Feb 26, 2004
2,370
1
0
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.
 

cKGunslinger

Lifer
Nov 29, 1999
16,408
57
91
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.
 

exilera

Senior member
Apr 12, 2005
940
0
0
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.
 

FoBoT

No Lifer
Apr 30, 2001
63,084
15
81
fobot.com
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"
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
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.
 

FreshFish

Golden Member
May 16, 2004
1,180
0
0
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:
 

Furyline

Golden Member
Nov 1, 2001
1,212
0
0
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.
 

FreshFish

Golden Member
May 16, 2004
1,180
0
0
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 :(
 

Crazymofo

Platinum Member
May 14, 2003
2,339
0
0
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!
 

Furyline

Golden Member
Nov 1, 2001
1,212
0
0
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.
 

Chronoshock

Diamond Member
Jul 6, 2004
4,860
1
81
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
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
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.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
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.
 

cKGunslinger

Lifer
Nov 29, 1999
16,408
57
91
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..
 

HonkeyDonk

Diamond Member
Oct 14, 2001
4,020
0
0
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?
 

Furyline

Golden Member
Nov 1, 2001
1,212
0
0
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!