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

How many solutions are there to the equation

x1+x2+x3+x4+x5 = 21

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

A)x≥  1 ?

B)x≥  2 for i=1,2,3,4,5 ?

C) 0 ≤  x≤ 10 ?

D) 0 ≤  x≤  3,1 ≤  x< 4 , and x≥  15?

Pls explain part D of the above

##### 4Comments
Mithlesh Upadhyay 8 May 2017 05:15 pm

(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.

Himanshu Chowdhury 8 May 2017 05:38 pm

But answer is 106.

Mithlesh Upadhyay 8 May 2017 06:03 pm

Where? As I understood. 76 is correct answer.

Ashish Kumar Goyal 2 Nov 2018 04:40 pm

@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 ≥ 3 solutions since u already scaled x2 1 down, i.e; now with the current equation, x1 + x2 + x3 + x4 + x5 = 5, our new requirements became 0 ≤ 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.

In Case 2:  we substract x1>3 i.e; x1 ≥ 4 solutions, viz,

C((5-4)+5-1,(5-4)) = C(5,1) = 5.

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