266 views
We go to a pizza party, and there are $5$ types of pizza. We have been starving for days, so we can eat $13$ slices, but we want to sample each type at least once. In how many ways can we do this? Order does not matter.

Can anyone explain what is the meaning of that leaves 8 more from SIR’s solution ?

Total there is 13 slice we can eat which consist of 5 types of pizza .

Each slice is from any of the 5 type of pizza.

So it is given we have to include all types of pizza at least one .

So from 13 slice 5 slices are fixed as 5 types of pizza .

there are 8 slices possible which can be fill be any of 5 types of pizza.

P1+P2+P3+P4+P5=8

now apply star and bar and solve.

Yeah understood !! Thanks @Kabir5454

First, we sample the $5$ types. That leaves space for $8$ more, which we can choose freely, with repetition. The dots-and-bars(stars and bars) formula tells us that there are
$$\left(\begin{array}{c} 8+5-1 \\ 5-1 \end{array}\right)=\left(\begin{array}{c} 12 \\ 4 \end{array}\right)$$
ways to do this.