1. Find the number of all different solutions to the equation

$$
x_{1}+x_{2}+\ldots+x_{n}=k
$$

( $k$ and $n$ are given numbers) in the set $\mathbb{N}$.
Solution. It is clear that we must have $n \leq k$. For $n=k$ the equation has a unique solution $x_{1}=x_{2}=x_{3}=\ldots=x_{n}=1$. Therefore, let us assume that $n<k$ and set

$$
\underbrace{1+1+1+\ldots+1}_{k}=k .
$$

To each + sign, we associate one symbol. Since there are $k-1$ + signs, we thus obtain the set

$$
A=\left\{a_{1}, a_{2}, \ldots, a_{k-1}\right\}
$$

To each subset $B$ of $A$ with $n-1$ elements, there corresponds one solution to the given equation, i.e., if we delete $n-1$ + signs, we get one solution. Consequently, the number of all solutions to the equation is equal to the number of all subsets of $A$ with $n-1$ elements, and that number is $\binom{k-1}{n-1}$.

For example, consider the equation $x_{1}+x_{2}+x_{3}=5$. We have:

$$
1+1+1+1+1=5
$$

By deleting two signs, we get

$$
1,1,1+1+1 ; 1,1+1,1+1 ; 1,1+1+1,1 ; 1+1,1,1+1 ; 1+1,1+1,1 ; 1+1+1,1,1
$$

i.e., the solutions to the equation are the triples

$$
(1,1,3),(1,2,2),(1,3,1),(2,1,2),(2,2,1),(3,1,1)
$$

Their number is 6, which is equal to $\binom{4}{2}$.