Suppose there are $4$ red apples, $5$ green apples, and $6$ yellow apples, $9$ of them will be put into a box. In how many different ways can apples be placed in the box if at least there is one apple of each color?
I've tried to solve this problem and got the result of $673596$ different possible compositions. Here's how I try to solve it.
One apple of each color must be in the box, therefore the new sample space is that containing $3$ red apples, $4$ green apples and $5$ yellow apples $(3R, 4G, 5Y)$, and because there are already $3$ apples in the box, I just need to pick the remaining $6$ apples.
The problem now reduced to how much partition of $12$ objects into $4$ part namely $R$ (for red apples), $G$ (for green apples), $Y$ (for yellow apples) and $N$ (for none of the three) are possible, which is.
for $R+G+Y = 6$, and $N = 6$.
My question is whether there is any some kind of generalization of this problem so that I could solve it easily without deliberately looking for every possible arrangement of $R$, $G$ and $Y$ (which is how I try to solve the problem).