You are stopping by Timmy’s to buy $12$ donuts. There are $4$ varieties to choose from. You need to have at least one donut from each variety. How many different ways can you select your $12$ donuts?
It will be
Consider the $8$ remaining donuts as $8$ points (because you have at least $1$ donut for each different donut type, so quit $4$ donuts of your $12$).
Then you can separate your remaining $8$ donuts by three bars to identify each of your four types of donuts. For example:
So if you consider those three bars with the $8$ points all as points again, you will only have to choose three of the new $11$ points to change them by bars and get another arrangement.
- Taking 1 donut firstly from each variety to fulfill The condition for at least one donut from each variety, so we have 4 donuts selected. 12-4 = 8 donuts remain to be selected.
- Now we can select 8 donuts with any number of donuts from each variety(including zero selections), consider the 4 varieties to be named a,b,c,d then we have the situation as a+b+c+d = 8. Here r = 4 (four varieties) and n = 8
So, to find the number of ways(w) in this situation use w = (n+r-1)C(r-1). applying this, we get the result as 11C3 which is equal to 165.