MathorynMathematical Formula Database

Combinatorics

Combinations with Repetition

This counts the ways to choose kk items from nn types when repetition is allowed and order does not matter ("stars and bars").

(n+k−1k)\binom{n+k-1}{k}
LaTeX\binom{n+k-1}{k}

Variables

nn
number of types
kk
number of items chosen

Example

Choose 5 scoops from 3 ice-cream flavours.

  1. (3+5−15)=(75)\binom{3+5-1}{5}=\binom75.

Answer: 2121.

Related formulas