question: (i) Find the number of ways to distribute $60$ chocolates(all chocolates are indistinguishable) and $60$ toffees (all toffees are indistinguishable) among $100$ students such that each student get at least one of any kind (no student remains empty handed).
(ii) Find the number of ways to distribute $2$ chocolate and $2$ toffees among $3$ persons such that each person get atleast one of any kind (no person remains empty handed).
my attempt: I thought both parts of question are of same type and I proceeded as follows :
(i) First i selected $60$ students in $^{120}C_ {60}$ ways then , I distributed 60 chocolates among them in $1$ way (such that each student get $1$ chocolate) and then, I distributed rest $60$ toffees among $40$ students in $^{59} C _{39}$ ways,and finally multiplied these two i.e, $[1\times ^{59} C _{39}]$ ways
(ii)In second part of the question first I selected $2$ persons in $^{3} C _{2}$ ways gave each of them $1$ chocolate in $1$ way, and then I gave $2$ toffees to $3rd$ person in $1$ way, and then again. It is also possible that I only give $1$ toffee to the $3rd$ person and distribute 1 remaining toffee among $2$ persons (to whom I have given chocolates) in $2$ ways thus getting $^{3}C_{2}.(1+2)=9$ ways ...but I think somewhere I'm doing something wrong in both (i), (ii), so please help .
I'm having difficulty in these type of questions. I am unable to understand if order of objects (which we are going to distribute) will matter or not.
The second question is simpler, so let's start there.
Background: The number of ways of distributing $k$ indistinguishable objects into $n$ distinguishable containers is the number of solutions of the equation $$x_1 + x_2 + x_3 + \cdots + x_n = k$$ in the nonnegative integers. A particular solution corresponds to the placement of $n - 1$ addition signs in a row of $k$ ones. For instance, if $n = 4$ and $k = 10$, then $$1 1 1 + 1 1 + 1 + 1 1 1 1$$ corresponds to the solution $x_1 = 3$, $x_2 = 2$, $x_3 = 1$, $x_4 = 4$, while $$1 1 1 1 1 + 1 1 1 + 1 1 + $$ corresponds to the solution $x_1 = 5$, $x_2 = 3$, $x_3 = 2$, $x_4 = 0$. Therefore, the number of solutions of the equation $x_1 + x_2 + x_3 + \cdots + x_n = k$ in the nonnegative integers is the number of ways we can select which $n - 1$ of the $k + n - 1$ positions required for $k$ ones and $n - 1$ addition signs will be filled with addition signs, which is $$\binom{k + n - 1}{n - 1}$$
We use the Inclusion-Exclusion Principle.
Let $c_k$ be the number of chocolates received by the $k$th person. Then $$c_1 + c_2 + c_3 = 2 \tag{1}$$ Equation 1 is an equation in the nonnegative integers. The number of solutions of equation 1 is $$\binom{4}{2}$$ By symmetry, there are also $\binom{4}{2}$ ways to distribute the two toffees to three people.
Hence, there are $$\binom{4}{2}\binom{4}{2}$$ ways to distribute two indistinguishable chocolates and two indistinguishable toffees to three people. From these, we must subtract those distributions in which fewer than three people receive a sweet.
There are $\binom{3}{1}$ ways to choose a person who does not receive a sweet. Suppose the unlucky person is the third person. Then the number of ways we can distribute the chocolates to the other two people is the number of solutions of the equation $$c_1 + c_2 = 2 \tag{2}$$ in the nonnegative integers. Equation 2 is an equation in the nonnegative integers with $$\binom{2 + 1}{1} = \binom{3}{1}$$ solutions. By symmetry, there are also $\binom{3}{1}$ ways to distribute the toffees to two people.
Therefore, the number of ways to distribute the sweets if one person is excluded is $$\binom{3}{1}\binom{3}{1}\binom{3}{1}$$
However, if we subtract this amount from the total, we will have subtracted those cases in which two people do not receive a sweet twice, once for each way of designating one of those people as the person who does not receive a sweet. We only want to subtract those cases once, so we must add them back.
There are $\binom{3}{2}$ ways to exclude two people from receiving a sweet and only one way to distribute all the sweets to the remaining person.
Hence, the number of ways of distributing two indistinguishable chocolates and two indistinguishable toffees to three people so that each person receives at least one sweet is $$\binom{4}{2}\binom{4}{2} - \binom{3}{1}\binom{3}{1}\binom{3}{1} + \binom{3}{2}\binom{2}{0}\binom{2}{0} = 36 - 27 + 3 = 12$$ a result which you can check by listing the possible cases.
The number of ways the chocolates could be distributed is the number of solutions of the equation $$c_1 + c_2 + c_3 + \cdots + c_{100} = 60 \tag{3}$$ in the nonnegative integers, which is $$\binom{60 + 100 - 1}{100 - 1} = \binom{159}{99}$$ By symmetry, there are also $\binom{159}{99}$ ways to distribute the toffees to $100$ people. Hence, the number of ways the sweets can be distributed without restriction is $$\binom{159}{99}\binom{159}{99}$$ From these, we must subtract those distributions in which fewer than $100$ people receive a sweet.
There are $\binom{100}{j}$ ways to exclude $j$ people from receiving a sweet, which leaves us with $60$ chocolates and $60$ toffees to distribute to the remaining $100 - j$ people. The number of ways of distributing the chocolates to the remaining $100 - j$ people is the number of solutions of the equation $$c_1 + c_2 + c_3 + \cdots + c_{100 - j} = 60$$ which is $$\binom{60 + 100 - j - 1}{100 - j - 1} = \binom{159 - j}{99 - j}$$ By symmetry, this is also the number of ways of distributing $100$ toffees to the remaining $100 - j$ people. Hence, the number of distributions of sweets in which $j$ people are excluded from receiving a sweet is $$\binom{100}{j}\binom{159 - j}{99 - j}\binom{159 - j}{99 - j}$$ Thus, by the Inclusion-Exclusion Principle, the number of ways the sweets can be distributed so that each person receives a sweet is $$\sum_{j = 0}^{100} (-1)^j\binom{100}{j}\binom{159 - j}{99 - j}\binom{159 - j}{99 - j}$$