# You are stopping by Timmy’s to buy $12$ donuts. There are $4$ varieties to choose from.

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?

## 2 Answers

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

2. 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 = \binom{n+r-1}{r-1}$$. applying this, we get the result as $$\binom{11}{3}$$ which is equal to $$165$$.

It will be

$$\binom{11}{3}=\frac{11\cdot10\cdot9}{3\cdot2\cdot1}=11\cdot5\cdot9=165$$

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$).

$$\bullet\bullet\bullet\bullet\bullet\bullet\bullet\bullet$$

Then you can separate your remaining $8$ donuts by three bars to identify each of your four types of donuts. For example:

$$\bullet\mid\bullet\mid \bullet\bullet\bullet\mid\bullet\bullet\bullet$$

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.

• The correct answer is 165. – Tom Sadan Nov 19 '16 at 0:51
• Thanks I didn't read that consideration. – iam_agf Nov 19 '16 at 0:57