A Combinatorial Question to Solve a System of Equations Suppose we have $N$ integer-valued variables $i_1$, $i_2$, $\cdot\cdot\cdot$, $i_N$, such that each variable can take integer values from 0 to $k$, and the sum of these $N$ variables is also equal to $k$. Formally, we want to solve the constrained linear equation:
\begin{cases}
i_1+i_2+\cdot\cdot\cdot + i_N = k \\
0 \leq i_j \leq k & \text{where $1\leq j \leq N$}
\end{cases}
Is there anyone know why the number of solutions is equal to $\binom{k+N-1}{N-1}$?
Thanks in advance very much.

I'm sure this is a duplicate, but I couldn't find it.
Assume you align $k$ red balls on the floor.
Now take $N-1$ blue balls and place them in between the red balls.
This separates the red balls into $N$ sets of cardinality $i_j$, and of course the sum of the $i_j$'s is $k$.
Now how many ways do you have do that?
As many as the number of ways of picking $N-1$ balls among $k+N-1$.
