How many ways are there to put $4$ balls in $3$ boxes if the balls are distinguishable and the boxes are distinguishable?

I have seen many problems like this, indistinguishable and distinguishable, and many people have recommended Stirling numbers. Can someone show me how to find the answer using Stirling numbers, rather than Casework?


Stirling numbers of the second kind are useful when we have the extra condition that each box must have at least one ball. Since this restriction is not here, this problem is much easier.

In the unrestricted case, we can count the number of ways to put $k$ distinguishable balls into $n$ distinguishable boxes by $n^k$ as Peter suggested in the comments. This follows from the multiplication principle since the first ball has $n$ places it could go, and regardless of where the first ball went, the second ball also has $n$ choices for where it can go, and so forth for all $k$ of the balls. (This no longer works if we have restrictions like each box needs at least one ball, which is why we need more advanced counting techniques involving Stirling numbers for this.)

Applying this to your example, again as Peter pointed out, there are $3^4=81$ ways to distribute four distinguishable balls into three distinguishable boxes.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.