# Counting: How many ways to choose 5 items from 3 groups, where items in a group are indistinguishable?

Carlos has chosen 12 different CDs he would like to buy: 4 are rap music, 5 are country music, and 3 are heavy metal music. Unfortunately, he has only enough money to afford to buy 5 of them (they all cost the same price). So he selects 5 of them at random. How many ways can he select a group of 5 CDs, where the CDs within a genre are indistinguishable?

I'm really stuck on how to do this problem. At first I thought 12C5, but this assumes that disks within the same genre are different. Any idea how to do this?

Edit: can you use stars and bars for this??

• This is the coefficient of $x^5$ in $\frac{(x^5-1)(x^6-1)(x^4-1)}{(x-1)^3}$. May 29, 2020 at 19:17
• How did you get this? May 29, 2020 at 19:17
• It's the number of ordered triples of nonnegative integers $(x_1,x_2,x_3)$ such that $x_1\leq 4$, $x_2\leq 5$, $x_3\leq 3$, and $x_1+x_2+x_3=5$. Stars and bars doesn't directly work because of the upper bounds, but it's similar. May 29, 2020 at 19:19
• Okay, I see. Can you guide me how you went from the x1+x2+x3 = 5, to the final solution? May 29, 2020 at 19:20
• The product is $(1+x+x^2+x^3+x^4)(1+x+x^2+x^3+x^4+x^5)(1+x+x^2+x^3)$. The way the terms combine counts the objects. May 29, 2020 at 19:52

Regardless of what Carlos buy, he will need to have a total of 5 CD's. Just to make it easy i'm going to denote a rap CD as $$r$$, a country CD as $$c$$, and a metal CD as $$m$$. One possible arrangement could that he buys 1 rap, 2 country, and 2 metal albums, we can represent this as:
$$r_1 + c_1 + c_2 +m_1 + m_2 = 5$$
Obviously every variable has a value of 1. So instead why don't we create some new variables that can represent the sum of for ever genre. Lets do $$R$$ for the total rap albums bought and then $$C$$ and $$M$$ for the other two. Now this gives us a new equation:
$$R+C+M = 5$$
But keep in mind that we have some restrictions on the amount of albums you can buy. By considering the bounds we get that $$R \leq 4$$, $$C \leq 5$$, and $$M \leq 3$$.