Combinations with
Repetition
Learn how to count selections when items can be chosen more than once. Master the stars and bars technique and the multiset coefficient formula.
What Are Combinations with Repetition?
A combination with repetition (also called a multiset) is a way of choosing \( k \) items from \( n \) types where each type can be selected more than once, and the order does not matter.
Why Repetition Changes Everything
The Stars and Bars Idea
Imagine choosing \( k = 3 \) scoops from \( n = 3 \) flavours (Vanilla, Chocolate, Strawberry). Represent each scoop as a star ★ and separate flavour bins with bars |.
The Multiset Coefficient Formula
The number of ways to choose \( k \) items from \( n \) types with repetition allowed is:
This is equivalent to choosing which \( k \) of the \( n + k - 1 \) positions are stars (the remaining positions become bars).
Stars and Bars: Visualised
With \( n = 3 \) types and \( k = 3 \) items, we arrange \( 3 + 3 - 1 = 5 \) symbols total: choose 3 positions for stars.
With vs Without Repetition
| With Repetition | Without Repetition | |
|---|---|---|
| Order matters? | No | No |
| Repeat allowed? | Yes | No |
| Formula | \( \binom{n+k-1}{k} \) | \( \binom{n}{k} \) |
| \( n = 5,\; k = 3 \) | \( \binom{7}{3} = 35 \) | \( \binom{5}{3} = 10 \) |
| Constraint | \( k \) can exceed \( n \) | \( k \leq n \) |
Step-by-Step Method
Example 1: Doughnut Shop
A doughnut shop offers 4 types of doughnuts. You want to buy a box of 6 doughnuts. Repetition is allowed. How many different boxes are possible?
Example 2: Distributing Coins
Distribute 10 identical coins among 3 children. Each child can receive any number of coins (including zero). How many distributions are possible?
Example 3: Equation Solutions
How many non-negative integer solutions does the equation \( x_1 + x_2 + x_3 + x_4 = 7 \) have?
Application: Multisets in Practice
Note: \( k \) Can Exceed \( n \)
Unlike ordinary combinations where \( k \leq n \), combinations with repetition work even when you choose more items than there are types.
Common Mistakes to Avoid
Counting Cheat Sheet
| Order Matters | Order Doesn't Matter | |
|---|---|---|
| No Repetition | Permutation: \( \frac{n!}{(n-k)!} \) | Combination: \( \binom{n}{k} \) |
| Repetition Allowed | \( n^k \) | \( \binom{n+k-1}{k} \) |
Question 1 of 5
A candy store has 6 types of candy. You buy 4 pieces, and repetition is allowed. How many selections are possible?
Question 2 of 5
How many non-negative integer solutions does
\( x_1 + x_2 + x_3 = 5 \) have?
Question 3 of 5
In the stars and bars model for choosing \( k \) items from \( n \) types, how many bars are needed?
Question 4 of 5
A pizza shop offers 8 toppings. You order a pizza with 3 toppings (repetition allowed). How many different pizzas are possible?
Question 5 of 5
You have 2 types of fruit (apples and oranges) and want to choose 5 pieces. How many multisets are possible?