1

I need some help with the following combinatorics problem:

Consider a vector $(x_1,x_2,...,x_r)$ where $x_i\in \mathbb{N}$ $\forall i$ and $x_1+x_2+...+x_r = n\in \mathbb{N}.$ How many different vectors are possible?

I tried to think about how many ways there are to pick the components of the vector but couldn't get much done. The correct answer should be $\binom{n-1}{r-1}$.

1 Answers1

1

Each vector corresponds to the number of ways to distribute $n$ identical balls into $r$ distinct boxes, where each box has at least one ball.

First place $1$ ball into each of the $r$ boxes, so that each box is non-empty. Now, $n - r$ balls remain. Using stars and bars, there are $$\binom{n - r + (r - 1)}{ r - 1} = \binom{n - 1}{r - 1}$$ ways to distribute the remaining balls into the boxes.

Yiyuan Lee
  • 14,435