How many solutions are there to the equation $x_1 + x_2 + x_3 + x_4 \leq 35$ in which all the $x_i$ are non-negative integers?

330 Views Asked by At

So I know how to solve these kinds of problems in general using the stars and bars approach. We treat the variables as the "slots" where we can deposit stars as our "counters", and there are $3$ bars. It then turns into a permutation over multisets.

But I'm struggling with this problem in particular because it completely deviates from what I'm familiar with, as we're no longer depositing exactly $35$ stars but less than or equal to $35$:

How many solutions are there to the equation $x_1 + x_2 + x_3 + x_4 \leq 35$ in which all the $x_i$ are non-negative integers? (Hint: add an extra variable y such that y is non-negative and $x_1 + x_2 + x_3 + x_4 + y = 35$)

Still not sure how to solve it, even with the hint. I also don't see how the hint is relevant. The answer key says the following:

The number of solutions to

(1) $x_1 + x_2 + x_3 + x_4 \leq 35$

with all the $x_i$ non-negative integers is equal to the number of solutions to

(2) $x_1 + x_2 + x_3 + x_4 + y = 35$

with all the $x_i$ and $y$ non-negative integers.

Why is this true?