How many solutions are there for the equation: $x_1+x_2+x_3=12$
where: $2\le x_1 \le5$, $0 \le x_2 \le 3$ and $1 \le x_3 \le 4$?
I don't know how to solve it when there are lower and upper limits for the variables $x_1, x_2, x_3$.
How many solutions are there for the equation: $x_1+x_2+x_3=12$
where: $2\le x_1 \le5$, $0 \le x_2 \le 3$ and $1 \le x_3 \le 4$?
I don't know how to solve it when there are lower and upper limits for the variables $x_1, x_2, x_3$.
The problem is equivalent enumerate the integer solutions of $y_1+y_2+y_3=9$ where $0\le y_1 \le3$, $0 \le y_2 \le 3$ and $0 \le y_3 \le 3$. So there is just one solution $3+3+3=9$.
If we replace $12$ with $9$ when we have to solve $y_1+y_2+y_3=6$. If $0\leq y_1\leq y_2\leq y_3\leq 3$ then the solutions are: $$0+3+3=6,\quad 1+2+3=6,\quad 2+2+2=6.$$ and, by symmetry, the total number of solutions is: $3+3!+1=10$.