Number of integral solutions of the equation $x+y+z \le 25$

644 Views Asked by At

I came up with this equation $x+y+z≤25$, such that $x≥-3$, $y≥-2$ and $z≥0$.

I introduced a dummy variable $w$ and the equation became $x+y+z+w=25$ where $w≤30$.

I used the Multinomial Theorom and I proceeded in this way, Solutions are equivalent to finding coefficient of $x^{25}$ $(x^{-3}+x^{-2}+x^{-1}+1...x^{25})(x^{-2}+x^{-1}+1+...x^{25})(1+x+x^2+...x^{25})(1+x+x^2+x^3...x^{30})$

This can be converted to $\frac{(x^{-3})(1-x^{29})(x^{-2})(1-x^{28})(1-x^{26})(1-x^{31})}{(1-x)^4}$

Now When I found the coefficients of $x^{25}$ I found $^{23}C_3- ^4C_3 - ^7C_3 - ^5C_3$ Which is not the answer written in the textbook.

Can someone explain What did I do wrong?

3

There are 3 best solutions below

0
On BEST ANSWER

Finding the number of integer solutions to $\begin{cases}x+y+z\leq 25\\x\geq -3\\y\geq -2\\ z\geq 0\end{cases}$ is equivalent to finding the number of integer solutions to

$$\begin{cases} x'+y'+z + w = 30\\x'\geq 0\\y'\geq 0\\z\geq 0\\w\geq 0\end{cases}$$

seen by a change of variables $x'=x+3, y'=y+2$ and introducing a dummy variable $w = 25-x-y-z$


Your attempt and the subtraction of binomial coefficients looks like you were trying to deal with upper bounds on one or more of the variables, like if it were $\begin{cases}x'+y'+z+w=30\\0\leq x'\leq 10\\0\leq y'\leq 15\\ 0\leq z\\0\leq w\end{cases}$ or similar...

Note in particular that the condition $-3\leq x$ is different than the condition $-3\leq x\color{red}{\leq 25}$. If we were to be using a generating function here to describe $-3\leq x$, it would have involved $(x^{-3}+x^{-2}+x^{-1}+1+x+x^2+\dots+x^{25}+x^{26}+\dots+\dots)$ and would not have ended at the $x^{25}$ term.

Here, we have no upper bounds to worry about... and the answer is a straightforward textbook example of stars-and-bars

$$\binom{30+4-1}{4-1}$$

1
On

Nice question

$x+y+z ≤ 25$

Where $ x≥ -3$, $y ≥ -2$, $z ≥ 0$ Where $(x,y,z)€Z$

My intention here is to create a table of values, but since i can't type &&&

Let's say the equation is $x+y+z ≤ w$ Where $w$, their sum is such that $w ≤ 25$ The range of values of $x$, $y$ and $z$ are $:$

$x → (-3,-2,-1,0,1,2,3,............)$

$y → (-2,-1,0,1,2,3,4,.......…....)$

$z → (0,1,2,3,4,5,6,7,............)$

Now the maximum value of $x$ will occur when both $y$ and $z$ are minimum, because they all have a fixed range $w$

$w → (-5,-4,-3,-2,-1,0,1,2...........,23,24,25)$

So also the maximum of $y$ will occur when $x$ and $z$ are minimum and vice versa

$x → (-3,-2,-1,0,1,2,..........25,26,27)$

$y → (-2,-1,0,1,2,.................25,26,,27,28)$

$z → (0,1,2,3,4,..............27,28,29,30)$

Since we are trying to find the number of integer solutions to the inequality, then number of integers in each set of its variables $x$, $y$ and $z$ will hold the key

The number of elements in set $x$ is 31, same with $y$ and $z$ Therefore number of integer solutions $31×31×31$

$29,791$

0
On

Thanks @JMoravitz for pointing that out, it was a mistake to include those areas

Instead of counting all the elements in the set, I should clearfull examine them and notice where $x+y+z ≤ 25 $

Now the maximum value of $x$ will occur when both $y$ and $z$ are minimum, because they all have a fixed range $w$

$w → (-5,-4,-3,-2,-1,0,1,2...........,23,24,25)$

So also the maximum of $y$ will occur when $x$ and $z$ are minimum and vice versa

$x → (-3,-2,-1,0,1,2,..........25,26,27)$

$y → (-2,-1,0,1,2,.................25,26,,27,28)$

$z → (0,1,2,3,4,..............27,28,29,30)$

If $x_min$ and $y_min$ combine, they will do so with all the elements of set $z$, all it's $31$ elements and there would be no problem

If $x_min$ and $y_min(1-shift)$ combine, they'll do so with only $30$ elements of $z$, because $-3 + -1 + 30 > 25$

If $x_min$ and $y_min(2-shift)$ combines, they'll do so with only $29$ elements of $z$, because $-3 + 0 + 30$ and $-3 + 0 + 29$ are $>25$

And so vice versa, the series continues creating an A.P $→ (31+30+29+28+............+0)$ for all the combination that includes $x_min$

Now if $x_min(1-shift)$ and $y_min$ combine, they'll do so With $30$ elements of $z$ because $-2 + -2 + 30 > 25$

$x_min(1-shift)$ and $y_min(1-shift)$ combines with $29$ elements of $z$ vice versa

$x_min(2-shift)$ and $y_min$ combines with only $29$ elements of $z$

And vice versa................

It's not hard to see that the total combination yields a series of the form

$ x_min → (31+30+29+28+........+0)+ x_min(1-shift) → (30+29+28+27+......+0)+ x_min(2-shift) → (29+28+27+26+.......0)+ x_min(3-shift) → (28+27+26+25+............0)+............................+ x_min(29-shift) → (2+1+0)+ x_min(30-shift) → (1+0)$

Which implies

$ (31+30+29+28+........+0)+(30+29+28+27+......+0)+(29+28+27+26+.......0)+(28+27+26+25+............0)+............................+(2+1+0)+(1+0)$

Which can also be write as

$1×31+2×30+3×29+4×28+..................+30×2+31×1$

Put this in summation notion as

$\sum( x*(32-x) , x, 1 , 31 )$

Which gives $5,456$