# Using generating functions to find number of possible ways to select colored balls from an urn

Suppose there are $300$ colored balls in an urn, with $100$ each of the colors red, blue, and green. How many ways are there to select $14$ balls from the urn if there must be at least $3$ but at most $10$ blue balls? Assume the order of selection does not matter.

If $b$ and $r$ are the number of blue and red balls taken from the urn, respectively, then I believe the answer to be

$$\sum_{b=3}^{10}\binom{100}b\sum_{r=0}^{14-b}\binom{100}r\binom{100}{11-r}$$

which apparently has a value of $2230480721192909724511239806000$. I obtained the above sum by generalizing cases in which $b$, then $r$, are fixed. (E.g. if $b=3$, that leaves us with $11$ remaining balls, all of which could be red and none of which would be green, etc.)

Is this correct? Next, how would I go about verifying this using a generating function?

## 1 Answer

Ping me for explanation (ravikaushik1095@gmail.com)

enter image description here
this is the link for solution image

• – Ravi Kaushik Apr 26 '17 at 10:47
• Welcome to Mathematics Stack Exchange! Please use MathJax to format your posts, instead of posting a picture. And leave your contact details in your profile. – Glorfindel Apr 26 '17 at 10:55
• I'm wondering why our solutions differ by such a great magnitude. Assuming my answer is wrong, would you be able to point out my mistake? – user170231 Apr 26 '17 at 15:47