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.


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.

  • $\begingroup$ So I'd multiply the number of solutions to $x_1+x_4+x_5 = 40$ with the number of solutions to $x_2+x_3 = 10$ ? $\endgroup$ – Frank Vel Nov 18 '14 at 19:33
  • $\begingroup$ If you're looking for combinations, then you may need to remove some duplicates after you multiply. $\endgroup$ – John Nov 18 '14 at 20:23
  • $\begingroup$ given that $x_i$ and $x_j$ are distinguishable, would that be necessary? $\endgroup$ – Frank Vel Nov 18 '14 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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