The word 'KBCKBCKBC' is to be arranged in a row such that no word contains the pattern of KBC.
$Attempt$
Event $A$=1st KBC is in the pattern, $B$=2nd KBC is in the pattern and similar is the event C.
Now required is $n((notA) (notB) (notC)) =Total ways - [\sum n(A) - \sum n(AB)+ \sum n(ABC)] $
Total ways = $\frac{9!}{3!3!3!}$
$\sum n(AB) = \frac{5!}{2!}$
$\sum n(ABC) = 1$
But, my main doubt is that I am not able calculate $\sum n(A)$.
Any suggestion? Also please suggest about different method you know.
Thanks for the help.
Comment:
We consider words of length $9$ built from three groups $BBB,CCC,KKK$, resulting in $\frac{9!}{3!3!3!}$.
We subtract all words which have at least one occurrence of $BCK$. We think of $BCK$ as a new character $X$. We consider words of length $7$ built from $4$ groups $BB,CC,KK,X$, resulting in $\frac{7!}{2!2!2!1!}$.
We have subtracted strings with occurrences of two times $BCK$ more than once. As compensation we add all words which contain at least two times $BCK$. We think of $BCK$ as a new character $X$. We consider words of length $5$ built from $4$ groups $B,C,K,XX$, resulting in $\frac{5!}{1!1!1!2!}$.
We have added strings with occurrences of three times $BCK$ more than once. As compensation we subtract all words which contain at least three times $BCK$. We consider words of length $3$ built from $1$ group $XXX$, resulting in $\frac{3!}{3!}$.