Pat wants to buy four donuts from an ample supply of three types of donuts: glazed, chocolate, and powdered. How many different selections are possible?
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
Choosing 4 donuts of 3 types is the number of nonnegative solutions to g + c + p = 4, which stars and bars counts as C(6,2).
Solution
Only the counts matter: a selection is a triple of nonnegative integers with .
Encode each triple as a row of identical stars split into three groups by bars; for example means two glazed, one chocolate, one powdered, and means four powdered. Every arrangement of stars and bars corresponds to exactly one selection, and there are
such arrangements (choose which of the slots are bars).
The answer is .
Why this works
Selecting items from types with unlimited repetition is counted by ; the stars-and-bars picture is the reason the formula works and is easy to rebuild under pressure. Recognize the setup by the phrases "ample supply" and "how many different selections," which signal unordered, repetition allowed.
Alternative approach
Count by how the four donuts split among types: ( ways to pick the type), ( ways), ( ways), ( ways). Total .
The trap
Treating the donuts as distinguishable (3^4 orderings) or forgetting selections like four of one kind.
Common mistakes
- Treating the donuts as distinguishable (3^4 orderings) or forgetting selections like four of one kind.
- Using or from a misremembered formula, or requiring at least one of each type (which gives only ).
Techniques
Map the objects to something easier to count