2

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.?

  • @AnuragA, I think this one needs a more generalized equation, like a+2b+3c=20 right ? – T C Jan 14 '17 at 06:16
  • 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$ – T C Jan 14 '17 at 06:18
  • @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. – Anurag A Jan 14 '17 at 06:18
  • 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$ – T C Jan 14 '17 at 06:21
  • and to your comment, the only difference between positive and non-negative here is just a transformation $y=x-1$ – T C Jan 14 '17 at 06:22
  • in that case ($a+2b+3c+4d=20$) he will need generating function techniques. – Anurag A Jan 14 '17 at 06:26
  • To all concerned: I have edited the question – Resorcinol Jan 14 '17 at 06:43
  • 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-recurrence – Gerry Myerson Jan 14 '17 at 07:33
  • Had a look at those links, Resorcinol? – Gerry Myerson Jan 16 '17 at 05:11
  • 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? – Gerry Myerson Jan 16 '17 at 22:01
  • What about them? HAVE YOU LOOKED AT THE LINKS? – Gerry Myerson Jan 17 '17 at 01:16
  • 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. – Gerry Myerson Jan 17 '17 at 12:00

2 Answers2

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$$

0

The number of non-negative integral solutions of the equation a+2b+3c+4d=20 is: P(20,1)+P(20,2)+P(20,3)+P(20,4) = 1+10+33+64 = 108 The meaning of the notation P(n,k)= m (partition of n into k parts) is the following: there are m different ways to write n as summation of exactly k non-zero terms.The order of terms doesn't matter. Note that the general formula giving the number of integral solutions of equations of the type a+2b+3c+4d+...wz=n is P(n,1)+P(n,2)+P(n,3)+...P(n,w)