3
$\begingroup$

The number of non negative integer solutions of $x+y+2z=20$ is

Finding coefficient of $x^{20}$ in $$\begin{align} &\left(x^0+x^1+\dots+x^{20}\right)^2\left(x^0+x^1+\dots+x^{10}\right)\\ =&\left(\frac{1-x^{21}}{1-x}\right)^2\left(\frac{1-x^{11}}{1-x}\right)\\ =&\left(1-x^{21}\right)^2(1-x)^{-3}\left(1-x^{11}\right) \end{align}$$

i.e.finding coefficient of $x^{20}$ in $$(1-x)^{-3}-x^{11}(1-x)^{-3}$$

Or, coefficient of $x^{20}$ in $(1-x)^{-3}-$ coefficient of $x^9$ in $(1-x)^{-3}=\binom{22}{20}-\binom{11}{9}=176$

The asnwer is given as $121$. What's my mistake?

EDIT (after seeing @lulu's comment):

Finding coefficient of $x^{20}$ in $$\begin{align} &\left(x^0+x^1+...+x^{20}\right)^2\left(x^0+x^2+...+x^{20}\right)\\ =&\left(\frac{1-x^{21}}{1-x}\right)^2\left(\frac{1-x^{22}}{1-x^2}\right)\\ =&\left(1-x^{21})^2(1-x)^{-2}(1-x^{22})(1-x^2\right)^{-1} \end{align}$$

i.e.finding coefficient of $x^{20}$ in $$(1-x)^{-2}(1-x^2)^{-1}$$

Not able to proceed next.

$\endgroup$
6
  • 5
    $\begingroup$ The generating function ought to be $(1+x+\cdots +x^{20})^2\times (1+x^2+x^4+\cdots +x^{20})$ $\endgroup$
    – lulu
    Commented Sep 3, 2020 at 19:01
  • $\begingroup$ You need also the coefficient of $x^9$ in $(1-x)^{-3}$ because that will multiplied with $x^{11}$ to get 20 $\endgroup$
    – IrbidMath
    Commented Sep 3, 2020 at 19:02
  • $\begingroup$ @lulu thanks. got it now. $\endgroup$
    – aarbee
    Commented Sep 3, 2020 at 19:04
  • $\begingroup$ @lulu I have made an edit. Please see if you can guide further. Thanks. $\endgroup$
    – aarbee
    Commented Sep 3, 2020 at 19:25
  • $\begingroup$ For me, I'd look at the infinite generating function, I don't think you gain anything from truncating. Sketch: You want the coefficient of $x^{20}$ in $(1+x+x^2+\cdots)^2(1+x^2+x^4+\cdots)=\frac 1{(1-x)^2}\times \frac 1{1-x^2}$. Now, you can take the Taylor series of that, which I believe is just $\sum a_nx^n$ with $a_n=\lfloor \frac {n^2}4\rfloor$ up to some shift (check this). $\endgroup$
    – lulu
    Commented Sep 3, 2020 at 19:41

3 Answers 3

2
$\begingroup$

If $z=0$, there are 21 ways $x+y=20$.

If $z=1$, there are 19 ways $x+y=18$.

$$\vdots\hspace{4in}$$

If $z=9$ there are 3 ways $x+y=2$.

If $z=10$ ther is 1 way $x+y =0.$

$$\begin{aligned}\text{number of ways } &= 1+3+\cdots+ 19+21 \\ &= \sum_{k=1}^{11} (2k-1)\\ &=2\sum_{k=1}^{11}k - 11 \\ &= 2\cdot 66 -11 \\ &= 121.\end{aligned}$$

$\endgroup$
1
$\begingroup$

Solving another way one has $0\le z \le10$ so we have in total the solutions of $$x+y=20\space\space\text{ for } (x,y,0)\\x+y=18\space\space\text{ for } (x,y,1)\\x+y=16\space\space\text{ for } (x,y,2)\\x+y=14\space\space\text{ for } (x,y,3)\\x+y=12\space\space\text{ for } (x,y,4)\\x+y=10\space\space\text{ for } (x,y,5)\\x+y=8\space\space\text{ for } (x,y,6)\\x+y=6\space\space\text{ for } (x,y,7)\\x+y=4\space\space\text{ for } (x,y,8)\\x+y=2\space\space\text{ for } (x,y,9)\\x+y=0\space\space\text{ for } (x,y,10)$$ Thus we have $$21+19+17+15+\cdots+5+3+1=121$$ solutions.

$\endgroup$
2
  • $\begingroup$ You’re missing $=0$ and $=20$. And all your counts are missing the possibilities of $x$ or $y$ being zero. $\endgroup$
    – user208649
    Commented Sep 3, 2020 at 20:42
  • $\begingroup$ solutions of the last equation $x+y=0$ and the first one? . I did this you say before because i interpreted "non negative" as positive by distraction but after I corrected myself. $\endgroup$
    – Piquito
    Commented Sep 4, 2020 at 12:35
0
$\begingroup$

Found the mistake. Instead of $\left(x^0+x^1+\dots+x^{10}\right)$, it should have been $\left(x^0+x^2+\dots+x^{20}\right)$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .