[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is there a way to mathematically model this problem? Sorry if

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 35
Thread images: 2

File: download (1).jpg (131KB, 680x478px) Image search: [Google]
download (1).jpg
131KB, 680x478px
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?
>>
This got me thinking, bump.
>>
>>8296828
google before posting, it was not hard to find at all...

http://www.programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle/
>>
>>8296835
Yeah but it's so much more fun to try and figure it out
>>
>>8296835
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
>>
>>8296844
The number of horses divided by the amount raced at each time, then the times raced divided by the desired amount of horses
>>
>>8296835
>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?
>>
>>8296835
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
>>
>>8296871
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
>>
>>8296828
5. Race 5 groups of 5 and time them with a normal clock.
>>
>>8296871
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.
>>
>>8296871
damn you dum
>>
>>8296894
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 /sci/ or /compsci/ because the lack of proofs seen here only rivals a shitty CS math class.
>>
>>8296893
>shitposting about a flaw that was already pointed out
If you want to just argue about something, go back to /pol/
>>
>>8296902
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.
>>
>>8296899
>spelling dumb as "dum"
Hey look, an autist trying to roast an autist
>>
>>8296907
Not him, but holy shit.

You vastly overestimate the intelligence of this board.
>>
>>8296912
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.
>>
>>8296916
SAVAGE
A
V
A
G
E
>>
>>8296907
>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/
>>
>>8296900
>because in your third step a would be the best of the best
No, you misunderstood. [math]a<b<c[/math] meant that [math]a[/math] is worse (slower) than [math]b[/math] and [math]c[/math].

>The 3 fastest horses were all in the first initial block.
Read my post again: The 2nd and 3rd best horses from the [math]c[/math]'s blocks are tested in the final race. (And again, [math]c[/math] is the best horse)
>>
>>8296918
>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/
>>
>>8296900
>>8296920
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.
>>
>>8296920
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.
>>
>>8296927
Then give us a proof for the lower bound fegit.
>>
File: whorses.png (53KB, 1832x908px) Image search: [Google]
whorses.png
53KB, 1832x908px
what am i doing wrong here
>>
>>8296907
>you are literally at the bottom of the board in terms of intelligence
>>8296923
>casually
>trying to dodge your breaking the first rule by implying your shitpost wasnt a shitpost
>>
>>8296923
>so triggered as as to think that was aggressive
>>
>>8296916
You aren't wrong, but drop the fedora.
>>
>>8296907
>newfag goes full SJW mode saying ugh go back to /b/
>>
>>8296940

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.
>>
>>8296828
How are horses selected to raise? Randomly? Tournament-style?
Thread posts: 35
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.