4
$\begingroup$

How many solutions to $x_1 +x_2 +x_3 +x_4 = 1097$ , in nonnegative integers $x_1$, $x_2$, $x_3$, and $x_4$ which satisfy at least one of the inequalities $x_1 \geq 100$, $x_2 \leq 499$?

I understand how to calculate the number of solutions to the unrestricted problem: $1097 + 4 - 1 \choose 1097$ solutions $= \binom{1100}{1097} = \binom{1100}{3}$

I also know how to handle a single restriction being added. For example if we just take $x_1 \geq 100$: We have $x_1 = x_1' + 100$. Then our problem is equivalent to $x_1' + x_2 + x_3 + x_4 = 997$. Then we have $\binom{4 + 997 -1}{997} = \binom{1000}{3}$ solutions

Finally, I know if we had to meet both restrictions, we could do the unrestricted number of solutions - the number of solutions that violate each requirement. Where I'm running into trouble is determining how to calculate the number of solutions that meet at least one restriction. How can I find the number of solutions that violate both restrictions?

$\endgroup$
3
  • 1
    $\begingroup$ Count all solutions, then subtract the solutions where $x_2>499.$ $\endgroup$ Commented Oct 24, 2021 at 21:44
  • $\begingroup$ @ThomasAndrews how will that account for the x_1 constraint? $\endgroup$
    – Go Blue
    Commented Oct 25, 2021 at 16:53
  • $\begingroup$ You've already done that fine. @GoBlue $\endgroup$ Commented Oct 25, 2021 at 17:15

1 Answer 1

3
$\begingroup$

When I'm confronted with 'at least one' problem types, I usually go to the opposite case. Namely, the number solutions to $x_1 +x_2 +x_3 +x_4 = 1097$, with $x_1, x_2, x_3, x_4 \geq 0$ which satisfy at least one of the inequalities $x_1 \geq 100, x_2 \leq 499$, is going to be equal to the $\textit{total}$ amount of solutions to $x_1 +x_2 +x_3 +x_4 = 1097$ with $x_1, x_2, x_3, x_4 \geq 0$ $\textbf{minus}$ the amount of solutions to $x_1 +x_2 +x_3 +x_4 = 1097$ with $x_1, x_2, x_3, x_4 \geq 0$ in which none of the inequalities hold (so we have $x_1 < 100 \ \textbf{and} \ x_2 > 499$, or $x_1 \leq 99$ and $x_2 \geq 500$ as $x_1$ and $x_2$ are integers).

This should be a lot easier to compute, and I hope this gives you a nudge into the right direction.

$\endgroup$
1
  • $\begingroup$ This was helpful, thank you! $\endgroup$
    – Go Blue
    Commented Oct 26, 2021 at 2:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .