[Math] How many different playlists can you make if you allow repeated songs

combinatoricspermutations

The question is:

You own 6 songs by Adele, 4 by Katy Perry, and 5 by Lady Gaga. How many different playlists can you make that consist of 4 Adele songs, 3 Perry songs, and 2 Gaga songs, if you do allow repeated songs?

One method I tried is 4^6 * 3^4 * 2^5.

I also tried C(6,4) * C(4,3) * C(5*2).

Both of these are wrong and I am not sure how to calculate this correctly.

Best Answer

If you look only at the order of the artists being played, then there are $$\frac{9!}{4!3!2!} = \frac{362880}{24*6*2} = 1260$$ possible orderings. This is because there are $9$ songs, which would have $9!$ orderings if all songs were different, but for now we treat the the songs by each artist as the same so we divide out the number of ways we could order the $4$ Adele songs, and similarly divide by $3!$ for Perry and $2!$ for Gaga.

Another way to see the above would be to first choose which $4$ of the $9$ slots will be Adele songs, which gives $\binom{9}{4}$ choices. Of the remaining $5$ slots, choose which $3$ of them will be Katy Perry songs. This gives $\binom{5}{3}$ choices. The remaining 2 slots will then be Gaga songs. Put together this gives $$\binom{9}{4}\binom{5}{3} = \frac{9!}{4!5!}\frac{5!}{3!2!} = \frac{9!}{4!3!2!}$$ as above.

Now that we know which artist is in which slot, we have to choose the songs to play. Each song that comes on by a particular artist can be any one of the songs by that artist. So for each Adele song there are $6$ possibilities, and there are $6*6*6*6=6^4$ selections of four Adele songs all together. Similarly $4^3$ for Katy Perry songs, and $5^2$ for Lady Gaga.

Putting this together, you get $\binom{9}{4}\binom{5}{3}*6^4*4^3*5^2 = 2612736000$.

Related Question