Page 1 of 1

Problem 493

Posted: Tue Apr 26, 2016 12:57 am
by sheepweevil
Are the balls drawn with or without replacement? It's not clear to me from the problem description.

Re: Problem 493

Posted: Tue Apr 26, 2016 1:41 am
by mpiotte
sheepweevil wrote:Are the balls drawn with or without replacement? It's not clear to me from the problem description.
Without replacement.

Re: Problem 493

Posted: Fri Jul 14, 2017 11:34 pm
by Ellenion
LOL. Now I see why I got #493 wrong. Thanks for the tips.

Re: Problem 493

Posted: Fri Apr 27, 2018 5:22 pm
by merlinnimue
Hi, I apologize if this is the incorrect forum for this, but I had some issues regarding Problem 493.

It appears to me that the solution (which I confess to seeing elsewhere) assumes that the balls are distinguishable. The problem description suggests (at least to me) that the balls are indistinguishable apart from color (e.g., all red balls are distinguishable from all green balls, but no red ball is distinguishable from any other red ball). It is also not mentioned if the order of the draws is considered (i.e., if ROYGBIVROYGBIVROYGBI is distinct from RRROOOYYYGGGBBBIIIVV).

My initial approach was unordered and indistinguishable. This seemed plausible, but was too small.
My second approach was ORDERED and indistinguishable. This got me much closer, but not quite right.
Computing the case of unordered and DISTINGUISHABLE hits the sweet spot.
For completeness, I did ORDERED and DISTINGUISHABLE, and this is too big.

Perhaps the wording of the problem can be changed to reflect this, as it caused me much grief and I suspect may be frustrating others as well.

Thanks for your time.

Re: Problem 493

Posted: Fri Apr 27, 2018 6:57 pm
by traxex
The problem statement is absolutely clear to me. I don't understand what you mean by the differents variations you list.

I don't think there is a correct forum for discussing unsuccessful solution attempts, but if you've looked up the solution already then you can make a post in the closed forum with more details about your different approaches and any questions you have.

Re: Problem 493

Posted: Fri Apr 27, 2018 7:16 pm
by RobertStanforth
This is indeed the correct forum for discussing issues with understanding the wording of a problem.

The problem only talks about the number of distinct colours in the draw. So, whether the balls have any other distinguishing marks (aside from their colour) is irrelevant.

The order of the draw (and whether the order is remembered) is similarly irrelevant. For example, RRY and RYR both have two distinct colours.

Re: Problem 493

Posted: Tue Jan 27, 2026 9:36 am
by abiramia
Hi all.

I have been staring at my rather straightforward code for this problem for a couple of days now and simply cannot put a finger on why it does not return the correct solution.

The edge cases that I have tried (e.g., draw one ball, draw seventy balls) have given me reasonable solutions (i.e., one distinct color, and seven distinct colors, respectively).

From a quick Monte Carlo approach, it seems that my code is underestimating the expected value.

Would anyone be willing to look over my logic and perhaps give me pointer on what I am missing? If so, please message me :D

Thanks!