First time posting, all help appreciated. I'm trying to figure out the number of ways to arrange items in spots. The complication is that the number of spots changes with the type of items put in them.
Basically, I want the total of the objects (either 1 or 2) to be some number, say 10. So, if I choose all 1's, there will be ten spots and 1 way to arrange them. If I choose 1 for eight of the spots and 2 for one of them (the total is still 10), I have 9 ways to arrange them (see example below):
2, 1, 1, 1, 1, 1, 1, 1, 1
1, 2, 1, 1, 1, 1, 1, 1, 1
1, 1, 2, 1, 1, 1, 1, 1, 1
etc.
If I choose two 2's, I get even more choices. Inititially I predicted it would be a summing series (n + (n-1) + (n-2) + ... 2 + 1), but when I count it out, that's not what I get. Here is two 2's (and eight spots):
2, 2, 1, 1, 1, 1, 1, 1
2, 1, 2, 1, 1, 1, 1, 1
2, 1, 1, 2, 1, 1, 1, 1
etc.
(When I do it out manually like this, I think there are 13 combinations.)
So how would I calculate how many ways there are to rearrange the rest? Examples: three 2's and four 1's (writing them out, I also got 13 different combinations for this) or four 2's and two 1's (for this, I got 9).
Thanks!