Number of integer solutions for the following equation:

38 Views Asked by At

Let $0\leq x_i\leq 20,\ x_i\in\mathbb{Z}$ for $i\in\{1,2,3,4\}$. Solve for the number of solution of the following equation: $$x_1+x_2+x_3+x_4\geq15$$

Since $0\leq x_i\leq 20 \text{ for } i\in\{1,2,3,4\}$: $$15\leq x_1+x_2+x_3+x_4\leq80$$

Consider $A=\{\text{Number of integer solutions of } x_1+x_2+x_3+x_4\leq80\}$.

Let $x_5=80-(x_1+x_2+x_3+x_4)\geq0$, so the previous set becomes: $$A=\{\text{Nº of sol. } x_1+x_2+x_3+x_4+x_5=80\}$$

Then: $|A|={84 \choose 4}=1929501$.

Now we have to find $|B|$, where $B=\{\text{Nº of sol. }x_1+x_2+x_3+x_4\geq 15\}$, so we calculate $|\overline{B}|$, which is $\{\text{Nº of sol. }x_1+x_2+x_3+x_4\leq 14\}$.

But for each $x_i$ we need $x_i\leq14$ with $i\in\{1,2,3,4\}$ wich is already considered when we calculate $|\overline{B}|$ because if it wasn't considered there wouldn't be any solution for $x_i>14$ anyway.

So again we define $x_5=14-(x_1+x_2+x_3+x_4)\geq0$ and solve like before.

$\overline{B}$ becomes $\{\text{Nº of sol. }x_1+x_2+x_3+x_4+x_5=14\}$, so: $|\overline{B}|={18 \choose 4}=3060$. $$B=|A|-|\overline{B}|=1929501-3060=1926441$$

I think I am missing something here, does this seem right?