Problem 493
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.
This forum is NOT meant to discuss solution methods for a problem.
In particular don't post any code fragments or results.
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
Don't start begging others to give partial answers to problems
Don't ask for hints how to solve a problem
Don't start a new topic for a problem if there already exists one
See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
-
sheepweevil
- Posts: 1
- Joined: Tue Apr 26, 2016 12:15 am
Problem 493
Are the balls drawn with or without replacement? It's not clear to me from the problem description.
- mpiotte
- Administrator
- Posts: 1961
- Joined: Tue May 08, 2012 5:40 pm
- Location: Montréal, Canada
Re: Problem 493
Without replacement.sheepweevil wrote:Are the balls drawn with or without replacement? It's not clear to me from the problem description.

-
Ellenion
- Posts: 16
- Joined: Fri Jul 14, 2017 11:09 pm
-
merlinnimue
- Posts: 4
- Joined: Sun Aug 28, 2016 4:27 pm
Re: Problem 493
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.
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.

-
traxex
- Posts: 66
- Joined: Thu Oct 19, 2017 1:30 pm
Re: Problem 493
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.
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.
Technically, everyone is full of himself.
- RobertStanforth
- Administrator
- Posts: 2664
- Joined: Mon Dec 30, 2013 11:25 pm
Re: Problem 493
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.
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.
-
abiramia
- Posts: 3
- Joined: Mon Jan 05, 2026 5:22 pm
Re: Problem 493
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
Thanks!
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
Thanks!
