# In how many different ways can the flags be arranged in a line?

One red flag, three white flags and two blue flags are arranged in a line such that:

$a.)$ No two adjacent flags are of the same color

$b.)$ The flags at the two ends of the line are of different colors In how many different ways can the flags be arranged?

$\color{green}{a.)\ 6 }\\ b.)\ 4 \\ c.)\ 10 \\ d.)\ 2$

I did

Total ways$-$when same flags are considered as one $-$flags at the two ends of the line are of different colours[w-w,b-b]

$=\left(\dfrac{6!}{3!\times 2!}\right)-(3!)-(2)=52$

which is not in options.

I look for a short and simple way.

I have studied maths upto $12$th grade.

Hint:

If you do not start or end the line with a white flag then it is unavoidable that $2$ white flags will be adjacent.

• I dont get ur hint, can u tell the fault in my method.
– R K
Sep 8, 2015 at 11:13
• To start, how many ways can you position the white flags? Sep 8, 2015 at 11:15
• Do u mean this set up $\text{W_W_W_ }$
– R K
Sep 8, 2015 at 11:19
• Yes, or $.W.W.W$ of course. Sep 8, 2015 at 11:22
• You are almost ready. How many ways are there to place $R$, $B$ and $B$ in $W.W.W.$? Sep 8, 2015 at 11:25

The problem becomes much simpler if you consider it cyclically. After you close the line into a circle, condition b) is just a special case of condition a). It's then evident that the three white flags have to alternate with the other three, and there is only one way up to rotations to arrange the flags. The answer $6$ then arises as the number of rotations, or, equivalently, the number of spots on the circle you can choose to split the circle into a line.

You can arrange it like $$W @ W @ W @ OR @ W @ W @ W$$ Where $$W = \text{White Flag}\\ @ = \color{blue}{\text{Blue}}/\color{red}{\text{Red}} \text{ flag}$$ White flags are more and $\color{red}{\text{red}}$ are $2$ and $1$. With this order, no two flags of same color will be adjacent.

Now, for $$W @ W @ W @$$ $W$'s can be arranged in only one order but $\color{red}{\text{red}}$ and \color{blue}{\text{blue}} can be arranged in $$\frac{3!}{2!} = 3$$ ways. Dividing $2!$ because it includes $2$ \color{blue}{\text{blues}} of same color.

Same for $$@ W @ W @ W$$

Hence, answer is $3 + 3 = 6$.