Calculate multiset combinations C(n+r-1, r). Stars and bars visualization, full enumeration for small cases, distribution patterns, and reference tables.
Combinations with repetition (multiset coefficients) count the number of ways to choose r items from n types when each type can be selected multiple times and order doesn't matter. The formula is C(n+r−1, r) = (n+r−1)! / (r!(n−1)!), also written as ((n multichoose r)).
This is equivalent to the "stars and bars" problem: distributing r identical objects into n distinct bins. The calculator visualizes this interpretation, enumerates all combinations for small cases, and shows the distribution patterns of how items spread across types.
Common applications include selecting scoops of ice cream (same flavor allowed), distributing identical tasks among workers, counting non-negative integer solutions to equations, and polynomial coefficient counting. That makes the tool useful both for classroom combinatorics and for practical counting problems where repeats are allowed but order is irrelevant. It is also a quick way to connect an abstract formula to real allocation problems that would be tedious to count by hand.
Combinations with repetition are less intuitive than standard combinations but appear in many real problems. This calculator provides the stars-and-bars visualization, full enumeration for small cases, comparison with without-repetition counts, and a reference table for quick lookups. It is useful when you need to show not just the final count, but why repeated selections change the counting logic.
Combinations with Repetition: C(n+r−1, r) = (n+r−1)! / (r! × (n−1)!) Also called the multiset coefficient ((n multichoose r)). Equivalent to: - Number of ways to place r identical balls in n distinct bins - Number of non-negative integer solutions to x₁+x₂+...+xₙ = r - Coefficient count in (n+r−1)-choose-r lattice paths
Result: C(7,3) = 35
Choosing 3 items from 5 types with repetition: C(5+3−1, 3) = C(7, 3) = 35. Without repetition it would be C(5,3) = 10, so repetition allows 3.5× more combinations. Example: choosing 3 scoops from 5 ice cream flavors.
The stars and bars (also called balls and urns) method transforms a distribution problem into a sequence-counting problem. To distribute r identical items among n groups, imagine r stars (★) and n−1 bars (|) arranged in a row. Each arrangement uniquely represents a distribution. The total is C(r+n−1, n−1) = C(n+r−1, r).
Combinations with repetition are closely related to weak compositions of integers. C(n+r−1, r) counts the number of ways to write r as an ordered sum of n non-negative integers. For unordered sums (integer partitions), the counting is more complex and doesn't have a simple closed-form formula.
In inventory management, C(n+r−1, r) counts the number of distinct orders of r items from n suppliers. In genetics, it counts genotype possibilities with multiple alleles. In finance, it counts the number of ways to allocate a fixed budget across n investment categories in fixed increments.
Without repetition, each item can be chosen at most once: C(n,r). With repetition, items can be reused: C(n+r−1,r). With repetition always gives at least as many combinations, and often many more.
Arrange r stars (items) and n−1 bars (dividers) in a line. The stars between consecutive bars represent items assigned to that bin. The total arrangements are C(r+n−1, n−1) = C(n+r−1, r).
When selecting from categories where repeats are allowed and order doesn't matter. Examples: choosing scoops of ice cream, distributing prizes, counting coin denominations totaling a value, polynomial term counting.
It grows polynomially in r for fixed n (like rⁿ⁻¹/(n−1)!) and polynomially in n for fixed r. It's much slower growth than exponential (nʳ) or factorial.
Yes! Unlike without-repetition combinations where r ≤ n, with repetition r can be any non-negative integer regardless of n. You can choose 100 scoops from 3 flavors.
The number of terms in the expansion of (x₁ + x₂ + ... + xₙ)ʳ equals C(n+r−1, r). Each term corresponds to selecting r variables (with repetition) to multiply.