In how many ways we could divide 300 same balls into three boxes so in each box not will be more than 180 balls

combinatoricsdiscrete mathematics

In how many ways we could divide 300 same balls into 3 boxes so in each box will not be more than 180 balls.

Is it correct if I want to sum all the options with $n+k+1\choose n-1$ and subtract all the "bad" options?

so we have $n+k+1\choose n-1$=$300+3-1\choose 300-1$
and we need to subtract "bad" options (how to calculate them?)

What the right way to do it?

Best Answer

Bad option means, you have put $181$ balls somewhere, therefore "remove" these balls from consideration and distribute all the rest in all possible ways -- it should give you the number of "bad options" divided by three (number of ways to put 181 ball somewhere).

For test let's consider the problem with smaller numbers. Say you want to distribute $3$ balls to $3$ boxes so that no box contains more than $1$ ball. Obviously, there is only one way to do that. Now consider how do we get this number. The total number of distributions is $$ \begin{pmatrix} 3 + 3 - 1 \\ 3 - 1 \end{pmatrix} = 10. $$ Now consider bad options. There are two balls in one of the boxes, the remaining balls can be distributed $$ \begin{pmatrix} 1 + 3 - 1 \\ 3 - 1 \end{pmatrix} = 3 $$ different ways (quite obvious since I have $3$ boxes and I can put the remaining ball anywhere). Since the "removed" two balls can be in any box, the total number of bad options is $$ 3 \times 3 = 9. $$ Thus the number of good options is $$ 10 - 9 = 1. $$

UPD. Seems my answer caused some controversy, thus I add calculations for the mentioned case. The total number of all possible distributions is $$ t = \begin{pmatrix} 300+3-1\\3-1 \end{pmatrix} = 45451. $$ On the other hand, number of bad distributions is $$ b = 3 \begin{pmatrix} (300 - 181) + 3 - 1\\ 3 - 1 \end{pmatrix} = 21780. $$ Thus the result $$ t - b = 23671. $$