An attempt for finding the number of integer solutions with restrictions

58 Views Asked by At

How many integer solutions are there to the inequality $y_1 + y_2 + y_3 + y_4 < 184$

My question is about this problem. I tried my own method to solve it. However, I got the wrong answer. The right answer should be 550620

There may be miscalculations. This can be ignored. The core is I want to know that if my idea of solving this is right.

My attempt:

I noticed that there are restrictions $$\begin{aligned} \begin{cases} 1\leq y_{1} \\ 1\leq y_{2 } \leq 10 \\ 0\leq y_{3} \leq 17 \\ 0 \leq y_{4} \leq 18 \end{cases} \end{aligned}$$ Then I let $x_{1}=y_{1}-1$ and $x_{2}=y_{2}-1$ , $x_{3}=y_{3}, \ x_{4}=y_{4}$. In the inequality, I change $<184\to \leq 183$
Then with new restrictions $$\begin{aligned} \begin{aligned} \begin{cases} 0\leq x_{1} \\ 0\leq x_{2 } \leq 9 \\ 0\leq x_{3} \leq 17 \\ 0 \leq x_{4} \leq 18 \end{cases} \end{aligned} \end{aligned}$$ I consider the inequality: $$\begin{aligned} x_{1}+x_{2}+x_{3}+x_{4} \leq 181 \end{aligned}$$ Then I add an extra term $x_{5}$ such that $$\begin{aligned} x_{1}+x_{2}+x_{3}+x_{4}+x_{5} = 181 &&(*) \end{aligned}$$ The smallest value of $x_{5}$ should be the $181$ minus the maximum of $x_{1}+\cdots+x_{4}$ which is $181-181=0$ since $x_{1}$ is not bounded. The maximum of $x_{5}$ should be $181$ since $x_{1},\cdots,x_{4}$ can take $0$ as minimal value. Thus $0\leq x_{5}\leq 181$ .

Then I use inclusion-exclusion. For $(*)$ , consider events $A,B,C$ and let $A=x_{2} \geq 10$ , $B=x_{3} \geq 18$, and $C=x_{4} \geq 19$
Then I think the result should be $$\begin{aligned} \binom{185}{181}-(\binom{175}{171}+\binom{167}{163}+\binom{166}{162})+\binom{157}{153}+\binom{156}{152}+\binom{148}{144}-\binom{138}{134} \end{aligned}$$ where $\binom{185}{181}=S$ and $\binom{175}{171}$ is considering $x_{1}+\cdots+x_{5}=181$ where we only have restriction $x_{2} \geq10$ and so on.
However, I got answer 547200 which is different from the answer.

Any help on this? Thanks