In how many ways can we choose 6 candies from 8 brands that are available? (It is assumed that repetition of a brand is allowed) I have the solution and I know it is $\ \binom{13}{7} $ but I think it should be $\ 8^6 $ because:
We need to choose 6 candies and there are 8 brands to choose from for each candy. So there are $\ 8×8×8×...×8=8^6 $ ways to choose them.
Please help me understand why my logic is wrong.
 A: The correct answer as you have mentioned is $\binom{13}{7}$ and this is a stars and bars problem.
Now lets see why $8^6$ is wrong.
Lets say the brands are $A,B,C,D,E,F,G,H$
Then a selection of $6$ candies can be represented as a string.
$ABCAAF$ where $3$ candies from $A$ and $1$ candy from $B,C,F$
Consider another set of candies $AAABCF$ this has a similar configuration as the first one $3$ from $A$ and $1$ from $B,C,F$. This string was already counted and thus there is some overcounting involved.
Similarly there are many examples of overcounting in $8^6$
A: $\dbinom{13}{7}=1,716$ is the number of different ways we can get candies, but it doesn't tell us how many ways to get each candy selection.
This is the second column (the first lists the different counts of candies we can get, for example 3 of one type, two of another and one other is listed as $321$).

The second column is given by the multinomial:
$$\binom{8}{n_1,\dots,n_k,8-\sum_\limits{i=1}^k n_i}=\frac{8!}{n_1!\dots n_k!(8-\sum_\limits{i=1}^k n_i)!}$$
where $n_i$ is the size of the $i^{th}$ group of parts.
The third column is the number of ways to arrange the candy selection once we have one, and this is given by the multinomial:
$$\binom{6}{p_1,\dots,p_j}=\frac{6!}{p_1!\dots p_j!}$$
where $p_i$ is the $i^{th}$ part.
The fourth column is the multiple of columns 2 and 3, and sums to $8^6=262,444$.
A: Can't we do it by taking the  combination of 48 taken 6 at a time? Here I am imagining that there are 8 empty buckets and each has a capacity to hold six candies.So , it would be 48!/{(42!)6!}. What is the mistake in this technique?Please correct me.
