A riddle

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

TheNinja

Lifer
Jan 22, 2003
12,207
1
0
Originally posted by: Furyline
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!

ya, something to that effect is what I was thinking. I think less than 9 is possible using this idea.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: Furyline
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!
Nice work, this is deterministic / guaranteed, unlike DrPizza's.

 

Electric Amish

Elite Member
Oct 11, 1999
23,578
1
0
Originally posted by: cKGunslinger
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..

You can't guarantee that any of the horses in the next race(s) are faster than the slowest 2 that you eliminated in the first race...
 

cKGunslinger

Lifer
Nov 29, 1999
16,408
57
91
Originally posted by: Furyline
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!

I think I understand what you are saying, but I still come up with 11 doing it in my head.

edit: D'oh. I got it now. You can drop out whole groups based on the winners in that race losing to the 3 others. Nice work!
 

cKGunslinger

Lifer
Nov 29, 1999
16,408
57
91
Originally posted by: Electric Amish
Originally posted by: cKGunslinger
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..

You can't guarantee that any of the horses in the next race(s) are faster than the slowest 2 that you eliminated in the first race...

So? If none of them are, then you already have the 3 fastest horses. Those 2 you eliminated have shown that thre are at least 3 other horses that can beat them, so they are totally eliminated.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
Originally posted by: Electric Amish
edit: Yeah, what FuryLine said..

You can't guarantee that any of the horses in the next race(s) are faster than the slowest 2 that you eliminated in the first race...
It works since you're only looking for 3. The first five races are each separate groups (1-5, 6-10, 11-15) and you drop the 2 slowest from that group. You're left with 3 from each group = 15.

Then FuryLine's followup post shows how to eliminate 2 groups of 3 in the next race since the fastest from each group is raced you know the other 2 in each group are slower still.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
8 races:

First, 5 races of 5 horses each. Eliminate the bottom 2 horses of each race. You are left with 15 horses.
Second, race the 5 winners of the first 5 races. Eliminate the bottom 2 of that race and every horse in their group from their first race. You are left with 9 horses.
Third, race the 3 winners left from the first 5 races, and add in 2 second place finishers from the first 5 races. Eliminate the bottom two from that race, and every horse in their group from their first race. You are left with a maximum of 5 horses (possibly less if one of the original first place finishers didn't get in the top 3).

Finally, race the 5 remaining horses to get your overall top 3.

Total of 5+1+1+1 = 8 races.
 

ArmenK

Golden Member
Oct 16, 2000
1,600
1
0
Race all of them in groups of 5: 5 Races; keep track if which horse was in which race
Race all of the winners: 1 Race; eliminate all the horses from the bottom 2 horses groups including those 2 horses; you have your fastest horse already
Race for second place: 1 race; Race the horse that got second in the previous race against the 4 that the fastest horse beat
Race for third place: 2 Races; Race the third place horse from 2 races ago against the 1st and 2nd places horses

9 total
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Another quick solution, if you're looking for a guarantee (edit: I think this actually is the minimum # of races possible, unless some weird if-then strategy yields 6 races)

Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.

Now for the playoffs.
Top horse from each race in the first playoff
(this is race 6)
whichever horses finish 4th and 5th in that race, you don't have to consider them or the other horses in their first races... you've eliminated a total of 6 more horses... the field has been narrowed to 9.
For the horse that came in 3rd, you don't have to consider the other two horses that haven't been eliminated from its first race
You're down to 7 horses. AND, you don't have to consider the 3rd place finisher of the first race with the horse that came in 2nd; down to 6 horses.

So, what you have left, after 6 races, is
the winner of the 6th race, plus the two horses that finished behind it in the preliminaries
the 2nd place of the 6th race, plus the one horse that finished behind it in the preliminaries,
plus the 3rd place in the 6th race.

You only need one more race to determine the top 3.

Therefore, 7 races total.



Now, to determine the 8th race is a little more tricky..
if from race 1 horses A and B both win, then horse C is potentially faster than the 3rd place horse in the first playoff race... horse C will need to be included in the 8th race. Ditto from race 2, 4, and 5. If the 2nd place horse in the 3rd race places hig
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Originally posted by: DaveSimmons
Originally posted by: Furyline
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!
Nice work, this is deterministic / guaranteed, unlike DrPizza's.

bite me :) :p
I got it down to 7, deterministically, guaranteed.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: DrPizza
Another quick solution, if you're looking for a guarantee (edit: I think this actually is the minimum # of races possible, unless some weird if-then strategy yields 6 races)

Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.

Now for the playoffs.
Top horse from each race in the first playoff
(this is race 6)
whichever horses finish 4th and 5th in that race, you don't have to consider them or the other horses in their first races... you've eliminated a total of 6 more horses... the field has been narrowed to 9.
For the horse that came in 3rd, you don't have to consider the other two horses that haven't been eliminated from its first race
You're down to 7 horses. AND, you don't have to consider the 3rd place finisher of the first race with the horse that came in 2nd; down to 6 horses.

So, what you have left, after 6 races, is
the winner of the 6th race, plus the two horses that finished behind it in the preliminaries
the 2nd place of the 6th race, plus the one horse that finished behind it in the preliminaries,
plus the 3rd place in the 6th race.

You only need one more race to determine the top 3.

Therefore, 7 races total.

You got it down to 6 horses with 6 races. How do you determine the top 3 from just one race?

EDIT: BTW, OP. What job were you applying for?

EDIT2: Ok, I see. You don't race the first place horse.
 

TheNinja

Lifer
Jan 22, 2003
12,207
1
0
Originally posted by: chuckywang
Originally posted by: DrPizza
Another quick solution, if you're looking for a guarantee (edit: I think this actually is the minimum # of races possible, unless some weird if-then strategy yields 6 races)

Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.

Now for the playoffs.
Top horse from each race in the first playoff
(this is race 6)
whichever horses finish 4th and 5th in that race, you don't have to consider them or the other horses in their first races... you've eliminated a total of 6 more horses... the field has been narrowed to 9.
For the horse that came in 3rd, you don't have to consider the other two horses that haven't been eliminated from its first race
You're down to 7 horses. AND, you don't have to consider the 3rd place finisher of the first race with the horse that came in 2nd; down to 6 horses.

So, what you have left, after 6 races, is
the winner of the 6th race, plus the two horses that finished behind it in the preliminaries
the 2nd place of the 6th race, plus the one horse that finished behind it in the preliminaries,
plus the 3rd place in the 6th race.

You only need one more race to determine the top 3.

Therefore, 7 races total.

You got it down to 6 horses with 6 races. How do you determine the top 3 from just one race?

In the final #7 race you don't have to race the horse that won his initial heat plus the first playoff (race#7) heat b/c he's automatically in the top 3....or am I mistaken?
 

b0mbrman

Lifer
Jun 1, 2001
29,470
1
81
Ok...I'm not reading any of the responses at first, but here is what I think:

Races 1-5
-Produces winners A1, B1, etc. placers A2, B2, etc. and showers A3, B3, etc.
-All 4's and 5's are eliminated
-Still in the running are A1-3, B1-3, C1-3, D1-3, and E1-3

Race 6
-A1 v B1 v C1 v D1 v E1
-A1 win, B1 place, C1 show
-All D and E horses are elminated, C2+ are eliminated, B3+ are eliminated
-A1 is clearly the fastest
-Still in the running are A1-3, B1-2, C1

Race 7
-A2 v A3 v B1 v B2 v C1
-Win and place are 2nd and 3rd fastest...

So...seven races. Is that right?
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: TheNinja
Originally posted by: chuckywang
Originally posted by: DrPizza
Another quick solution, if you're looking for a guarantee (edit: I think this actually is the minimum # of races possible, unless some weird if-then strategy yields 6 races)

Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.

Now for the playoffs.
Top horse from each race in the first playoff
(this is race 6)
whichever horses finish 4th and 5th in that race, you don't have to consider them or the other horses in their first races... you've eliminated a total of 6 more horses... the field has been narrowed to 9.
For the horse that came in 3rd, you don't have to consider the other two horses that haven't been eliminated from its first race
You're down to 7 horses. AND, you don't have to consider the 3rd place finisher of the first race with the horse that came in 2nd; down to 6 horses.

So, what you have left, after 6 races, is
the winner of the 6th race, plus the two horses that finished behind it in the preliminaries
the 2nd place of the 6th race, plus the one horse that finished behind it in the preliminaries,
plus the 3rd place in the 6th race.

You only need one more race to determine the top 3.

Therefore, 7 races total.

You got it down to 6 horses with 6 races. How do you determine the top 3 from just one race?

In the final #7 race you don't have to race the horse that won his initial heat plus the first playoff (race#7) heat b/c he's automatically in the top 3....or am I mistaken?

You are right. Read my EDITs above.
 

Yo Ma Ma

Lifer
Jan 21, 2000
11,635
2
0
Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.
Isn't there a problem where the 2 slower horses say from race #1 could be faster than the entire set of 5 from a different race? So you can't just eliminate the 10 'slowest' without some kind of rematch, right?
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Originally posted by: chuckywang
Originally posted by: DrPizza
Another quick solution, if you're looking for a guarantee (edit: I think this actually is the minimum # of races possible, unless some weird if-then strategy yields 6 races)

Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.

Now for the playoffs.
Top horse from each race in the first playoff
(this is race 6)
whichever horses finish 4th and 5th in that race, you don't have to consider them or the other horses in their first races... you've eliminated a total of 6 more horses... the field has been narrowed to 9.
For the horse that came in 3rd, you don't have to consider the other two horses that haven't been eliminated from its first race
You're down to 7 horses. AND, you don't have to consider the 3rd place finisher of the first race with the horse that came in 2nd; down to 6 horses.

So, what you have left, after 6 races, is
the winner of the 6th race, plus the two horses that finished behind it in the preliminaries
the 2nd place of the 6th race, plus the one horse that finished behind it in the preliminaries,
plus the 3rd place in the 6th race.

You only need one more race to determine the top 3.

Therefore, 7 races total.

You got it down to 6 horses with 6 races. How do you determine the top 3 from just one race?

EDIT: BTW, OP. What job were you applying for?

1st place is already the fastest of the fastest - the winner of the race of the winners. You're down to 6, but know 1st place. That leaves 5 other horses who could get 2nd or 3rd. 7th race, whoever gets first place is the 2nd fastest horse. Whoever gets 2nd place is the 3rd fastest horse.

I didn't fill in that part because I figured if you followed the previous logic, that step was obvious.
 

TheNinja

Lifer
Jan 22, 2003
12,207
1
0
Originally posted by: Yo Ma Ma
Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.
Isn't there a problem where the 2 slower horses say from race #1 could be faster than the entire set of 5 from a different race? So you can't just eliminate the 10 'slowest' without some kind of rematch, right?

but you only want the top 3. so you don't care if the 2 slowest horses are still faster than the other 20, you know they aren't faster than the top 3.
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
Originally posted by: Yo Ma Ma
Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.
Isn't there a problem where the 2 slower horses say from race #1 could be faster than the entire set of 5 from a different race? So you can't just eliminate the 10 'slowest' without some kind of rematch, right?

If a horse came in 4th place in *any* race, it certainly isn't one of the 3 fastest overall, since the 1st, 2nd, and 3rd place finishers in the race when it came in fourth are obviously faster than it.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: Yo Ma Ma
Start with 5 races. Each horse races in one of these.

obviously, the 4th and 5th place horses from each race are no longer in contention... 10 horses eliminated.
Isn't there a problem where the 2 slower horses say from race #1 could be faster than the entire set of 5 from a different race? So you can't just eliminate the 10 'slowest' without some kind of rematch, right?

No, the 2 slowest horses of any race cannot be in the top 3 since there are 3 horses faster than it.
 

FreshFish

Golden Member
May 16, 2004
1,180
0
0
DrPizza, MAME, and b0mbrman got it. Nice job guys. I eventually got the problem, it took me a bit though
 

MAME

Banned
Sep 19, 2003
9,281
1
0
Originally posted by: DrPizza
Originally posted by: MAME
I got 7

anyone get lower? what's the answer?

I got 7 and beat you by seconds! :p


PLUS I typed it all out!

fvck you :|:|:|


:D I actually solved it in a minute or 2 at the most, but I didn't test every possible outcome specifically but I was pretty sure it worked.

I'll read your solution and compare when I have time. Congrats!