How many integer solutions to this equation?

82 Views Asked by At

How many integer solutions are there to the equation $x_1 + x_2 + x_3 = 15$ if we have that $0 \leq x_1 \leq 5, 0 \leq x_2 \leq 6$, and $0 \leq x_3 \leq 7$?

4

There are 4 best solutions below

0
On

It's fairly easy to do this by considering the cases $x_1=0$ to $x_1=5$ separately. For example, if $x_1 = 3$ we want $x_3 = 12 - x_2$; this would be $0$ for $x_2 = 12$ and $7$ for $x_2 = 5$, so there are two possibilities ($x_2=5, x_3 = 7$ and $x_2=6, x_3=6$) here.

2
On

You can find the answer in two different ways.

First method:

$(x^0 + x^1 + \cdots +x^5)(x^0+x^1+\cdots+x^5)(x^0+ x^1+\cdots+x^7)$

we need to find the coefficient of $x^{15}$, which is 10.

Second method:

The answer without any condition is : $\binom{15+3-1}{3-1}=136 $

Now we need to exclude all the answers that do not satisfy conditions:

$136-|A_1 \cup A_2 \cup A_3| $ where $A_i$ is when the ith condition does not satisfy ($x_i \geq v+1)$. We have:

$|A_1 \cup A_2 \cup A_3|=|A_1|+|A_2|+|A_3|-|A_1 \cap A_2| - |A_1 \cap A_3| -|A_2\cap A_3|+|A_1 \cap A_2 \cap A_3|$

$136-55-45-36+6+3+1=10$

0
On

$$0\leq y_1=5-x_1\leq 5\\ 0\leq y_2=6-x_2\leq 6\\ 0\leq y_3=7-x_3\leq 7$$

This gives us $y_1+y_2+y_3=5+6+7-15=3$, which has $\binom{3+3-1}{3-1}=10$ solutions in non-negative integers.

0
On

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $\ds{\bbox[5px,#ffd]{}}$


\begin{align} &\bbox[5px,#ffd]{\sum_{x_{1} = 0}^{5}\sum_{x_{2} = 0}^{6}\sum_{x_{3} = 0}^{7} \bracks{z^{15}}z^{x_{1}\ +\ x_{2}\ +\ x_{3}}} \\[5mm] = &\ \bracks{z^{15}}\pars{\sum_{x_{1} = 0}^{5}z^{x_{1}}} \pars{\sum_{x_{2} = 0}^{6}z^{x_{2}}} \pars{\sum_{x_{3} = 0}^{7}z^{x_{3}}} \\[5mm] = &\ \bracks{z^{15}}{z^{6} - 1 \over z - 1}\, {z^{7} - 1 \over z - 1}\,{z^{8} - 1 \over z - 1} \\[5mm] = &\ \bracks{z^{15}}\pars{1 - z^{6} - z^{7} - z^{8} + z^{13} + z^{14} + z^{15}}\pars{1 - z}^{-3} \\[5mm] = &\ {-3 \choose 15}\pars{-1}^{15} - {-3 \choose 9}\pars{-1}^{9} - {-3 \choose 8}\pars{-1}^{8} \\[2mm] - &\ {-3 \choose 7}\pars{-1}^{7} + {-3 \choose 2}\pars{-1}^{2} + {-3 \choose 1}\pars{-1}^{1} \\[2mm] + &\ {-3 \choose 0}\pars{-1}^{0} \\[5mm] = &\ \underbrace{17 \choose 15}_{\ds{136}}\ -\ \underbrace{11 \choose 9}_{\ds{55}}\ -\ \underbrace{10 \choose 8}_{\ds{45}}\ -\ \underbrace{9 \choose 7}_{\ds{36}}\ +\ \underbrace{4 \choose 2}_{\ds{6}} \\[2mm] + &\ \underbrace{3 \choose 1}_{\ds{3}} + \underbrace{2 \choose 0}_{\ds{1}} \\[5mm] = &\ \bbx{\large 10} \\ & \end{align}
\begin{align} &\{2, 6, 7\}, \{3, 5, 7\}, \{3, 6, 6\}, \{4, 4, 7\}, \{4, 5, 6\} \\[2mm] &\ \{4, 6, 5\}, \{5, 3, 7\}, \{5, 4, 6\}, \{5, 5, 5\}, \{5, 6, 4\} \end{align}