[Math] By permuting the letters of word “SUCCESS” the number of ways in which no 2 C’s and no 2 S’s are together are

combinatorics

By permuting the letters of word "SUCCESS" the number of ways in which
no 2 C's and no 2 S's are together are?

I am getting is as $$\frac{7!}{3!2!}-(5!-4!) $$ using inclusion exclusion.Am I correct?

Update:5! is number of ways in which two S's and 2 C's are together.However there has been over-counting of the case where three S's and 2 C's exist.So I subtracted 4!.Now total number of possibilities of permutation is $7!/(2!*3!)$.Now I subtracted the unfavorable cases to get the above answer.

Best Answer

With the inclusion-exclusion principle, I would like to compute the following:

(Total number of permutations) - (Number of permutations with $2$ $C$'s together) - (Number of permutations with $2$ $S$'s together) + (Number of permutations with $2$ $C$'s together and $2$ $S$'s together) + (Number of permutations with $3$ $S$'s together) - (Number of permutations with $2$ $C$'s together and $3$ $S$'s together).

Total number of permutations: $\frac{7!}{3!2!}$. There are $7!$ orderings, but we divide out by the repeated letters.

Number of permutations with $2$ $C$'s: $\frac{6!}{3!}$. There are $6!$ orderings when we treat $CC$ as a single character, but we divide out by the repeated $S$'s.

Number of permutations with $S$ $S$'s: $\frac{6!}{2!}$. Put $2$ of the $S$'s together and leave the third one out of the pair. Divide out by the repeated $C$'s.

Number of permutations with $2$ $C$'s and $2$ $S$'s: $5!$. Put the $2$ $C$'s and $2$ of the $S$'s as a single letter.

Number of permutations with $3$ $S$'s: $\frac{5!}{2!}$. Put all $3$ of the $S$'s together and divide out by the $C$'s.

Number of permutations with $2$ $C$'s and $3$ $S$'s: $4!$. Put the $2$ $C$'s and $3$ $S$'s as single letters.