# How many integer-valued solutions?

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

• your thoughts ? – Learning Jan 29 '18 at 4:24
• @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. – Weijun Zhou Jan 29 '18 at 4:29
• Hint: "Good = All – Bad". Count all solutions where all $x_i\ge 0$, and then subtract those where, additionally, $x_2\ge 10$. – Alexander Burstein Jan 29 '18 at 4:41
• and that's exactly what you asked one hour ago. – Weijun Zhou Jan 29 '18 at 4:41
• 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. – Jyrki Lahtonen Jan 29 '18 at 6:59

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