# Distributing identical objects to identical boxes

We have 6 identical things to be distributed in 4 identical boxes such that empty boxes are allowed the find the number of ways to distribute the things ?

-
See the related discussion here, since yours is a very similar problem: math.stackexchange.com/questions/370439/… –  RecklessReckoner Apr 26 '13 at 5:23

Distributing identical objects to identical boxes is the same as problems of integer partitions.

So if the objects and the boxes are identical, then we want to find the number of ways of writing the positive integer $n$ as a sum of positive integers. That is, if we consider the integers a sequence of positive integers $(a_1,a_2,\dots,a_k)$ such that the sum of those $a_i$ (for all $i$) sum to $n$, then the sequence $(a_1,a_2,\dots,a_k)$ form a partition on $n$. Note: $(1,3)$ is the same as $(3,1)$

You could:

1. Count by hand if the integer is small enough (as in this case). (See Aziumut's solution)
2. Use a Ferrer's diagram. As a hint there's a "faster" way to count those partitions if you make use of some of the relevant theorems.
-

The result is the number of partitions of 6 into a sum of 4 integral summands $\geq 0$.

The possibilities are $$6 = 6 + 0 + 0 + 0 \\ = 5 + 1 + 0 + 0 \\ = 4 + 2 + 0 + 0 \\ = 4 + 1 + 1 + 0 \\ = 3 + 3 + 0 + 0 \\ = 3 + 2 + 1 + 0 \\ = 3 + 1 + 1 + 1 \\ = 2 + 2 + 2 + 0 \\ = 2 + 2 + 1 + 1$$

so the answer is $9$.

-

Since all objects and boxes are identical, this means we don't care which object goes to which box, the only thing we care about is how many objects in each boxes, and this is equivalent to say how many ways can you partition a number $r$ into $k$ parts?

if we let $P_k(r)$ be the number of way to partition the number $r$ into $k$ parts, in your case $k=4$ and $r=6$, then we have to find how many ways we can partition 6 into 4 parts. But also keep in mind that there is allowing empty boxes, this means that we may also have to consider the partition of 6 in to 3 parts, 2 parts or 1 part, add up all cases which gives $$\sum_{k=1}^4P_k(6)$$ And yet, there is no "real" formula to calculate $P_k(r)$, but for small numbers you may count it by hand.

-