1

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.

2 Answers2

1

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}$

-1

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$.

Pieter21
  • 3,515