# Number of arrangements of the letters of the word 'AAABBBCCDEFGHI' where 'A's must be separated and 'B's must be separated?

Find number of arrangements of the letters of the word 'AAABBBCCDEFGHI' where 'A's must be separated and 'B's must be separated?

My reasoning and perspective is given below

Arranging the remaining letters and filling the restricted letters in gaps is the standard way of doing these kind of problems. For example, if the question was "Find number of arrangements of the letters of the word 'AAABBBCCDEFGHI' where 'A's must be separated" then, $\dfrac{11!}{3!×2!} × \dbinom{12}{3}$ is the answer. But I cannot find a way for the specified problem.

Answer is $454204800$

See the output generated from http://www.careerbless.com/calculators/word/index.php

• case 1 alone is sufficient isn't it? why case 2 and case 3? – abm Dec 24 '16 at 18:21
• @abm because Case 1 alone would not account for valid arrangements where, for example, a B is placed between two As – David Quinn Dec 24 '16 at 18:30
• Thanks. Is there any shorter way available? – abm Dec 24 '16 at 18:56

First arrange $C,C,D,\cdots, I$, which can be done in $\displaystyle\frac{8!}{2!}$ ways.
1) If the B's are in different gaps, then there are 9 choices for the gap for BB, 8 choices for the gap for B, and $\hspace{.15 in}$then $\dbinom{11}{3}$ ways to select the gaps for the A's.
2) If the B's are in the same gap, then there are 9 choices for this gap and then $\dbinom{12}{3}-10$ ways to choose $\hspace{.15 in}$the gaps for the A's (since if there are A's in the gaps between the B's, so the B's are separated,
$\hspace{.15 in}$there are 10 choices for the gap for the remaining A).
This gives $\displaystyle\frac{11!}{3!2!}\binom{12}{3}-\frac{8!}{2!}\left[9\cdot8\cdot\binom{11}{3}+9\left(\binom{12}{3}-10\right)\right]=454,204,800$ arrangements.