AFAIK, it is 'number of ways to place 4 identical balls into 3 containers' = 'throw 2 sticks between 4 balls, on the outside allowed' = C(6,2) = (6*5)/(2*1) = 15.

(3 containers, and not 4, because the number < 1000 and so has <= 3 digits.)

Originally Posted by iynait
number of ways to put 4 identical balls in 4 different containers. You can probably find this in any book on intro combinatorics. Then the answer is 7 choose 4, which is 35.
Here is an example:
http://mathforum.org/library/drmath/view/56226.html


Last edited by arlen1; 02/26/13 12:11 PM. Reason: corrected from C(5,2)