# What is the number of ways to choose x groups from y items? (partitions with x cells of a multiset)

Where a group can consist of 1 or more items, groups don't have to be equally sized and items can be duplicates. Example - Choose 3 groups:

Items: 1 2 2 3

Groups:

(1) (2 2) (3)

(1 2) (2) (3)

(3 1) (2) (2)

(3 2) (2) (1)

Update Following Rasmus' comment, I see that this is more technically described as finding the possible partitions of a multiset where the number of cells is x.

-
I would call that "partitions". –  Rasmus Mar 6 '11 at 14:26
This may be a duplicate of this question, assuming that the other question allows multiset parts (i.e., the individual parts making up the partition can contain duplicate elements). –  Matthew W. Jun 21 '13 at 21:08

## 1 Answer

Note that this corresponds to the partition of $4$ into $3$ nonzero parts (or $2+1+1 = 4$).

-
Not quite, since the items have identities (which may be shared). The general formula will be a mess (some coefficient of something in some generating function). –  Yuval Filmus Mar 6 '11 at 17:49