# How many ways can $28$ black balls and $10$ white ones be put in $3$ urns?

I am trying to figure out in how many ways, one can put $28$ black balls and $10$ white ones in $3$ urns. Can you assist please? Thank you.

• Any more conditions? Nov 1, 2015 at 7:55
• No, just the number of different ways Nov 1, 2015 at 7:55
• Are the urns identical or distinct? Nov 1, 2015 at 8:14
• Identical I think...not sure I understand the question Nov 1, 2015 at 8:18
• For example is (7,3), (2,1), (19,6) different to (2,1), (19,6), (7,6) where (b,w) is the number of black and white in each urn. Nov 1, 2015 at 8:20

Here I am assuming that the urns in your question are distinguishable.

Now, since the urns are identical all we need to do is to treat the case of black and white balls independently. Putting 28 black balls in three urns is equivalent to finding three non-negative integers whose sum is 28 i.e. \begin{align} x_1+x_2+x_3=28 \end{align} Here $x_1,x_2,x_3$ are non-negative integers.

This is a problem of "combinations with repetitions", also known as the "stars and bars" problem. The number of ways of making s selections from among r distinguishable possibilities, where the order does not matter and repetitions are allowed is \begin{align} {r+s-1 \choose s} \end{align}

Hence the number of possibilities in our case is ${30 \choose 28}$.

Similarly in the case of white balls it is ${12 \choose 10}$.

Hence, the total number of ways is ${12 \choose 10}{30 \choose 28}$.

P.S.: You can find a question similar to yours here

• Your answer makes sense if balls of the same color are identical and the urns are distinct (which I think is the natural interpretation). If the urns were identical, we would have to divide by the $3!$ ways of arranging the urns. If the balls were distinct and the urns were distinct, we would have three choices for each ball. If the balls were distinct and the urns were identical, the answer would involve Stirling numbers of the second kind. The linked problem is different than the one you solved here since it requires at least one ball to be placed in each urn. Nov 1, 2015 at 9:06
• I don't think we could've directly divided by 3!, since dividing by 3! is fine for the case when the number of balls in each urn is distinct, but when two of them have the same number of balls we only have to divide by 3 so as to make up for the double counting if urns are identical. Nov 1, 2015 at 11:03

If each urn is distinct then the white and black balls can be considered separately.

There are 66 $(\space =\space^{12}C_10)$ ways to distribute 10 white balls between the 3 urns.

There are 435 $(\space =\space^{30}C_28)$ ways to distribute 28 black balls between the 3 urns.

So there is 28710 total ways to distribute 38 balls assuming that each ball is distinct.

• Your answer makes sense if balls of the same color are identical and the urns are distinct (which I think is the natural interpretation). If the urns were identical, we would have to divide by the $3!$ ways of arranging the urns. If the balls were distinct and the urns were distinct, we would have three choices for each ball. If the balls were distinct and the urns were identical, the answer would involve Stirling numbers of the second kind. Nov 1, 2015 at 9:05
• thank you, where does 12 and 30 comes from ? Nov 1, 2015 at 11:06
• @N.F.Taussig Its more complicated than dividing by 3! as some arrangements of urns will be identical within the six. E.g. (0,0), (0,0), (28,10) only occurs 3 times not 6 times. Brute force with a computer gave me 4830 arrangements. Nov 1, 2015 at 13:00
• @user3275222 The 12 and 30 come from 10+3-1 and 28+3-1. This is balls + urns - 1. Nov 1, 2015 at 13:03