1
$\begingroup$

How to find out the number of non negative integral solutions of an equation containing 4 variables, for eg, say, ${a+2b+3c+4d=20}$?

I mean, we can calculate it quite easily for equations containing 2 variables, but what about equations containing 4 variables.?

  • 2
    Possible duplicate of [How to use stars and bars (combinatorics)](http://math.stackexchange.com/questions/910809/how-to-use-stars-and-bars-combinatorics)2017-01-14
  • 0
    @AnuragA, I think this one needs a more generalized equation, like a+2b+3c=20 right ?2017-01-14
  • 0
    Like @AnuragA said, http://math.stackexchange.com/questions/910809/how-to-use-stars-and-bars-combinatorics is what you need for your "simple" equation $x_1+...+x_n=a$. I don't know about the generalized equation $a_1x_1+...+a_nx_n=a$2017-01-14
  • 0
    @chítrungchâu I'm not sure why you need the equation you are suggesting. In fact, if you look at amWhy's solution on the link I have provided he deals with two cases: positive and non-negative.2017-01-14
  • 0
    yeah, but I don't think it's what Resorcinol needs, he said "non negative integral solutions of an equation containing 4 variables" right? It includes the equation $a+2b+3c+4d=20$2017-01-14
  • 0
    and to your comment, the only difference between positive and non-negative here is just a transformation $y=x-1$2017-01-14
  • 0
    in that case ($a+2b+3c+4d=20$) he will need generating function techniques.2017-01-14
  • 0
    To all concerned: I have edited the question2017-01-14
  • 0
    Have a look at http://math.stackexchange.com/questions/240427/partitions-of-an-integer-into-k-parts – your question asks for the number of partitions of $n=20$ into $k=4$ parts. Also related, http://math.stackexchange.com/questions/1908701/integer-partition-of-n-into-k-parts-recurrence2017-01-14
  • 0
    Had a look at those links, Resorcinol?2017-01-16
  • 0
    OK, so it's the number of partitions of $n=20$ into at most $k=4$ parts. Those links should still be helpful. Have you looked at them?2017-01-16
  • 0
    What about them? HAVE YOU LOOKED AT THE LINKS?2017-01-17
  • 0
    I don't know what you mean by "coverage area" – we're not discussing mobile phone reception here. But I do think my first link, and the book I cite there, deals with exactly the question you are asking.2017-01-17

1 Answers 1

1

See, that $d\leq 5$, $c\leq \left\lceil \frac{20-4d}{3}\right\rceil $, $a$ and $b$ can be then obtained in $n_{d,c}=\left\lceil\frac{20-4d-3c+1}{2}\right\rceil $ ways.

  1. $d=5$
    • $c=0$ : $n_{5,0}=1$ ($[0,0,0,5]$)
  2. $d=4$
    • $c=0$ : $n_{4,0} =3$ ($[0,2,0,4]$, $[2,1,0,4]$, $[4,0,0,4]$)
    • $c=1$ : $n_{4,1} =1$ ($[1,0,1,4]$)
  3. $d=3$
    • $c=0$ : $n_{3,0} =5$
    • $c=1$ : $n_{3,1} =3$
    • $c=2$ : $n_{3,2} =2$
  4. $d=2$
    • $c=0$ : $n_{2,0} =7$
    • $c=1$ : $n_{2,1} =5$
    • $c=2$ : $n_{2,2} =4$
    • $c=3$ : $n_{2,3} =2$
    • $c=4$ : $n_{2,4} =1$
  5. $d=1$
    • $c=0$ : $n_{1,0} =9$
    • $c=1$ : $n_{1,1} =7$
    • $c=2$ : $n_{1,2} =6$
    • $c=3$ : $n_{1,3} =4$
    • $c=4$ : $n_{1,4} =3$
    • $c=5$ : $n_{1,5} =1$
  6. $d=0$
    • $c=0$ : $n_{0,0} =11$
    • $c=1$ : $n_{0,1} =9$
    • $c=2$ : $n_{0,2} =8$
    • $c=3$ : $n_{0,3} =6$
    • $c=4$ : $n_{0,4} =5$
    • $c=5$ : $n_{0,5} =3$
    • $c=6$ : $n_{0,6} =2$

The number of ways is then equal to: $$1+4+10+19+30+44=108$$

  • 1
    As expected, this is the number of partitions of 20 into at most four parts, http://oeis.org/A0014002017-01-17