Combinations with Repetition

I am looking the basics of combinations with repetition. The other name is Stars and Bars problem.

On MIT OCW I found this:

An ice-cream store specializes in super-sized deserts. They offer a “quad-sundae” which has 4 scoops of ice-cream mixed together in a bowl. Once the scoops are in the bowl, you can’t distinguish their order, you can only tell how many of each flavor there are. Note however that a sundae with 3 scoops of vanilla and 1 scoop of chocolate is different from a sundae with 3 scoops of chocolate and 1 scoop of vanilla. The store has 10 different flavors of ice cream to choose from. How many different quad-sundaes can you get?

I said that it is a Bars and Stars problem. I did it like Logic behind combinations with repetition? here or http://www.csee.umbc.edu/~stephens/203/PDF/6-5.pdf.

$\binom{10+4-1}{4-1}$ = $\binom{10+4-1}{10}$ = 286

but MIT said that:

$\binom{9+4}{9}$ = $\binom{9+4}{4}$ = 715

which one is true one :)

• $9$ bars, $4$ stars. – paw88789 Jan 21 '15 at 11:47
Basically the formula for distributing $n$ identical things in $r$ distinct bins where each bin can take any number of things is $\frac{(n+r-1)!}{r!(n-1)!}$. This is a standard formula you can look up the derivation , its easy to prove. Now in your problem scoops are the identical things and flavors the distinct bins, so $n=4$ and $r=10$ so answer is $\binom{10+4-1}{4}$.
$$x_1 + x_2 + ... + x_9 + x_{10} = 4$$