How many ways are there to put 6 balls in 3 boxes if the balls are not distinguishable but the boxes are?
The balls are the stars. There are 6 of them and they are all the same.
* * * * * *
Now I will assume there can be zero balls in one or even two of the containers.
I have the containes in a row. Doesn't matter what order. Say red, blue green.
The bars represent dividers between the boxes. there will be 2 dividers
the red cont gets the balls on the left, the blue gets the middle balls and the green gets the remaining balls
These are the possible position of the bars (remembering that any 2 of them will be chosen.
So there are 14 bars.
How many ways can 2 of them be chosen.
14C2 = 91 ways
Of course if each container must have at least one ball then the problem is a bit different.
The number of ways would be 5C2 = 10 ways
I think that is right.
Using the formulas for "identical" balls into "distinct" boxes listed here in Formulas 5, 6, 7, 8
Seems to give different results:
That site looks more friendly than some others that people take us to but i have not worked through it.
I try not to rely on formulas, they can be misleading, especially with counting theory and probability.
I am nost saying categorically that mine is correct, it could be wrong, BUT I just like to understand why an answer is true (or not true) and not just rely on the 'magic box' that a forrmula is.
If you would like to discuss this other answer I am happy to listen :)
I'm worried about your stars and bars method. I don't think that it works for this sort of problem, (without some sort of tweaking).
Take the situations where the balls are split 6 - 0 - 0, or 0 - 6 - 0, or 0 - 0 - 6.
Label the first pair of bars b1 and b2, the second pair b3 and b4, and so on through to the final pair b13 and b14.
The 6 - 0 - 0 possibility is catered for by the pair b13 and b14, and that pairing is unique.
Similarly 0 - 0 - 6 is catered for by b1 and b2, again unique.
What about 0 - 6 - 0 though ? Are there not four possible pairings ? b1 and b13, b1 and b14, b2 and b13, b2 and b14.
It looks like its counting this single possibility four times.
When I looked at this problem I went back to basics.
The six balls can be split in seven different ways,
6 - 0 - 0,
5 - 1 - 0,
4 - 2 - 0,
4 - 1 - 1,
3 - 3 - 0,
3 - 2 - 1,
2 - 2 - 2.
The first of these can happen in three different ways, the number of boxes into which the 6 can be put. The second can happen in six ways, the 5 can be put into any of the three boxes and then the 1 into either of the remaining two, etc.
The seven frequencies will be 3, 6, 6, 3, 3, 6, 1, totalling 28 in all.
I looked in at that web site mentioned in the earlier post.
In there it gives the formula, (for k indistinguishable balls and n distinct boxes), (k+n-1)C(n-1).
That produces the result (6+3-1)C(3-1) = 8C2 = 28.
That makes perfect sense!
I am very glad that you discussed this problem !!
I would never never use the formula. The formulas are great for computer programers and the like who just keep them handy in a book or on a web page for reference. But few people would memorize them. Obviously some people know how to work them out from scratch but doubt I have that skill. So I'd rather work these question out on my own using patterns and logic.
Next time, if I remember this experience, I will be able to. And next time I am more likely to get it right. :))