The number of non-negative integral solutions of the equation
$x_1+x_2+x_3+....+x_r = n$
is $\binom{n + r − 1} {r− 1}$
I tried using it in the following two questions.
Let $n_1<n_2<n_3<n_4<n_5$ be positive integers such that $n_1+n_2+n_3+n_4+n_5=20$ . Then the numbers of such distinct arrangements $(n_1,n_2,n_3,n_4,n_5)$ is
Given solution:
They just listed down all $7$ possible solutions i.e. $(1,2,3,4,10),(1,2,3,5,9),(1,2,3,6,8),(1,2,4,5,8),(1,2,4,6,7),(1,3,4,5,7),(2,3,4,5,6).$
My approach:
As for $n_1<n_2<n_3<n_4<n_5$ the condition should be $n_i \geq i$
So let $n_i = x_i + i$ where $x_i \geq 0$
$\therefore (x_1+1)+(x_2+2)+(x_3+3)+(x_4+4)+(x_5+5)=20$
$\therefore (x_1)+(x_2)+(x_3)+(x_4)+(x_5)=5$
Hence number of solution of this equation should be $\binom{5+5-1}{5-1}$
$=\binom{9}{4} = 126$
I think that as $x_i \leq 9-i$ is not considered it's giving extra ways. How do I fix this?
In the next question I tried Multinomial Theorem to include both upper and lower bounds.
A man has three friends. The number of ways he can invite one friend everyday for dinner on six successive nights so that no friend is invited more than three times is?
Given Solution:
They did grouping of 6 days of week as $(1,2,3) or (3,3,0) or (2,2,2)$ then permutation of these groups to get final answer as $510$.
My Approach:
Let $x_i$ be the number of days $i^{th}$ person goes for dinner, so $0\leq x_i \leq 3$.
$\therefore x_1+x_2+x_3 = 6$
$\therefore$ Number of ways = Coefficient of $p^6$ in $(p^0+p^1+p^2+p^3)^3$
= Coefficient of $p^6$ in $\frac{(1-p^4)^3}{(1-p)^3}$
= Coefficient of $p^6$ in $(1-3p^4 +\text{terms with p power greater than 6})(1-p)^{-3}$
= $\binom{8}{6} - 3\binom{4}{2}$
= 10
Again very huge difference, how to fix this?? Please help.
Thanks.