# In how many ways can letters in mathematics be ordered with restrictions?

I've been stuck on these for a while. Please guide me through all the steps because I actually want to understand this. I've got an exam coming up.

Consider the letters in the word "MATHEMATICS". In how many ways can these 11 letters be ordered so that:
(i) The two M's are next to each other.
(ii) The two M's are next to each other but the two A's are not.

-

(a) Treat the two $M$'s as a single unit. So we have now 10 letters. We permute these in $\frac{10!}{2! * 2!}$ ways. Since the $M$'s are identical, we don't have to permute the order in which the two $M$'s appear.
(b) This is an inclusion exclusion problem. You have from (a) the number of ways for the two $M$'s to appear together. Now group the two $A$'s together. So there are $9!$ ways of arranging the letters so that both $M$'s and both $A$'s are together. So subtract that out from your original answer: $\frac{10!}{2! * 2!} - \frac{9!}{2!}$.
I've updated my answer. Thanks for the catch! I forgot to think about multiple appearances of the same character. The two $2!$ terms in the denominator of (a) handle symmetry cases for the two $T$ and $A$ characters. The two $A$'s are glued together in (b), so we only are concerned with the $T$'s. Hence, a single $2!$ in the denominator. Sorry for the confusion. –  ml0105 Apr 20 at 4:44
So we have two $A$ and two $T$ characters. Label them $A_{1}, A_{2}, T_{1}, T_{2}$. We divide out by $2!$ when permuting $A_{1}, A_{2}$, as permutations of the $A$ characters simply create symmetry cases. So we divide out the symmetry cases. The same applies with the $T$ characters. This is a multinomial permutation. –  ml0105 Apr 20 at 4:47