Possible Duplicate:
Unique ways to keep N balls into K Boxes?
This question may be sound stupid, but we really cant figure it out. We have 3 rocks and 6 boxes. All the rocks have to be in the boxes. The rocks can be all in one box or spread out.
How many unique combinations can we possible have?
I made a spreadsheet of this https://docs.google.com/spreadsheet/ccc?key=0AjBAKweB5syRdDFVeE5qNVJqT3F5RE9heERvYVBWdnc&hl=en_US
i came up with 53. I am missing some? please let me know.
The question to this problem is whats the equation. How do we come up with this number without the spreadsheet so i can apply it to a another set of questions.
* * *
; now place five vertical lines to indicate where to go to the next box. E.g.,||**|*||
means first two boxes are empty, third one has two rocks, fourth one has one rock, last two are empty. It's a "combinations with repetitions" problem, and those problems are always equivalent to stars and bars. See also combinations with repetitions – Arturo Magidin Sep 14 '11 at 21:33