2

How does one find the number of integral solutions of equations like,

$2x + 5y + 4z = 20$

I know how to do this counting if the coefficient of every variable on the LHS is $1$. But I don't know how to do this counting with arbitrary coefficients.

Student
  • 2,975
  • 1
    Do you mean positive integral solutions? (Or nonnegative?) There are infinitely many integral solutions. – Jonas Meyer Mar 25 '11 at 15:31
  • I don't know if this helps, but what you have there is a linear Diophantine equation in which Bézout's identity applies (http://en.wikipedia.org/wiki/B%C3%A9zout%27s_identity). It doesn't give any guidance with respect to counting though. – Gilead Mar 25 '11 at 16:24

2 Answers2

2

The linear equation $2x + 5y + 4z = 20$ has a two-parameter family of infinite solutions in integers. Note that $y$ has to be even. Further any even $y$ will give a one parameter family of infinite solutions for the equation $2x + 4z = 20 - 5y$.

Let $y = 2y_1$. Then we need to solve $2x + 4z = 20 - 10y_1 \implies x + 2z = 10 -5y_1$.

Hence, the set of all integer solutions is the two parameter family $$(10-5y_1-2z_1,2y_1,z_1)$$ where $y_1,z_1 \in \mathbb{Z}$

If you are interested in non-negative integral solutions for $(x,y,z)$, then we need $y_1 \geq 0$,$z_1 \geq 0$ and $5y_1 + 2z_1 \leq 10$.

This implies $y_1 \in \{0,1,2\}$.

If $y_1 = 0$, then $z_1 = \{0,1,2,3,4,5\}$.

If $y_1 = 1$, then $z_1 = \{0,1,2\}$.

If $y_1 = 2$, then $z_1 = \{0\}$.

Hence, the set of all non-negative solutions are $$\{ (10,0,0),(8,0,1),(6,0,2),(4,0,3),(2,0,4),(0,0,5),(5,2,0),(3,2,1),(1,2,2),(0,4,0) \}$$

The set of all positive solutions are $$\{(3,2,1),(1,2,2)\}$$

0

here is a paper on the problem i just happened to see somewhere else

yoyo
  • 10,575