The Combination with Repetition Formula

Combinations with repetition count the number of ways to select r items from n distinct objects when the same item may be chosen more than once. The order of selection does not matter, which distinguishes this from permutations. The formula applies the factorial function to account for all valid groupings.

C'(n,r) = (r + n − 1)! ÷ (r! × (n − 1)!)

  • n — Total number of distinct objects available
  • r — Size of each sample or number of items to choose
  • ! — Factorial operator (e.g., 5! = 5 × 4 × 3 × 2 × 1)

How Repetition Changes Combinations

When repetition is not allowed, you face fewer possibilities because each object can only be used once. Allowing repetition dramatically increases the number of valid combinations. For example, choosing 5 digits from 0–9 with repetition yields 2,002 combinations, whereas without repetition you would get only 252.

This difference grows rapidly as the sample size increases relative to the number of objects. Repetition is especially relevant when:

  • Sampling with replacement from a population
  • Creating passwords or codes where characters recur
  • Selecting identical items from multiple stocks
  • Designing experimental treatments with repeated factors

Worked Example: Five-Digit Combinations

Suppose you want to find all possible combinations of 5 digits selected from 0–9 with repetition allowed:

  • Identify n and r: n = 10 (digits 0 through 9), r = 5 (selecting 5 digits)
  • Apply the formula: C'(10,5) = (5 + 10 − 1)! ÷ (5! × (10 − 1)!)
  • Simplify: 14! ÷ (5! × 9!) = 87,178,291,200 ÷ (120 × 362,880) = 87,178,291,200 ÷ 43,545,600 = 2,002

The answer is 2,002 unique combinations. Note that permutations with repetition for the same scenario would yield 100,000 because order matters in permutations.

Common Pitfalls and Practical Considerations

Pay attention to these key distinctions and computational issues when working with combinations that allow repetition.

  1. Confusing combinations and permutations — Combinations ignore order (A, B, C is the same as B, A, C), while permutations treat them as different. Always clarify whether your problem requires order. Many lottery and selection problems use combinations, but password generation uses permutations.
  2. Forgetting the n − 1 adjustment — The formula uses (n − 1)! in the denominator, not n!. This adjustment accounts for the extra freedom that repetition provides. Omitting it or using n! instead will give an incorrect result.
  3. Handling large factorials — When n and r are large, factorials grow enormous (20! ≈ 2.4 trillion). Use a calculator or logarithms to avoid overflow. Many programming languages offer built-in factorial or combinatorial functions to sidestep manual computation.
  4. Distinguishing identical from distinct objects — This formula assumes all n objects are distinct. If some objects are identical, you need a different approach that accounts for indistinguishability. Check your problem context carefully.

Real-World Applications

Combinations with repetition appear across diverse fields:

  • Quality control: Selecting product batches where the same batch may be checked multiple times
  • Menu design: Counting ways to order n dishes with r selections, where you can order the same dish twice
  • Genetics: Determining allele combinations in inheritance problems with repeated genotypes
  • Inventory allocation: Distributing r identical items across n storage locations
  • Lottery design: Planning prize structures when repeat wins are possible

Frequently Asked Questions

What is the main difference between combinations with and without repetition?

Without repetition, each object from the set can be chosen at most once, restricting the total number of possible selections. With repetition, any object can be chosen as many times as needed within a single combination. This flexibility significantly increases the outcome count. For instance, selecting 3 items from 4 objects without repetition gives 4 combinations, but with repetition you get 20. The formula structure changes fundamentally to account for this freedom.

Why does the combination with repetition formula use (n + r − 1) instead of just n?

The term (n + r − 1) in the numerator arises from a clever mathematical transformation called "stars and bars." When repetition is permitted, you essentially have r indistinguishable selections to distribute among n distinct categories. This combinatorial argument maps to choosing r items from (n + r − 1) positions, which simplifies to the formula shown. Without this adjustment, the counting would be incomplete or incorrect.

Can I use this formula when n is smaller than r?

Yes, absolutely. One of the key advantages of combinations with repetition is that r can exceed n. You can select 10 items from a pool of only 3 distinct objects by choosing some objects repeatedly. For example, selecting 10 items from 3 types (A, B, C) with repetition gives C'(3,10) = 66 combinations. This is impossible without repetition, where r must never exceed n.

How do I calculate combinations with repetition manually for small numbers?

For small values, list all valid groupings directly. For instance, to find 2-item combinations from {A, B, C} with repetition, list: AA, AB, AC, BB, BC, CC—that is 6 combinations. Verify using the formula: C'(3,2) = (2+3−1)! ÷ (2! × 2!) = 24 ÷ 4 = 6. Manual listing works well for educational purposes but becomes tedious and error-prone as n and r grow.

Is there a quick way to estimate combinations with repetition for large numbers?

Use Stirling's approximation to estimate large factorials, or apply logarithms to avoid overflow: log(C') = log((n+r−1)!) − log(r!) − log((n−1)!). Scientific calculators and programming libraries often include combinatorial functions that handle the computation internally. For rough estimates, remember that the result grows polynomially with r when n is fixed.

How do combinations with repetition relate to probability and statistics?

Combinations with repetition underpin probability calculations in scenarios like sampling with replacement, distributing indistinguishable items, or counting partitions. In statistics, they help determine the total number of possible outcomes for categorical data when items may repeat. This is foundational for hypothesis testing, confidence intervals, and Bayesian inference when outcomes are counted rather than continuous.

More statistics calculators (see all)