0

Let there be an equation, $$a_1x_1+a_2x_2+\dots+a_nx_n=S$$ Here, $a_i$ where $i=1,2,\dots,n$ are positive integers, also S is a positive integer too. How many non-negative integral solutions does the above equation have?

For example $3x+y+z=24$ has 117 integral solutions. Can you also verify it with this result?

I am not looking for a Java program to solve it and I am in 10 standard so a bit of explanation will help a lot.

RobPratt
  • 45,619
Vishal
  • 13
  • This post seems to be similar. Also thought it would be helpful to point out that what you are studying is a linear diophantine equation (which will help with your google search). https://math.stackexchange.com/questions/80822/solutions-to-linear-diophantine-equation-15x21y-261 – Jake Mirra Dec 23 '20 at 19:29
  • https://math.stackexchange.com/questions/30638/count-the-number-of-positive-solutions-for-a-linear-diophantine-equation#:~:text=For%20any%20n%E2%89%A50,%E2%88%971%3Dn%2B1. – saulspatz Dec 23 '20 at 19:59
  • @saulspatz Thank you I got my answer. https://math.stackexchange.com/a/3288135/865640 Now i will play around it with more. – Vishal Dec 23 '20 at 20:08
  • Oddly enough, these seem to be links to the very same post. – saulspatz Dec 23 '20 at 20:13
  • @saulspatz I am really sorry but i really went through them all , but i missed this solution somehow. – Vishal Dec 23 '20 at 20:14
  • You have nothing to apologize for. – saulspatz Dec 23 '20 at 20:15

1 Answers1

0

We can solve it with the help of "finding a probability using a multinomial". If in the equation, $$a_1x_1+a_2x_2+...+a_nx_n=S$$ a)Zeroes are not considered blanks, the number of solution of the equation =coefficient of $x^n$ in $$(1+x^{a_1}+x^{2a_1}+..)(1+x^{a_2}+x^{2a_2}+..)...(1+x^{a_n}+x^{2a_n}+..)$$ $$=(1-x^{a_1})^{-1}(1-x^{a_2})^{-1}...(1-x^{a_n})^{-1}$$ b)Zeroes are considered as blanks, the number of solution of the equation =coefficient of $x^n$ in $$(x^{a_1}+x^{2a_1}+..)(x^{a_2}+x^{2a_2}+..)...(x^{a_n}+x^{2a_n}+..)$$ $$=(x^{a_1+a_2+a_3+...+a_n})(1-x^{a_1})^{-1}(1-x^{a_2})^{-1}...(1-x^{a_n})^{-1}$$

Now there are many ways to find the coefficient i.e.,synthetic multiplication of polynomials, calculating the $n^{th}$ derivative of the multinomial using cauchy integral formula and many other ways.

Vishal
  • 13