Find the number of integral solutions of $2x + y + z = 20$?

Find the number of integral solutions of $2x + y + z = 20$ where $x,y,z \geq 0$ ?

Can I solve it by using stars and bars method of combinatorics?


Solution 1:

Note that $y,z$ have the same parity. There are two cases:

$1^\circ$ $y$ and $z$ are even. Put $y=2y', z=2z'$. The equation reduces to $x+y'+z'=10$.

$2^\circ$ $y$ and $z$ are odd. Put $y=2y'+1, z=2z'+1$. The equation reduces to $x+y'+z'=9$.

You can solve both cases using the stars-and-bars method.

Solution 2:

HINT.-Excluding first both zeros and permutations of $(y,z)$ we have $$0\lt x\lt9\Rightarrow \frac{20-2x}{2}=10-x \text{ solutions }$$ for instance for $x=2$ we have the solutions of $y+z=16$ so $(y,z)=(1,15),(2,14),\cdots,(8,8)$. To finish you have a straightforward calculation.