## Problem 12

Problem – 12

How many solutions are there to the equation?

x1+x2+x3+x4+x5=23,

where xi, i=1, 2, 3, 4, 5, is a nonnegative integer such that

a) x1≥1?

b) xi≥1 for i=1, 2, 3, 4, 5?

c) 0≤x1≤7?

d) 0≤x1≤3, 1≤x2<4, and x3≥15?

Solution :

a)      We require x1 ≥ 1. This uses up 1 of the 23 total required, so the problem is the same as fining the number of solutions to x1’+x2’+x3’+x4’+x5’ = 22 with each xi’ a nonnegative integer. The number of solutions are therefore

C(5+22-1,22) = C(26,22) = 14950

b)      We require each xi’ ≥ 1. Thus up 5 of the 23 total required, so the problem is the same as finding the number of solutions to  x1’+x2’+x3’+x4’+x5’ = 18 with each xi’ a nonnegative integer. The number of solutions are therefore

C(5+18-1,18) = C(22,18) = 7315

c)       The number of solutions without restriction is C(5+23-1,23) = C(27,23) = 17550. The number of solutions violating the restriction by having x1≥8 is C(5+15-1,15) = C(19,15) = 3876. Therefore the answer is 17550 – 3876 = 13674

d)      The number of solutions with x2 ≥ 1 and x3 ≥ 15 ( as required) but without the restriction x1≤3 and x2<4 is C(5+7-1,7) = C(11,7) = 330. The number of solutions violating the restriction for x1, which is ≥ 0, by having x1≥ 4 is C(5+3-1,3) = C(7,3) = 35, the number of solutions violating the restriction for x2 , which is ≥ 1, by having x2≥4 is C(5+4-1,4) = C(8,4) = 70. Therefore the answer is 330 – 35 – 70 = 225