Combinations with
Repetition
Learn how to count selections where order does not matter and items can be chosen more than once, using the powerful stars and bars technique.
What Are Combinations with Repetition?
A combination with repetition (also called a multiset) is a way to choose \( k \) items from \( n \) types when order does not matter and each type may be selected more than once.
Why Does This Matter?
Combinations with repetition appear in many real scenarios where you select from categories and duplicates are allowed.
The Stars and Bars Model
The key insight is to represent each selection as a sequence of stars (items chosen) separated by bars (dividers between types).
The Core Formula
The number of ways to choose \( k \) items from \( n \) types with repetition allowed is:
This equals the number of ways to arrange \( k \) stars and \( n - 1 \) bars in a row of \( n + k - 1 \) positions.
Why Does the Formula Work?
With vs. Without Repetition
| Without Repetition | With Repetition | |
|---|---|---|
| Notation | \( \binom{n}{k} \) | \( \binom{n+k-1}{k} \) |
| Duplicates | Not allowed | Allowed |
| Constraint | \( k \leq n \) | \( k \) can exceed \( n \) |
| Example: 3 from 4 | \( \binom{4}{3} = 4 \) | \( \binom{6}{3} = 20 \) |
| Model | Subset of size \( k \) | Stars and bars |
The Four Counting Scenarios
| Order Matters | Order Doesn't Matter | |
|---|---|---|
| No Repetition | Permutation: \( \frac{n!}{(n-k)!} \) | Combination: \( \binom{n}{k} \) |
| With Repetition | Perm. w/ rep: \( n^k \) | Comb. w/ rep: \( \binom{n+k-1}{k} \) |
How to Apply the Formula
Example 1: Donut Selection
A bakery offers 4 types of donuts. You want to buy 6 donuts. How many different selections can you make?
Example 2: Integer Solutions
How many non-negative integer solutions does the equation \( x_1 + x_2 + x_3 = 7 \) have?
Example 3: Coins in Jars
Distribute 10 identical coins into 5 distinct jars. How many ways?
The Equation Connection
The number of multisets of size \( k \) from \( n \) types is exactly the number of non-negative integer solutions to:
Enumerating: \( n = 3, k = 2 \)
Choose 2 items from types \( \{A, B, C\} \) with repetition. The formula gives \( \binom{3+2-1}{2} = \binom{4}{2} = 6 \). Let us list them all:
Common Mistakes to Avoid
Summary and Quick Reference
| Concept | Details |
|---|---|
| Formula | \( \binom{n+k-1}{k} = \binom{n+k-1}{n-1} \) |
| Model | \( k \) stars + \( n-1 \) bars |
| Equivalent problem | Non-negative integer solutions to \( x_1 + \cdots + x_n = k \) |
| Key condition | Order irrelevant, repetition allowed |
| Total symbols | \( n + k - 1 \) |
Question 1 of 5
A candy shop has 5 types of candy. You want to buy 8 pieces (repetition allowed, order doesn't matter). How many selections are possible?
Question 2 of 5
How many non-negative integer solutions does the equation \( x_1 + x_2 + x_3 + x_4 = 5 \) have?
Question 3 of 5
In the stars-and-bars model, choosing \( k \) items from \( n \) types requires arranging how many symbols in total?
Question 4 of 5
You must place 12 identical balls into 3 distinct boxes. How many ways can this be done?
Question 5 of 5
Which of the following problems is NOT equivalent to a combination-with-repetition problem?