# How many different combinations can be arranged if no $2$ red candies can be next to each other?

A candy shop has $$4$$ different blue candies, $$7$$ different green candies, and 3 different red candies. How many different combinations can be arranged if no $$2$$ red candies can be next to each other?

My solution: There's $$3$$ choose $$2 = 3$$ ways to pick $$2$$ red candies, and $$14!$$ ways to arrange all the candies in total. To subtract all of the cases where $$2$$ red candies are next to each other, I did $$14!-3 \cdot 13!$$ and I got a huge number. Can someone help me figure out how to do this problem?

• First arrange candies of blue and green colors. Then place red candies in spaces between. Jun 15, 2021 at 17:44
• So would it be $11! - 3 \cdot 10!$? Jun 15, 2021 at 17:49

The answer is definitely going to be a huge number, but not necessarily that one.

Here's a nice trick that helps solve problems where you need to keep things separated. We can arrange all of the blue and green candies in 11! ways. Now, think about the twelve possible spaces between those candies and on the ends of the line. For each of the three red candies, we need to pick one of those spaces to place it in, and we can't choose the same space for two different red candies because then they would be adjacent to each other.

That gives us a total of $$12\cdot11\cdot10\cdot11!=5,269,0176,000$$.

Lets use your method for seeing where you missed.

We know that there are $$14!$$ ways to arrange all of these balls. However ,we do not want red balls consecutive ,i.e, no two balls adjacent nor three balls.

Hence , we should find the number of exactly two red balls adjacent and three balls are adjacent.

EXACTLY TWO BALLS ADJACENT : Lets assume that we called red balls as $$x_1 , x_2 ,x_3$$. Moreover ,we select $$x_1$$ and $$x_2$$ are adjacent. Then how many arrangements are there when they are adjacet ?

The answer is $$2! \times 13!$$ . However , these arrangements contain the events where $$x_3$$ is either on the right of the pair of $$x_1,x_2$$ or on the left of $$x_1 ,x_2.$$ Because of the fact that we want to find the number of $$\color{red}{exactly}$$ two red ball adjacent , we should subtract the number of arrangements where $$x_3$$ is adjacent to the pair of $$x_1, x_2$$.

We can do it by $$(2! \times 13! - (2! \times 2! \times 12!)$$. However, the pair could have been $$x_1 ,x_3$$ , because there are $$C(3,2)$$ different pairs that can be chosen adjacent , so we must multiply our solution by $$C(3,2)$$.

$$\therefore C(3,2) \times[(2! \times 13!)-(2! \times2! \times 12!)]= 66 \times 12!$$ is the nuber of arragement where there are exactly two pairs are adjacent.

EXACTLY THREE RED BALLS ADJACENT = As you think , if three red balls are adjacent ,the the number of possible arrangements are $$3! \times 12!$$

Result = $$14! - [66 \times 12! + 6 \times 12!]= 14\times 13 \times 12! -72 \times 12! = 110 \times 12 ! =52,690,176,000$$