Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

An urn contains $X$ red balls, $Y$ green balls, and $Z$ white balls. $N$ balls are drawn without replacement from the urn, and the colors are noted in sequence.

$N \leq X+Y+Z$

Trying to come up with algorithm to compute the number of elements in sample space.

share|cite|improve this question
up vote 0 down vote accepted

Hint First treat the case when $N < \min\{X,Y,Z\}$. Then what about $X < N < Y+Z$. Keep increasing the limitations until you get the general procedure.

share|cite|improve this answer
Even for the case of X=3, Y=2, Z=1 and N=3 I am not sure how to come up with an answer – Yevgeniy Rozhkov May 7 '13 at 18:09
@YevgeniyRozhkov for this case, i would condition on $z$ - it's either there or not, and if yes, choose a place for it. Now you reduced it to 2 elements and 2 or 3 places. 2 places are easy and for 3 you condition again. – gt6989b May 7 '13 at 19:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.