There are $8$ pairs of $2$ balls, for a total of $16$ balls each. Two balls in the same pair are indistinguishable, but distinguishable from other pairs. How many ways are there to put these balls into $3$ bins where order doesn't matter?

I know that the "Stars and Bars" strategy is to put $n$ indistinguishable objects into $k$ distinguishable bins, but here, some balls are distinguishable and some balls are indistinguishable. I haven't made much progress on the problem. I know how to solve this problem if the balls were all distinguishable and evenly fit into the three bins. However, this problem seems to be a lot trickier. May I have some help? Thanks in advance.

  • $\begingroup$ If there is any part that you did not understand in my solution ,you can ask it $\endgroup$ Jul 8, 2021 at 12:13
  • $\begingroup$ Yes I know. Thanks very much for the solution. I'm pretty sure I understand it, I will ask you if I have any parts I don't understand. :) $\endgroup$
    – Star Light
    Jul 8, 2021 at 13:39

2 Answers 2


As far as i have understood the boxes are distinguishable and we want to disperse balls , lets call them $(a,a), (b,b),(c,c),(d,d),(e,e),(f,f),(g,g),(h,h)$ without restriction.

In this question ,dispersing different ball pairs are independent from each other , so disperse them separately and multiply them such that

Dispersing $(a,a)$ to three distingusihable bins : $$C(3+2-1,2)=6$$ ways

Dispersing $(b,b)$ to three distingusihable bins: $$C(2+3-1,2)=6$$ ways

This process goes to up to $(h,h)$

Then , $$6 \times 6\times 6 \times 6\times 6 \times 6\times 6\times6 = 6^8=1679616$$


Edit: see DavidK's comment, I'm incorrect

It sounds like the balls only become indistinguishable once they are put into a pair. Before pairing them up, we have $16$ distinguishable balls to pair up into $8$ pairs. We can do by choosing $2$ at a time, for a total of $8$ choices, so we calculate ${16\choose 2}{14\choose 2}...{2\choose 2}=\frac{16!}{2^8}$, but the order in which we make these choices doesn't matter, so to account for that we need to divide by $8!$

Now we've put the $16$ balls into $8$ distinguishable pairs, and we can simply count the number of ways to distribute $8$ distinguishable objects into $3$ distinguishable bins, which is $3^8$. So the final count is $3^8 \cdot \frac{16!}{2^88!}$

If the bins are not distinguishable, the problem becomes more complicated and requires the use of Stirling numbers.

  • $\begingroup$ The two balls in a pair are indistinguishable, not inseparable. You have counted only the ways to put both balls of the first pair in the same bin, not the ways to put the balls in two separate bins. Also, putting $n$ distinguishable objects in $k$ bins is $k^n,$ not $n^k.$ $\endgroup$
    – David K
    Aug 4, 2022 at 2:30
  • $\begingroup$ @DavidK I mistakenly thought they were inseparable, thank you for the correction and for catching my typo also. $\endgroup$
    – xojfqa
    Aug 4, 2022 at 2:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .