Strategy for number of non-negative integers solutions such that $x_1+x_2+\frac{\enspace\enspace\enspace}{}+x_5 = 50$

140 Views Asked by At

I'm trying to figure out the number of solutions to the following problems, although I'm not entirely sure what strategy I should use to solve these.

Combinations of non-negative integers $x_1+x_2+\frac{\enspace\enspace\enspace}{}+x_5 = 50$ given:

$(*) \enspace 0 \leq x_1, \frac{\enspace\enspace\enspace}{}, x_4 \enspace\wedge \enspace x_5 \leq 5$

$(**) \enspace 0 \leq x_1, \frac{\enspace\enspace\enspace}{}, x_5 \enspace\wedge\enspace x_1-x_2-x_3+x_4+x_5 = 30$

$(*\!*\!*) \enspace 0 < x_1, \frac{\enspace\enspace\enspace}{}, x_3,\enspace\wedge\enspace 0 \leq (x_4, x_5) \leq 5$

For $(*)$ I know I can fix $x_5$ from $0-5$, and solve $x_1+x_2+x_3+x_4= 50-x_5$, then add these solutions together. But I'm not sure what strategy I could use for $(**)$ and $(*\!*\!*)$. Could anyone give me some direction?

Also note the $<$ instead of $\leq$ at $(*\!*\!*)$.

Thanks in advance.

1

There are 1 best solutions below

3
On BEST ANSWER

For the second case, adding the equation in the problem statement to the one in the case gives:

$$x_1 + x_4 + x_5 = 40,$$

and subtracting them gives

$$x_2 + x_3 = 10.$$

For the third case, it's much the same as the second case, except you set $x_4 + x_5$ to $0, 1, 2, ... 10$ and simultaneously set $x_1 + x_2 + x_3$ to $50, 49, 48, ... 40,$ with the further contstraint that $x_1, x_2, x_3$ are positive.