Work out combination with repetition instantly with clear inputs, formula shown and shareable results.
Choosing r items from n types with repetition allowed and order ignored is counted by stars and bars: C(n + r − 1, r). Each selection corresponds to placing r stars among n − 1 dividers.
With repetition
C(n + r − 1, r)
Without repetition
C(n, r)
C(7, 3) = 35 if repeats are allowed, against only C(5, 3) = 10 if all must differ.
Represent the choice as r stars separated by n − 1 bars; every arrangement of those symbols is one multiset.