[Math] In how many distinguishable ways can the letters $A$ $A$ $B$ $B$ $C$ $C$ be arranged up to rotation

combinatoricspermutations

How many times I can arrange letters: A A B B C C ?

I need to solve two problems and one I already solved.

First: first A and second A are the same letters (repeated items in permutations). So I just have
$$\frac{6!}{2! \cdot 2! \cdot 2!}$$
$2!$ is for each letter. It reduces permutations from $720$ to $90$. That's good.

Second unsolved: I want to also exclude circular sequences. By circular I mean A A B B C C is the same as A B B C C A (also B B C C A A, B C C A A B and so on…) – imagine those letters are around circle, we just changed letter that we started to read from, but it is still same sequence.

I will attach pictures later if description is not sufficient.

The truth is I don't really need a count but a list of all those sequences – but it can be ignored, for now I want to solve second problem. It should be around $16$ of them. I could just write it by hand (I have ready list) but I wanted to use an algorithm – I do it just for fun and to learn something new.

Best Answer

Your answers for both the number of linear arrangements and circular arrangements are correct.

A naive approach is to divide your answer by the six possible places in a given circular arrangement which we could take as a starting point for a linear arrangement, which suggests the answer could be $$\frac{1}{6} \cdot \frac{6!}{2!2!2!} = 15$$ However, we have to beware of symmetries.

Notice that the two As must either be adjacent, separated by one other letter, or separated by two other letters.

If the two As are adjacent, there are four positions to fill as we proceed clockwise around the circle from the As. We can fill two of these four positions with Bs in $\binom{4}{2} = 6$ ways.

If the two As are separated by one letter, it must either be a B or a C. Once that choice is made, there are three places where the other copy of that letter could be placed. Hence, there are $3 \cdot 2 = 6$ such arrangements.

If the two As are separated by two letters (are opposite to each other), there are two possibilities. Either there are two Bs on one side and two Cs on the other or there is a B and a C on each side. There is only one way to put two Bs on one side and two Cs on the other (up to rotation). However, there are three ways to have a B and a C on each side: as we proceed clockwise from the As, we could encounter B and C in that order on both sides, C and B in that order on both sides, or B and C in that order on one side and C and B in that order on the opposite side.

Adding up, we get $6 + 6 + 1 + 3 = 16$ distinguishable arrangements of the letters A, A, B, B, C, C up to rotation.

Related Question