Is there a way to mathematically model this problem? Sorry if it's a stupid question

Is there a way to mathematically model this problem? Sorry if it's a stupid question.

>Let’s say that you have 25 horses, and you want to pick the fastest 3 horses out of those 25. In each race, only 5 horses can run at the same time because there are only 5 tracks. What is the minimum number of races required to find the 3 fastest horses without using a stopwatch?

Other urls found in this thread:

programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle/
twitter.com/NSFWRedditVideo

This got me thinking, bump.

google before posting, it was not hard to find at all...

programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle/

Yeah but it's so much more fun to try and figure it out

yea i know the answer. I was wondering if there was a way to model this though, as in not having to do it long hand

The number of horses divided by the amount raced at each time, then the times raced divided by the desired amount of horses

>it was not hard to find at all...

>Posts an algorithm to find a solution
>People in the comments pointing out the mistakes
>The author does not even include a proof saying that is the smallest number

Are you trolling or do you have a retard certificate?

They say seven, but I think its six. You have a track of 5 and 25 horses. Race 5 each 5 times, pick the fastest out of the those races, and them make them race. Because you have five winners, all you have to do is race them at the same time and pick the three fastest

no. what happens if the first 5 horses (which you raced against themselves) were the fastest ones? you're stuck with the fastest one and 4 slow ones

5. Race 5 groups of 5 and time them with a normal clock.

The sad thing is that the author is actually wrong but even he was less wrong that you, given that even he realized why your method is flawed and did more steps to work around it.

1. Divide horses into 5 blocks and make them race. You obtain the best 3 horses from each block.
2. Make the winners race against each other. Let's call the 3 winners of this race as [math]a < b < c[/math].
3. Make one final race where we have [math]a[/math] and the 2nd and 3rd best horses from [math]b[/math]'s and [math]c[/math]'s blocks.

Takes 5 + 1 + 1 = 7 races and then you have enough information to determine the best 3 horses.

damn you dum

Counter example:

The 3 fastest horses were all in the first initial block.

Here, because in your third step a would be the best of the best, b's and c's block would not contain the other 2 best horses, which are all on a's block.

>People keep making the same mistake
>People feel confidnet in posting their retard procedure without even posting a proof that shows this is the lower bound.

Is this Veeky Forums or /compsci/ because the lack of proofs seen here only rivals a shitty CS math class.

>shitposting about a flaw that was already pointed out
If you want to just argue about something, go back to /pol/

If you want to just be wrong about everything and be protected from being corrected because everyone else is as stupid as you then please go back to /b/.

If you want to stay here then get ready to get outsmarted at every turn. Specially when you are this retarded. You are literally at the bottom of the board in terms of intelligence if you made that mistake so you better get ready to catch a lot of shit.

>spelling dumb as "dum"
Hey look, an autist trying to roast an autist

Not him, but holy shit.

You vastly overestimate the intelligence of this board.

I am in this board.

I am smart enough to know that his solution is flawed.

He is below me in terms of intelligence.

His mistake is so elementary he is probably even below homework posters. He is the bottom of the bottom who would at least be able to find a valid answer, even if the not the lower bound. A homework poster would probably say something like 25 factorial and technically they would be right.

SAVAGE
A
V
A
G
E

>triggered
Being outsmarted is not the same as being corrected. Id rather be wrong and and proven wrong than keeping thinking im right about something im not.

And first rule, newfag. Dont talk about /b/

>because in your third step a would be the best of the best
No, you misunderstood. [math]a

>Id rather be wrong and and proven wrong than keeping thinking im right about something im not.

No you don't given that you felt the need to answer so aggressively towards my first post that was casually pointing out why your method was flawed.

You even went full SJW mode with your cute
>ugh go back 2 /pol/

And just to add: The final race is NOT to determine who is the winner. It's just to check whether [math]a[/math] really is the 3rd fastest and whether [math]b[/math] is the 2nd best like the 6th race suggested.

Okay I think I get it now.

I'm surrounded by anons and questions, and there is something utterly banal and sad about this one.

Then give us a proof for the lower bound fegit.

what am i doing wrong here

>you are literally at the bottom of the board in terms of intelligence
>casually
>trying to dodge your breaking the first rule by implying your shitpost wasnt a shitpost

>so triggered as as to think that was aggressive

You aren't wrong, but drop the fedora.

>newfag goes full SJW mode saying ugh go back to /b/

nevermind i see why i was being retarded

the 2nd or third fastest horses in any of the initial 5 race blocks could potentially be faster than the fastest horse in a separate block

Isn't it 7?
Races 1-5 is the 25 divided into groups of 5

Race 6 is winners from each of those races going against each other. Winner is the fastest horse.

Second fastest must have raced 1st place horse, so it is either second place horse in race 6 or second place horse in the other race 1st place horse was in. This gives us two horses, A and B, for race 7.

Using same logic, 3rd fastest horse must have raced 2nd fastest horse. So we get 3rd place horse from race 6, 3rd place horse in first race horse A was in, and 3rd place horse in first race horse B was in.
Now we run race 7. 1st and 2nd place horses in race 7 are second and third fastest horses, respectively.

How are horses selected to raise? Randomly? Tournament-style?