How many integer solution to the inequality $$y_1+y_2+y_3+y_4\leq184$$with $y_1>0,\,0<y_2\leq10,\,0\leq y_3\leq17 $ and $0\leq y_4< 19$
MY try:For two variable I could try to solve by graphical method but for this, I don't know.Thank you
How many integer solution to the inequality $$y_1+y_2+y_3+y_4\leq184$$with $y_1>0,\,0<y_2\leq10,\,0\leq y_3\leq17 $ and $0\leq y_4< 19$
MY try:For two variable I could try to solve by graphical method but for this, I don't know.Thank you
On
The generating function $f(x)$ with coefficients $[x^k]f(x)$ that enumerate solutions to
$$y_1+y_2+y_3+y_4\le k$$
under said conditions (the ones in the title not the details) for the $y_i$s is
$$f(x)=x(x-x^{11})(1-x^{18})(1-x^{20})\cdot\dfrac{1}{(1-x)^5}$$
it is straightforward to expand the binomials to give the answer in terms of binomial coefficients but I just used this line in sage
taylor(x*(x-x^11)*(1-x^18)*(1-x^20)/(1-x)^5,x,0,184).coefficient(x^184)
which returns:
577800
Using the conditions in the details, instead you use the generating function with different $y_4$ upper limit:
$$g(x)=x(x-x^{11})(1-x^{18})(1-x^{19})\cdot\frac{1}{(1-x)^5}$$
sage input:
taylor(x*(x-x^11)*(1-x^18)*(1-x^19)/(1-x)^5,x,0,184).coefficient(x^184)
output:
550620
For given values of $y_2$, $y_3$, and $y_4$, there are $184-y_2-y_3-y_4$ valid choices for $y_1$, so the number is $$\sum_{y_2=1}^{10} \sum_{y_3=0}^{17} \sum_{y_4=0}^{19} (184-y_2-y_3-y_4).$$
We simplify this as follows (using triangular numbers): \begin{align*} & \phantom{={}} \sum_{y_2=1}^{10} \sum_{y_3=0}^{17} \sum_{y_4=0}^{19} (184-y_2-y_3-y_4) \\ & = \sum_{y_2=1}^{10} \sum_{y_3=0}^{17} \sum_{y_4=0}^{19} 184 - \sum_{y_2=1}^{10} \sum_{y_3=0}^{17} \sum_{y_4=0}^{19} y_2 - \sum_{y_2=1}^{10} \sum_{y_3=0}^{17} \sum_{y_4=0}^{19} y_3 - \sum_{y_2=1}^{10} \sum_{y_3=0}^{17} \sum_{y_4=0}^{19} y_4 \\ & = 10 \times 18 \times 20 \times 184-18 \times 20 \times \tfrac{10 \times 11}{2}-10 \times 20 \times \tfrac{17 \times 18}{2}-10 \times 18 \times \tfrac{19 \times 20}{2} \\ & = 662400 - 19800 - 30600 - 34200 \\ & = 577800. \end{align*}
We can verify this by generating all of them using the GAP code:
whose output ends with: