How many different arrangements are possible such that there are no consecutive A’s, B’s or C’s

combinatoricspermutations

Suppose we have 7 different items:

(A1)(A2) (B1)(B2) (C1)(C2)(C3)

How many different arrangements are possible such that there are no consecutive A's, B's or C's?

e.g. (A1)(B1)(C3)(A2)(C2)(B2)(C1) is allowed but (A1)(A2)(B1)(C1)(B2)(C2)(C3) is not allowed.

My attempt so far:

I inserted gaps between the C's

_ C1 _ C2 _ C3 _

Then, I added the A's between the C's so they would always stay separate

_ C1 A1 C2 A2 C3 _

I added more gaps

_ C1 _ A1 _ C2 _ A2 _ C3 _

And filled them with potential B's. Thus ending up with

3! (for arranging the C's) $\times$ 2! (for arranging the A's) $\times$ 6P2 (for arranging the B's in the gaps)

The answer I get from this is 360 but I was told the correct answer is 4896. Any help would be most appreciated.

Best Answer

Starting by placing the C's is indeed a good strategy. But there are 10 positions to do so, not only 1 as you restrained yourself to.

  • In the case you consider, the four remaining letters stand alone, i.e. the four remaining gaps come in singletons:

.C.C.C.

Then there are $4!=24$ ways of placing the A's and B's.

  • In 6 cases, the resulting gaps for A's and B's are: two singletons and one pair:

..C.C.C

.C..C.C

C.C.C..

C.C..C.

C..C.C.

.C.C..C

Each time, you have $4*2*2=16$ ways of placing the A's and B's.

  • Then in two cases, you got one singleton and one triplet:

C...C.C

C.C...C

This time you got $8$ ways of disposing A's and B's (4 ways to pick the singleton, and then you can only swap the two extremities of the triplet).

  • Finally there is one case with two pairs:

C..C..C

Which gives you $16$ arrangements of A's and B's (4 ways to pick the letter in first position, 2 ways for the second position, 2 ways for the third).


You correctly calculated that there are $6$ ways of placing the C's in a given disposition.

Summing up you got

$6*(1*16+2*8+6*16+1*24)=6*152=912$ solutions.

Which is not the result you expected.