How many positive integral solutions to the below equation?
$x_1+x_2+x_3+x_4 \leq10$
I tried like below
Since we want positive integral solutions so it means
$x_1 \geq1, x_2 \geq 1, x_3 \geq 1, x_4 \geq 1$
so inequality transforms to
$x_1+x_2+x_3+x_4 \leq 6$ with conditions $x_1,x_2,x_3,x_4 \geq 0$
Now I break this into 7 parts and add result
$x_1+x_2+x_3+x_4=0\Rightarrow \binom{3}{0} ways$
$x_1+x_2+x_3+x_4=1 \Rightarrow \binom{4}{1} ways$
$x_1+x_2+x_3+x_4=2 \Rightarrow \binom{5}{2} ways$
$x_1+x_2+x_3+x_4=3 \Rightarrow \binom{6}{3} ways$
$x_1+x_2+x_3+x_4=4 \Rightarrow \binom{7}{4} ways$
$x_1+x_2+x_3+x_4=5 \Rightarrow \binom{8}{5} ways$
$x_1+x_2+x_3+x_4=6 \Rightarrow \binom{9}{6} ways$
But I got wrong answer. Where I went wrong?
Since the solutions have to be positive, we can make this substitution:
$$x_i=1+y_i \ \ \ \ i=1,2,3,4$$
The disequation becomes:
$$y_1+y_2+y_3+y_4\leq 6 $$
And here is the trick. Imagine to give some of 6 candies to 4 children, the others one are thrown in the trash can. So let's create a "trash can" variable $y_5$:
$$y_1+y_2+y_3+y_4+y_5=6 $$
You should know how to solve this ;)