I made up a question such that
There are $3$ identical blue balls ,$2$ identical red balls , $5$ distinguishable yellow balls ,$4$ distinguishable green balls. We want to make a mixture consisting of $8$ balls by using these balls. How many ways are there
a-) If selection order does not matter
b-) If selection order matters
MY WORK =
a-) This part was easy by using generating functions such that
Blue balls = $(1+x +x^2 +x^3 ) $
Red balls = $(1+x +x^2 )$
Yellow balls = $(1+5x +10x^2 +10x^3 +5x^4 +x^5) $
Green balls = $(1+4x +6x^2 +4x^3 +x^4)$
We should find the coefficient of $[x^{8}]$ in the expansion of them .
b-) This part is where i hesitated my solution. I used exponential generating functions , but i am not sure about the exponential generating function of distinguishable balls.
Blue balls = $$\bigg(1+ \frac{x}{1!} +\frac{x^2}{2!} + \frac{x^3}{3!} \bigg ) $$
Red balls = $$\bigg(1+ \frac{x}{1!} +\frac{x^2}{2!} \bigg)$$
Yellow balls = $$ \bigg (1 + \frac{P(5,1) \times x}{1!} +\frac{P(5,2) \times x^2}{2!} + \frac{P(5,3) \times x^3}{3!} + \frac{P(5,4) \times x^4}{4!} + \frac{P(5,5) \times x^5}{5!} \bigg)$$
Green balls = $$ \bigg (1 + \frac{P(4,1) \times x}{1!} +\frac{P(4,2) \times x^2}{2!} + \frac{P(4,3) \times x^3}{3!} + \frac{P(4,4) \times x^4}{4!} \bigg)$$
So , i should find the coefficient of $\frac{x^{8}}{8!}$ or find the coefficient of $x^{8}$ and multiply it by $8!$.
I am not sure about part $b$ .I want you to check my solution.
Your work is all correct.
Here is a way to simplify your work. Give each of the yellow and green balls its own generating functions, since $5$ distinguishable yellow balls is the same as 5 different colors each with one ball. The g.f. for each of these colors with a single ball is $1+x$, for both the ordered and unordered cases. Therefore, the unordered case is $$ [x^8](1+x+x^2+x^3)(1+x+x^2)(1+x)^{5+4} $$ and the ordered case is $$ 8!\cdot [x^8](1+x+x^2/2!+x^3/3!)(1+x+x^2/2!)(1+x)^{5+4} $$