In how many ways 9 identical objects can be put in non-empty boxes of arbitrary size?
Is solution integer partition of 9? That is 30?
In how many ways 9 identical objects can be put in non-empty boxes of arbitrary size?
Is solution integer partition of 9? That is 30?
On
Assuming the boxes are distinguishable, we can put up to 8 bars between 9 objects, each bar separating two boxes. There are 2^8 ways to set the bars, 2 meaning a bar is either there or not. So the answer is 256.
Assuming the boxes are indistinguishable, the question becomes sum of number seperation. There are 1 one to use only 1 box, 8 ways to use 2 boxes, 7 ways to use 3 boxes (711,621,531,522,441,432,333), etc.
We are talking about partitions.
https://en.wikipedia.org/wiki/Partition_(number_theory)
In your case, they are
9
8-1
7-2
7-1-1
6-3
6-2-1
6-1-1-1
5-4
5-3-1
5-2-2
5-2-1-1
5-1-1-1-1
4-4-1
4-3-2
4-3-1-1
4-2-2-1
4-2-1-1-1
4-1-1-1-1-1
3-3-3
3-3-2-1
3-3-1-1-1
3-2-2-2
3-2-2-1-1
3-2-1-1-1-1
3-1-1-1-1-1-1
2-2-2-2-1
2-2-2-1-1-1
2-2-1-1-1-1-1
2-1-1-1-1-1-1-1
1-1-1-1-1-1-1-1-1