Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How many solutions possible for the equation$$2{x_{1}}+2{x_{2}}+{x_{3}}+{x_{4}}={12}$$ all x are non-negative integer.

I see these links but I don't know how to solve this problem.(I know how to solve ${x_1}+{x_2}+{x_3}+{x_4}=12$)

How many solutions possible for the equation $x_1+x_2+x_3+x_4+x_5=55$ if

Enumerating number of solutions to an equation

share|cite|improve this question
Summing up and case-working is inelegant but I think there is no other way. – barto Dec 14 '12 at 12:12
up vote 2 down vote accepted

Solve for $2a+b=12$. For each one of the $7$ solutions $(a,b)=(k_1,k_2)$, solve for possibilities which count $(k_1+1)\times(k_2+1)$.

Eg. A solution to $2a+b=12$ is $(a,b)=(5,2)$.

So, $x_1+x_2=5$ while $x_3+x_4=2$. Within themselves;









adding up to $(5+1)\times(2+1)=18$ solutions for $(a,b)=(5,2)$.

share|cite|improve this answer
+28-20 for (3,6). Should add up to 140. – ashley Dec 15 '12 at 9:05
we have $(0,12)(1,10)(2,8)(3,6)(4,4)(5,2)(6,0)$ for 2a+b=12 and final answer is 13+22+27+28+25+18+7=140. Thanks. – Sali Me Dec 15 '12 at 9:19

Solve $x_{1}+x_{2}+x_{3}+x_{4}=12-x_{1}-x_{2}$ for all natural $x_{1},x_{2}$ s.t $x_{1}+x_{2}\leq6$ s.t and sum the results.

share|cite|improve this answer
Can you explain the statement $12-x_1-x_2$ and $ x_1+x_2 \le 6 $ a bit more? and continue more? – Sali Me Dec 14 '12 at 12:21
If $x_1+x_2\geq 6$ then $2x_1+2x_2>12$ and since $x_3,x_4$ are natural there are no solutions to the equations. Fix any pair $x_1,x_2$ s.t their sum is $\leq 6$ (hence there are solutions) and find how many $x_3,x_4$ there are that solve the equation. Note that for such fixed $x_1,x_2$ you want to count the number of solutions for $x_3+x_4=12-2x_1-2x_2$ which you already know to solve – Belgi Dec 14 '12 at 12:27
It seems you've somehow added an $x_5$ that isn't in the question. – joriki Dec 14 '12 at 12:29
@joriki - thanks! I edited accordingly – Belgi Dec 14 '12 at 12:31
@belgi I write answer with your help. can you check ? is it true? – Sali Me Dec 14 '12 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.