To solve these type of problems knowledge of generating functions will be required.
(Q). In how many ways 5 identical balls can be distributed to 10 identical bags if:
(i) There is no restriction
(ii) Each bag must contain atleast 1 ball
(iii) Each bag must contain at most 1 ball
(iv) Each bag must contain exactly 1 ball
Solution:-
Let first do it manually:-
Let’s take 3rd case:-
3 2 0 0 0 0 0 0 0 0
Here it does not matter that these 3 & 2 balls packet are given to which bag because bags are identical i.e. indistinguishable.
Also since balls are also identical so there is always 1 way to select any these 3 & 2 balls out of 5 balls.
So there is only 1 way to distribute this division.
⇓
Similar situation applies for all other cases.
Hence total number of ways to distribute = 7 Answer
(ii) 0 (see diagram) Answer
(iii) 1 (7ᵗʰ case) Answer
(iv) 0 (see diagram) Answer
n = 5
r = 10
⦿ Now Let us take another example.
(Q). In how many ways 12 identical chocolates can be distributed to 5 identical bags:-
(i) Any way
(ii) Each bag contains atleast 1 chocolate
(iii) Each bag contains at most 1 chocolate
(iv) Each bag contains exactly 1 chocolate
Solution:-
(ii) P(12, 5) = 13 Answer
(iii) 0 Answer
(iv) 0 Answer