Solve the following via generating functions

78 Views Asked by At

Question:

Solve the following using generation functions:

How many non-negative solutions over $\mathbb{Z}$ there are for the following equation: $$3x_1+2x_2+3x_3+2x_4+3x_5+2x_6+3x_7=20$$ when at least one of these variables is odd, and $x_1,...,x_7\geq0$?

  • The previous sub-question gave us the number of non-negative solutions over $\mathbb{Z}$, when there isn't a restriction of the variables, and I got 1203 solutions.

My attempt:

$Solution$. We shall apply the complement method, using the previous sub-question, and subtract the number of solutions in which all the variables are even.

Therefore, we suppose that: $x_1,...,x_7\in\{0,2,4,6,...\}$, so we get the next generation function: $$f(x)=(x^0+x^6+x^{12}+x^{18}+...)^4(x^0+x^4+x^8+x^{12})^3=D(4,k)x^{6k}\cdot D(3,i)x^{4i}$$ Now, we consider $6k+4i=20$, for the coefficient of $x^{20}$, and get the next table for the compatible $k,i$ to satisfy the equation: $$\begin{array}{|c|c|c|c|} \hline k& i \\ \hline 0& 5 \\ \hline 2& 2 \\ \hline \end{array}$$

So in total: $$D(4,0)x^0\cdot D(3,5)x^{20}+D(4,2)x^{12}\cdot D(3,2)x^8=[\binom{4}{4}\binom{7}{5}+\binom{5}{2}\binom{4}{2}]x^{20}=81x^{20}$$

Thus, according to the complement method, we get our final result:$$1203x^{20}-81x^{20}=1122x^{20}$$

Therefore, we have $1122$ non-negative solutions over $\mathbb{Z}$.


I have a feeling that this is not true, and I need to apply the inclusion-exclusion method instead. Therefore, I will be glad to see what you think. Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

Your solution approach and final count of $1122$ are correct. Inclusion-exclusion would also work but would be messier. You might try it as another exercise.