How many integer-valued solutions are there?

$$ x_1 + x_2 + x_3 + x_4 + x_5 = 63, x_i \ge 0, x_2 \le 9.$$

My Approach

$$ x_1 + x_2 + x_3 + x_4 + x_5 = 63, x_i \ge 0, x_2 \le 9.$$

$$ x_2' = x_2 - 9$$

$$ x_1 + x_2' + x_3 + x_4 + x_5 = 54, x_i \ge 0, x_2' \le 0 $$

... And I'm lost

  • $\begingroup$ your thoughts ? $\endgroup$ – Learning Jan 29 '18 at 4:24
  • 3
    $\begingroup$ @JohnBaek I am not stalking. I just see these questions pop out in the screen in a short interval, and it turns out to be you asking all these questions, and they turn out to be quite similar. $\endgroup$ – Weijun Zhou Jan 29 '18 at 4:29
  • $\begingroup$ Hint: "Good = All – Bad". Count all solutions where all $x_i\ge 0$, and then subtract those where, additionally, $x_2\ge 10$. $\endgroup$ – Alexander Burstein Jan 29 '18 at 4:41
  • 1
    $\begingroup$ and that's exactly what you asked one hour ago. $\endgroup$ – Weijun Zhou Jan 29 '18 at 4:41
  • 2
    $\begingroup$ John Baek: Reasking the same question is very much frowned upon here. Irrespective of whether you deleted the earlier version or not. You aren't adding useful content to the site with such antics. You are littering. Consider this a warning. If a question attracts negative attention, then reposting will only make matters worse. The solution is to IMPROVE the first version. $\endgroup$ – Jyrki Lahtonen Jan 29 '18 at 6:59

... and "stalking" makes sense.

You do know that you can use "star and bars" to get the number of solutions for:


and from this question you asked one hour ago you know how to do it for

$$x_1+x_2+x_3+x_4+x_5=63,x_i\ge 0,x_2\ge 10.,$$

Subtract the number and you will get the count for this question.


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.