Question #30daf

1 Answer
Jun 16, 2016

The number of distributions of nn objects among rr boxes, if empty boxes are allowed, equals to
((n+r-1)!)/((n!)(r-1)!)(n+r1)!(n!)(r1)!

Explanation:

If empty boxes are allowed, the problem is simple.
Let's model our problem using the following imaginary picture.

Assume, objects are dots on a line (so, we have nn dots), and vertical separators that are positioned between these dots signify the boundaries between the boxes (so, we have r-1r1 separators to model rr boxes).

Any position of these n+r-1n+r1 elements would model some distribution of objects in boxes. So, we have (n+r-1)!(n+r1)! permutations.

This is great, except we did not take into account that objects are identical. That means that any permutation of dots that leaves the mutual configuration of dots and separators unchanged produces the same distribution of objects among boxes. That means, the same distribution we have counted n!n! times. So, we have to reduce our number of permutations by a factor of n!n!.
That results in ((n+r-1)!)/(n!)(n+r1)!n! distributions.

Let's analyze it further. The separators also can be permuted without distorting the distribution of objects among boxes. That means that another division must be used to compensate for over-counting. There are (r-1)!(r1)! such permutations of r-1r1 separators that result in the same object distribution among boxes.
That leaves us with the number of distributions of
((n+r-1)!)/((n!)(r-1)!)(n+r1)!(n!)(r1)!

This is the final answer.