Given 3 a's, 3 b's and 3 c 's, find the number of arrangements of these 9 characters with the condition that no two same characters should be beside each other. For example an invalid arrangement would be: aabcabcbc. A valid one would be abcabcabc.
-
What did you try? How are you approaching this problem? – RGS Nov 15 '16 at 13:05
-
I tried case by case analysis. However that was turning out to be too long. I have not been able to figure out an elegant way to do it;hence this question – erdoswiles Nov 15 '16 at 13:16
-
You could refer here for a general solution, or here for some other ideas. – Alex Riley Nov 15 '16 at 13:41
-
@erdoswiles: Happening to chance upon this question, I have posted an answer (only some 6 years late !) $;;$:) – true blue anil Dec 18 '22 at 15:35
2 Answers
Doing it without the use of advanced formulas, you can mark in the $10$ permutations starting with $A$, those where a $C$ must be put with a bullet, and those where it is optional with a dot
$.A\bullet A\bullet A\,.B\bullet B\bullet B\,.\;\;$ not feasible
$.A\bullet A.B.A.B\bullet B\,.\quad .A\bullet A\,.B\bullet B\,.A\,.B\,.$
$ .A\bullet A.B\bullet B\bullet B\,.A\,.\;\;.A\,.B\,.A\bullet A\,.B\,.B\,.$
$.A\,.B\,.A\,.B\,.A\,.B\,.\;\; .A\,.B\,.A\,.B\bullet B\,.A\,.$
$.A\,.B\bullet B\,.A\bullet A\,.B\,.\;\; .A\bullet A\,.B\bullet B\,.A\,.B\,.$
$ .A\bullet A\,.B\bullet B\bullet B\,.A.$
Thus we get $\binom51 +\binom51 + \binom40 +\binom62 + \binom73 +\binom62 +\binom51 +\binom51 +\binom40 = 87$
Thus by symmetry, # of arrangements = $2\times 87 =\boxed{174}$
- 48,250
I'n not quite sure if this is completely fool-proof, but I can arrange $a,b,c$ in $6$ ways.
I can add any new $a$ on $4-2$ positions, any new $b$ on $5-2$ positions and any new $c$ on $6-2$ positions, to have $6*2*3*4$ options for valid $aabbcc$ arrangements.
I can then add yet another $a,b,c$ at respectively $7-4, 8-4, 9-4$ positions. (Before and after the added letter is prohibited, and there are no duplicates in the prohibition.)
So in total $6*2*3*4*3*4*5$.
- 3,515
-
:Happening to chance upon this, I tried my hand and posted an answer. Unfortunately, your answer is incorrect. – true blue anil Dec 18 '22 at 19:49