Math Fundamentals18 sections · 814 units
Open in Course

Combinations with Repetition

(Stars and bars)

Sometimes you can choose the same item multiple times. Example: choosing 3 fruits from {apple, banana, cherry} with repetition allowed.

The formula: C(n+k-1, k) where n is the number of types and k is the number of items to choose.

For 3 fruits from 3 types: C(3+3-1, 3) = C(5,3) = 10. Examples: 3 apples, 2 apples + 1 banana, 1 of each, etc.