Counting Problem with Arrangement of Items

Consider each type of flavor as one unit. We do this because we are told cupcakes of the same flavor need to be next to each other. Thus there are 3 units. Ways to order three unique units is $3! = 6$.

Now consider the ways to order the different cupcakes of the same flavor within their respective "units". They are given to be UNIQUE, so the ways to order 6 vanilla is $6! = 720$, the number of ways to order 4 chocolate is $4! = 24$ and the number of ways to order 2 birthday cake flavors is $2!=2$.

Total ways is $6\cdot 720\cdot 24\cdot 2 = 207,360$.

Correct me if I am wrong.


Assuming that you are arranging them in a single row.

I thought that we could could use a permutation here so: $\tfrac{12!}{6!4!2!}$ Where the chocolate can be organized in varies ways, same with vanilla, and birthday cake.

No, that is the ways to arrange $12$ items when $6,4,$ and $2$ of them are in groups of indistinguishable items.   That is not what you are doing here.   The items within each category are still distinguishable.

Also, you want to count: distinct ways to arrange these cupcakes that all the cupcakes of the same flavor are right next to each other.

Thus, you want to count ways to arrange the $6$ vanilla cupcakes in a group, the $4$ chocolate cupcakes in another group, the $2$ birthday cupcakes into a third group, and then arrange these three groups into the row.


Now, count ways to arrange the cupcakes so one from the two birthday cupcakes are placed on each end, and none from the six vanilla cupcakes can be placed next to the birthday cupcakes. (So therefore.... what may?)

  • Arrange the two birthday cupcakes on the ends.
  • Select two from the chocolate cupcakes.
  • Arrange them in the two near-end positions.
  • Arrange the vanilla cupcakes and the remaining chocolate cupcakes in the remaining positions.