# combinatorics - request for checking modified solution

Made corrections to my initial solution posted in the question "combinatorics - request for help"

To refresh the content of problem:

A shop offers infinite number of 7 distinct flavours of ice cream. In how many ways can the customer create his/her portion given that order can consist of at most 5 scoops of ice cream and that the case of cup without ice creams is not treated as order?

(new) Solution:

let $A_{i}$ -multiset of size $i$ of all possible ice cream portions customer can order ($i\in \{1,2,3,4,5\}$). Consider computation of $|A_{i}|$, except $|A_{1}|$, which is trivially equal to 7, separately by the use of "stars & bars "method. There are 8 bars for, $i$ stars, giving directly combinations with repetitions size $i$ from the set consisting of $7+i-1 = 6 + i$ elements. Hence: $|A_{i}| ={{7+i}\choose{i}} = \frac{(6+i)!}{i! 6!}$. Each $A_{i}$ is considered separately from $A_{j} (i\neq j)$. Then: number |S| of all possible orders is: $|S|=\sum\limits_{i=1}^{5}\frac{(6+i)!}{i!6!}=\frac{7!}{1!6!} + \frac{8!}{2!6!} + \frac{9!}{3!6!} + \frac{10!}{4!6!} + \frac{11!}{5!6!} = 7 + 28+\frac{9 \times 8 \times 7}{3\times2} + \frac{10\times9\times8\times7}{4\times3\times2} + \frac{11\times10\times9\times8\times7}{5\times4\times3\times2}=7+28+84+210+462 = 791$

Can anyone state whether my current solution is correct? Thanks for help in advance!

• Note that if you add a sixth "empty" flavour you can have up to 7 scoops of that too. Then there are $\binom{7+5}{5}=792$ selections of these $6$ flavours. Subtract 1 empty selection to give a shorter result $$\binom{12}{5}-1=791$$ You can use this "dummy category" trick to avoid the summation in problems like this. – N. Shales Mar 1 '17 at 20:31

The method is perfectly correct - the only problem is that you have the wrong value for $\binom 93$ which should be $84$ not $168$ (this makes the total $791$).