Find the number of ways 5 dices can be rolled to get a sum of 25.
While solving this question, the way we solve it is $x_1+x_2+x_3+x_4+x_5$ $=25$ where $1<=x_i<=6$
So we replace $x_i$ by $y_i =6-x_i$ , which is $x_i=6-y_i$
substituting $x_i$ in the above equation we get it as→ $(6*5) – (y_1+y_2+y_3+y_4+y_5)$ $=25$
$(y_1+y_2+y_3+y_4+y_5)$ = $5$
After solving this equation by integer solutions formula $(n-r+1)! / (n! * (r-1)!)$ we get the ans as → $126$
Now consider this problem,
The number of non-negative integer solutions such that $x_1+x_2+x_3=17$ where $x_1>1, x_2>2 , x_3>3$ is ___________________
While solving this we are solving it like → $y_1= x_1-2$ , $y_2=x_2 -3$ , $y_3=x_3-4$
so, $x_1= y_1+2$ , $x_2=y_2 +3$ , $x_3=y_3+4$
Now we substitute this in our original equation to get→
$ y_1+2+y_2 +3+y_3+4 =17$
$ y_1+y_2 +y_3 =8$
and after solving this we get the ans as $45$
Now I have a $DOUBT$ here, in the second problem since when $x_1>1$ we make it as $x_1 = y_1+2$ , but in the first problem all the dices should have value $>0$ , so why in that case we haven’t made $x_i=y_i+1$ for all the cases?
And moreover what if the question was like
$x_1+x_2+x_3=12$ , $2<=x<=5$ then how to solve this using integer solution and applying the formula $(n-r+1)! / (n! * (r-1)!)$ ?