In how many ways can we place $3$ red and $4$ blue balls into $3$ indistinguishable boxes so that no box is empty?
What if the boxes can be empty?
In how many ways can we place $3$ red and $4$ blue balls into $3$ indistinguishable boxes so that no box is empty?
What if the boxes can be empty?
Copyright © 2021 JogjaFile Inc.
Using the Polya Enumeration Theorem we get for the two cases using the cycle index of the symmetric group with empty boxes
$$Q_1 = [R^3 B^4] Z\left(S_3; (1+R+R^2+R^3)\times(1+B+B^2+B^3+B^4)\right)$$
and without
$$Q_2 = [R^3 B^4] Z\left(S_3; -1 + (1+R+R^2+R^3)\times(1+B+B^2+B^3+B^4)\right).$$
Now the cycle index is
$$Z(S_3) = 1/6\,{a_{{1}}}^{3}+1/2\,a_{{2}}a_{{1}}+1/3\,a_{{3}}.$$
Doing the substitution we find
$$\bbox[5px,border:2px solid #00A000]{ Q_1 = 28 \quad\text{and}\quad Q_2 = 18.}$$
If we want to do these by hand, here is an example. We use the alternate form
$$[R^3 B^4] Z\left(S_3; \frac{1}{1-R}\frac{1}{1-B}\right).$$
We get from the first term of the cycle index
$$[R^3 B^4] \frac{1}{6} \frac{1}{(1-R)^3}\frac{1}{(1-B)^3} = \frac{1}{6} {3+2\choose 2} {4+2\choose 2} = 25.$$
We get from the second term
$$[R^3 B^4] \frac{1}{2} \frac{1}{1-R^2}\frac{1}{1-B^2} \frac{1}{1-R}\frac{1}{1-B} = \frac{1}{2} (1+1)\times (1+1+1) = 3.$$
Here we have e.g. for the coefficient on $B^4$ the possibilities $(B^2)^2 (B^1)^0,$ $(B^2)^1 (B^1)^2$ and $(B^2)^0 (B^1)^4.$
At last we get from the third term
$$[R^3 B^4] \frac{1}{3} \frac{1}{1-R^3}\frac{1}{1-B^3} = 0.$$
Add these to obtain $25+3=28.$