Skip to main content

Combinations with Repetition – C(n+r−1, r)

Quick answer

Multiset counting: 3 scoops from 4 flavors = C(6,3) = 20 via stars and bars ⭐|⭐⭐|.

  • Formula substitution and plain-combination contrast shown.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How Combinations with Repetition Work

Count = C(n + r − 1, r) — r picks among n types, order irrelevant, repeats fine

When selection order does not matter and duplicates are welcome, the count is the multiset formula C(n+r−1, r). Choosing 3 scoops from 4 flavors gives C(6,3) = 20 possibilities — three vanilla, or two chocolate one strawberry, order never counted. Stars and bars makes it visual: r stars (picks) and n−1 bars (dividers between types) form a string of r+n−1 symbols; choosing which r positions hold stars — C(6,3) for our example — enumerates every multiset exactly once, e.g. ⭐|⭐⭐| | = one flavor-1 and two flavor-2 scoops. The calculator prints the formula substitution, the star-bar layout for small cases, and the contrast with plain combinations (C(4,3) = 4 without repeats). Distribution problems are the same count: 7 identical candies among 3 children split as C(9,2) = 36 arrangements.

  1. 1

    Enter types n and picks r

    e.g. 4 flavors, 3 scoops

  2. 2

    Apply C(n+r−1, r)

    C(6,3) = 20 with the substitution shown

  3. 3

    View stars and bars

    Star/bar strings enumerate each multiset

  4. 4

    Compare plain C(n,r)

    4 without repetition vs 20 with — repetition quintuples it

Use Cases

Café Orders

20 three-scoop combinations from four flavors

Candy Distribution

7 identical candies, 3 children: C(9,2) = 36 ways

Integer Solutions

x+y+z = 7 has 36 non-negative solutions

Tips

  • 1

    Bars count n−1, not n or r

  • 2

    Identical items into distinct bins uses the same formula

  • 3

    Repetition always raises the count: 4 → 20 here

Common Mistakes

  • Using plain C(n,r) and forgetting duplicate-friendly selections

  • Treating order as mattering — that is nʳ, here 64

  • Miscounting bars (n−1, not n)

  • Excluding zero-pick types; empty bins are legal

FAQs

Three scoops from four flavors — how many combos?

C(4+3−1,3) = C(6,3) = 20 with repeats allowed, order ignored.

What is stars and bars?

3 stars and 3 bars in a row; picking star positions among 6 gives C(6,3) = 20 layouts — one per multiset.

Seven candies, three kids?

C(7+3−1, 2) = C(9,2) = 36 distributions.

Why not just C(4,3) = 4?

That forbids repeats like three vanilla; repetition balloons the count to 20.

Same count as equation solutions?

Yes: x+y+z = 7 in non-negative integers has exactly C(9,2) = 36 solutions.