Calculators/Mathematics/Combinations with repetition

Combinations with repetition

C(n+k−1, k) · choice with repetition

Combinations with repetition — illustration
C′(n,k) = C(n+k−1, k) = C(6, 3)
20
combinations with repetition
For comparison — without repetition: C(4,3) = 4

Combinations with repetition — when we choose k items from n types, items may repeat, and order does not matter (e.g. how many sets of 3 balls from 4 colours). Formula: C(n+k−1, k).

Combinations with repetition count the ways of choosing kk items from nn types when items may repeat and order does not matter:

C‾n k=(n+k−1k)\overline{C}_n^{\,k}=\binom{n+k-1}{k}

Example: how many different sets of 3 balls can be chosen from 4 colours (colours may repeat)? Answer: (4+3−13)=(63)=20\binom{4+3-1}{3}=\binom{6}{3}=20.

This is a variant of ordinary combinations — for comparison the calculator also gives the number of combinations without repetition (nk)\binom{n}{k}. Typical uses: distributing identical objects, selecting from an assortment, “stars and bars”.

Examples

3 balls from 4 colours (with repetition)
→ C(6,3) = 20
2 scoops of ice cream from 5 flavours (may be the same)
→ C(6,2) = 15

Frequently asked questions

When do you use combinations with repetition?+

When you choose items from a repeatable assortment and order does not matter — e.g. buying several scoops of ice cream from the available flavours (flavours may repeat).

Where does the formula C(n+k−1, k) come from?+

From the “stars and bars” method: k choices (stars) and n−1 dividers between types are placed in n+k−1 positions, choosing k spots for the stars.

Found this calculator useful? Share it.

It's free — send it to a friend who's revising.

Teaching? Embed this calculator on your site.

Free widget — paste it on your school site, blog or notes. It links to the full version.

Teaching a class or tutoring? Guide students in NexTutor →