Originally Posted by

**Pinkk** Suppose there are seven distinct colored balls. How many ways can we distribute these seven balls among four identical containers where container(s) can be left empty?

I had a feeling that the solution is simply $\displaystyle 4^{7}$ but I might be leaving something out. Since the containers are identical, the order does that matter, so we can just simply line them up and then for each ball, there are four choices, so it would simply be $\displaystyle 4 \times 4\times 4\times 4 \times 4 \times 4\times 4 = 4^{7}$ But then I realized that having, for example, all of the balls in the "first container" is the same as having them all in the "last container" so I figure that we'd have to divide $\displaystyle 4^{7}$ by $\displaystyle 4!$. So would the answer simply be $\displaystyle \frac{4^{7}}{4!}$? Thanks.

Edit: Nevermind, that's not even a whole number. I'm kinda stuck. If no containers are to be left empty then it'd be, by Stirling numbers of a second kind, $\displaystyle \frac{1}{4!}[4^{7} -+ 4(3^{7}) + 6(2^{7}) - 4(1^{7})]$, but I am not sure how to account for the number of ways where there are empty container(s).