Every textbook on combinatorics seems to deal with either totally indistinguishable objects and bins, or completely distinguishable objects and bins. What I have is something in between: objects are of $t$ types, there are $a_i$ objects of type $i$, and there are $k$ indistinguishable bins. How many partitions are there? Is there any theory that deals with this kind of situations? Thanks.
-
Related: How to find unique multisets of n naturals of a given domain and their numbers? – hardmath Jan 28 '15 at 14:04
-
Another related problem that has been discussed at Math.SE is the partition of a multiset into ordinary sets, i.e. no more than one of each object type per bin. You may find the discussion there of weak compositions helpful, although this is a more restricted problem than what I think you're asking. – hardmath Jan 28 '15 at 15:18
2 Answers
The concept you need to have in your toolkit is multiset, where the container can hold more than one of the same object "type". By contrast a set can only contain "distinct" objects, so if two objects of the same type are indistinguishable, a set will only represent either holding one of those or none of those. The multiset can represent holding multiple of the same object.
In Question posed above, you are asking how to partition a multiset of $t$ object types, with combined multiplicities:
$$ a_1 + a_2 + \ldots + a_t = N $$
into $k$ (or fewer if some may be empty) multisets.
The solutions can be represented as $k\times t$ matrices of nonnegative integers, where the $k$ rows correspond to bins and the $t$ columns correspond to the object types, with the $i,j$ entry counting how many objects of type $j$ there are in bin $i$. The column sums of solutions are prescribed, with the $j$th column totaling $a_j$. The order of the rows is "unimportant" in the sense that two matrices differing only by a permutation of rows are consider the "same" solution (an equivalence). Each row then describes the contents of the multiset corresponding to a bin.
A good start is to list all solutions with the bins/rows distinct, and then reduce the list by identifying solutions that are the same up to a permutation of those bins/rows. Often this is best done by imposing an order on the bins/multisets, e.g. sorting them in lexicographic order. This reduction can be done "on the fly" as solutions are generated, by checking if a solution has an equivalent by permutation that reduces its lexicographic order.
There are more sophisticated reductions that can be done for simply counting solutions, that involve dynamic programming.

- 37,015
-
If you like, pose a modest example and we can work it through. That's probably the quickest way to get a good feel for the details. – hardmath Jan 29 '15 at 19:42
Try this approach: Calculate how many ways to place the balls in a straight line, then calculate how many ways to divide these balls into $k$ groups $ie.$ the number of ways to place $k-1$ sticks between the balls which we sorted in a straight line.

- 185
-
This approach distinguishes the "bins" by their order, left to right. That is, it distinguishes between arrangements in which the bins are permuted. – hardmath Jan 28 '15 at 14:05