This is related to a lot of other combinatorics problems but I am struggling with it:
How many ways are there do distribute $n$ objects into $k$ bins of given size $\mathbf{(n_1, \dots, n_k)}$, where $n_k \geq 1$?
Here is an example: Given $n=4$ objects $x_1,x_2,x_3,x_4$, consider the problem of distributing them among $k=2$ bins of sizes $(n_1 = 1, n_2 = 3)$. There are 4 ways to do this: $$ [(x_1),(x_2,x_3,x_4)],[(x_2),(x_1,x_3,x_4)],[(x_3),(x_1,x_2,x_4)],[(x_4),(x_1,x_2,x_3)] $$
Here is what I have understood so far:
1) We can identify some constraints: $\sum_{i=1}^k n_i = n$ (number of objects is $n$) and $k \leq n$ (at least $1$ item per bin so there can be at most $n$ bins).
Assume these are always satisfied, i.e. the problem is always correctly posed.
2) Stars and Bars gives the number of different bin size distributions, given $n$ objects and $k$ bins. For example, to distribute $n=4$ objects into $k=2$ bins there are $\binom{n-1}{k-1} = \binom{3}{1} = 3$ possibilities, which are the bin sizes (1,3),(2,2),(3,1). This isn't directly useful because in this case I want to treat bin sizes $(1,3)$ and $(3,1)$ as indistinguishable.
3) The leading answer here seems related, but I am unsure how to generalize this case. This kind of problem is related to the problem of finding the number of solutions to $$ \sum_{i=1}^k x_i = n $$ where each of the $x_i$ has to be one of the $n_i$ seems related. For example, consider the problem: distributing $n=4$ objects into $k=2$ bins of sizes $(n_1=2,n_2=2)$. There are 3 ways to do this: $$ [(x_1,x_2),(x_3,x_4)],[(x_1,x_3),(x_2,x_4)],[(x_1,x_4),(x_2,x_3)] $$
but the equation $$ x_1 + x_2 = n = 4 $$
where $x_1,x_2$ have to be one of $(n_1=2,n_2=2)$ has only two solutions: $(x_1=n_1,x_2=n_2)$ and $(x_1=n_2,x_2=n_1)$, so this is also not correct.
Thanks for your help!