Answer on question 36977 – Math – Discrete Mathematics
How many solutions are there to the equation x1+x2+x3+x4+x5=21, where xi,i=1,2,3,4,5, is a nonnegative integer such that
a) x1≥1?
b) xi≥=2,fori=1,2,3,4,5?
c) 0≤x1≤10?
d) 0≤x1≤3,1≤x2<4, and x3≥15?
Solution
a) Let y1=x1−1,y2=x2,y3=x3,y4=x4,y5=x5. Substitute these into our equation
y1+y2+y3+y4+y5=20
And yi≥0 for i=1,2,3,4,5.
There is a 1-1 correspondence between the solutions and reordering of 20 ones and 4 zeros (y1 is the number of ones before the first zero, y2 the number of ones between the first and the second zero, and so on).
Hence the answer is
C20+44=C244=10626.
b) Let y1=x1−2,y2=x2−2,y3=x3−2,y4=x4−2,y5=x5−2. Substitute these into our equation
y1+y2+y3+y4+y5=21−10=11
Similarly to the previous case we get
C11+44=C154=1365.
c) Using the sum rule, the number of solutions with 0≤x1≤10 added to the number of solutions with x1≥11 gives all non-negative integer solutions. Thus the number of solutions with 0≤x1≤10 is
C254−C144=12650−1001=11649.
d) Let y1=x1,y2=x2−1,y3=x3−15,y4=x4,y5=x5. Substitute these into our equation
y1+y2+y3+y4+y5=21−1−15=5,
where y1≤3,y2≤2,yi≥0,i=3,4,5. Similarly to the previous case we get
C94−C64−C74=76.
Answer: a) 10626; b) 1365; c) 11649; d) 76.