# Use generating functions to find the number of ways to select 10 balls

Use generating functions to find the number of ways to select 10 balls from a large pile of red, white and blue balls if:

a) the selection has at least 2 balls of each color,

b) the selection has at least 2 red balls.

I can say that I understand generating functions themselves, but task about using them in task like this places me in position in which I don't have any idea how to even start thinking about it.

• This problem is easy to solve by other means, though, yes? At least that will tell you what the answer is...always a plus! As to doing it with generating functions...do you know how to do it if you drop the color restrictions? – lulu Jun 6 '18 at 18:39
• It may help to think of the problem in terms of number of integer solutions to equations, and also to generalize to $r$ balls instead of $10$. For example, consider the number of integer solutions to $x_1+x_2+x_3 = r$ subject to $x_i \ge 2$ for all $i$. If you can solve this by a generating function, then the particular case $r=10$ solves a). – awkward Jun 7 '18 at 13:05
• I read somewhere that options to choose red balls could be written in this form $x^2+x^3+x^4+...=x^2/(1-x)$ and white ones $1+x+x^2+x^3+x^4+...=x/(1-x)$ (same for blue colored). However I don't really get what $x$ represents here. – James Smith Jun 9 '18 at 10:44