##### How many solutions are there to the equation using Combinatorics?

How many solutions are there to the equation

x_{1}+x_{2}+x_{3}+x_{4}+x_{5} = 21

where x_{i ,} i=1,2,3,4,5 is a non negative integer such that

A)x_{1 }≥ 1 ?

B)x_{1 }≥ 2 for i=1,2,3,4,5 ?

C) 0 ≤ x_{1 }≤ 10 ?

D) 0 ≤ x_{1 }≤ 3,1 ≤ x_{2 }< 4 , and x_{3 }≥ 15?

Pls explain part D of the above

(a) x1 ≥ 1, so equation will be x1 + x2 + x3 + x4 + x5 = (21 - 1) = 20.

So, total number of solutions = C((20+5-1), 20) = C(24, 20) = C(24, 4) = 10626.

(b)

xi ≥ 1, so equation will be x1 + x2 + x3 + x4 + x5 = (21 - 2 - 2 - 2 - 2 - 2) = 11.

So, total number of solutions = C((11+5-1), 20) = C(15, 11) = C(15, 4) = 1365.

(c) 0 ≤ x1 ≤ 10 . In other words, if we x1 ≥ 11 from total number of solution, then we get number of solutions between 0 ≤ x1 ≤ 10.

Possible solutions = C((21+5-1), 21) - C(((21-11)-5-1), (21-11)) = C(25, 21) - C(14, 10) = C(25, 4) - C(14, 4) = 12650 − 1001 = 11649.

(d) First, satisfy x3 ≥ 15, and x2 ≥ 1 then equation will be

x1 + x2 + x3 + x4 + x5 = (21 - 15 - 1) = 5.

So, total number of solutions = C((5+5-1), 5) = C(9, 5) = 126

Case 1: Now satisfy x2 ≤ 2, (since 2 and 3. 1 is already satisfied). Then situation will be same as part (c), and we subtract x2 > 3 solutions from total number of solution as given in above equation:

Total number of solutions = 126 - C(((5-2)+5-1), 5-1) = 126 - C(7, 4) = 126 - 35 = 91.

Case 2: Now satisfy x1 ≤ 3. Then situation will be same as part (c), and we subtract x1 > 4 solutions from total number of solution as given in case 1.

So, number of solutions = 91 - C(((5-3)+5-1), 5-1) = 91 - C(6, 4) = 91 - 15 = 76.

So, 76 is the answer.

But answer is 106.

Where? As I understood. 76 is correct answer.

@mithlesh @himanshuchowdhu, answer is 106. @mithlesh, your approach was fine but you missed the answer with a minute mistake.

For (d)

In Case 1:we substract

x2 ≥ 3solutions since u alreadyscaledx2 1 down, i.e; now with the current equation,x1 + x2 + x3 + x4 + x5 = 5, our new requirements became0 ≤ x1 ≤ 3, 0 ≤ x2 < 3, x3 ≥ 0. [since x3 is scaled down by 15units, x2 is scaled down by 1unit (21 - 15 - 1)=5]So, for x2≥ 3, it would be

C((5-3)+5-1,(5-3)) = C(6,2)and not C(((5-2)+5-1),5-1)= C(7,4).C(6,2) =

15.we substract x1>3 i.e;In Case 2:x1 ≥ 4solutions, viz,C((5-4)+5-1,(5-4)) = C(5,1) =

5.Therefore, final answer =126 - 15 -5 =

106.