We define and enumerate combinations of multisets.

Multisets

At the end of section 1.5, we computed the number of permutations of words that had letters repeated. In effect, we computed the number of permutations of the elements of a multiset. In general, the number of permutations of the multiset is where .

We now turn to counting combinations of multisets.

Combinations of Multisets

(problem 1a) A bakery has 5 types of donuts, each in abundant supply. How many ways are there to select a dozen donuts?
(problem 1b) A bakery has 6 types of donuts, each in abundant supply. How many ways are there to select 8 donuts?
(problem 1c) A pastry shop has 8 types of pastries, each in abundant supply. How many ways are there to select 4 pastries
(problem 2) A bakery has 5 types of donuts: Boston cream, chocolate, glazed, jelly and plain. Each type of donut is in abundant supply except for the chocolate donuts, of which there are only 10. How many ways are there to select a dozen donuts under these conditions?
(problem 3a) A bakery has 5 types of donuts, each in abundant supply. How many ways are there to select a dozen donuts if you must have at least one of each type?
(problem 3b) A bakery has 5 types of donuts (including chocolate), each in abundant supply. How many ways are there to select a dozen donuts if you must have at least two chocolate donuts and at least one of each of the other types?

We now turn to examples involving the number of solutions to an equation, under the assumption that the variables must represent whole numbers.

(problem 4) How many integer solutions are there to the equation if for ?
(problem 5) How many integer solutions are there to the equation with , and ?

We summarize the stars and bars method in the following proposition.

Proof
A combination of elements of can be thought of as a permutation of stars and bars. The number of stars is equal to the number of elements selected, . The number of bars needed to separate the objects into different types is . Altogether, the number of stars plus bars is . The number of permutations of the stars and bars can be thought of as the number of combinations of objects taken at a time, i.e., .