Basic combinatorics: In how many ways can we arrange $4$ different balls in $4$ identical boxes?

1.8k Views Asked by At

I stumbled upon a question I can not manage to answer.

In how many ways can we arrange $4$ different balls in $4$ identical boxes?

I do know there is no importance to the order they're set up so its either $D(n,k)$ or $C(n,k)$, but that's where I'm stuck.

Please can someone explain the answer logically to me?

3

There are 3 best solutions below

3
On

If the order is not important, then the number of ways to arrange them is simply $1$.

If the order is important, the number of ways to arrange $n$ objects is $n!=1\cdot2\cdot3\cdots n$

4
On

[Assuming multiple balls might be in one box, otherwise, consider Rhys Hughes's answer] There are $5$ partitions of $4$. Since the boxes are indistinguishable, this gives the following possibilities:

  • $[4]\vdash4$: All balls in one box gives one configuration.
  • $[3,1]\vdash4$: One ball is in one box, the other three in one of the three other boxes. Since the boxes are indistinguishable, this gives four options: choose the ball that does not share a box with other balls. Then the other three are in another box, so this choice completely determines the $[3,1]\vdash4$ configuration.
  • $[2,2]\vdash4$: This gives $3$ options: ball $1$ shares a box with some of the three other balls; and the remaining balls are then in the same box. We choose $2$ out of $4$, with $\{1,2\}$ and $\{3,4\}$ indistinguishable, so $\binom{4}{2}/2=3$ possibilities.
  • $[2,1,1]\vdash4$: This gives $6$ options. It goes like $[2,2]\vdash4$, but now we choose $2$ out of $4$, with $\{1,2\}$ and $\{3,4\}$ distinguishable. This gives $\binom{4}{2}=6$ possibilities.
  • $[1,1,1,1]\vdash4$: Since the boxes are indistinguishable, this gives one configuration.

Thus in total the balls can be divided in $15$ ways in the four indistinguishable boxes.

0
On

The number of ways to partition $n$ distinguishable balls into $k$ indistinguishable cells such that no cell is empty is given by $S(n,k)$ where $S(n,k)$ is the Stirling number of the second kind. Thus in your case the number of ways is given by $$ S(4,1)+S(4,2)+S(4,3)+S(4,4)=1+7+6+1=15. $$ Clearly $S(4,1)=1=S(4,4)$ and $S(4,3)=\binom{4}{2}=6$ since we choose which two balls go into the same box. Finally $S(4,2)=\frac{1}{2}(2^4-2)=2^3-1=7$ since the collection of pairs $(A,B)$ where $A, B$ partition $[4]$ (so $B=A^c$) is specified by requiring that $A$ be a nontrival subset of $[4]$. Since the boxes are indistinguishable we divide by $2$.