Question 1204818
<br>
This kind of problem is one for which the "stars and bars" method is especially well suited.<br>
Here is a simple example of this method.<br>
Suppose we have 5 pieces of candy to be divided among 3 children.<br>
Represent the pieces of candy with 5 stars:<br><pre>
 * * * * *</pre>
To represent dividing the candy among 3 children, insert 2 bars in the string of stars.<br><pre>
 *|* *|* *</pre>
Notice that to divide the candies among THREE children we need only TWO dividers.<br>
Every different placement of the two dividers represents one of the distinct ways of dividing the 5 candies among the 3 children.<br>
So the number of ways of dividing the 5 candies among the 3 children is the number of distinct ways of arranging the symbols *****||.<br>
By a well-known counting principle, that number of ways is {{{7!/((5!)(2!))}}}, or {{{C(7,2)}}}.<br>
Now to use this method on your problem....<br>
(a) 17 candies, 7 different kinds --> 17 stars, 6 bars<br>
ANSWER: {{{23!/((17!)(6!))}}} or {{{C(23,6)}}} = 100947<br>
(b) 17 candies with at least a piece of each flavor<br>
To use stars and bars for this problem, first select one piece of candy of each of the 7 kinds; that ensures that there will be one of each kind.  Then there are 10 pieces of candy to be selected, with no further restriction on the number of each kind, so stars and bars can be used.<br>
10 candies, 7 different kinds --> 10 stars, 6 bars<br>
ANSWER: {{{C(16,6)=8008}}}<br>
(c) 17 candies with at least 2 cherry and at least 3 lemon<br>
Similar to (b), start by selecting the required 2 cherry and 3 lemon.  That means 12 more candies to be selected, with no further restrictions on the number of each kind.<br>
12 candies, 7 different kinds --> 12 stars, 6 bars<br>
ANSWER: {{{C(12,6)=18564}}}<br>