As you observed, there are $10$ letters, of which $3$ are $A$s, $2$ are $M$s, $2$ are $T$s, $1$ is an $E$, $1$ is an $I$, and $1$ is a $K$.
If there were no restrictions, we would choose three of the ten positions for the $A$s, two of the remaining seven positions for the $M$s, two of the remaining five positions for the $T$s, and arrange the $E$, $I$, $K$ in the remaining three positions in
$$\binom{10}{3}\binom{7}{2}\binom{5}{2}3! = \frac{10!}{3!7!} \cdot \frac{7!}{2!5!} \cdot \frac{5!}{2!3!} \cdot 3! = \frac{10!}{3!2!2!}$$
in agreement with your answer.
From these, we must subtract those arrangements in which or more pairs of identical letters are adjacent.
Arrangements with a pair of adjacent identical letters: We have to consider cases, depending on whether the identical letters are $A$s, $M$s, or $T$s.
A pair of $A$s are adjacent: We have nine objects to arrange: $AA, A, M, M, T, T, E, I, K$. Choose two of the nine positions for the $M$s, two of the remaining seven positions for the $T$s, and then arrange the five distinct objects $AA$, $A$, $E$, $I$, $K$ in the remaining five positions, which can be done in
$$\binom{9}{2}\binom{7}{2}5!$$
ways.
A pair of $M$s are adjacent: We have nine objects to arrange: $A, A, A, MM, T, T, E, I, K$. Choose three of the nine positions for the $A$s, two of the remaining six positions for the $T$s, and arrange the four distinct objects $MM, E, I, K$ in the remaining four positions, which can be done in
$$\binom{9}{3}\binom{6}{2}4!$$
ways.
A pair of $T$s are adjacent: By symmetry, there are
$$\binom{9}{3}\binom{6}{2}4!$$
such arrangements.
Arrangements with two pairs of adjacent identical letters: This can occur in two ways. Either the pairs are disjoint or they overlap.
Two pairs of $A$s are adjacent: This can only occur if the three $A$s are consecutive. Thus, we have eight objects to arrange: $AAA, M, M, T, T, E, I, K$. Choose two of the eight positions for the $M$s, two of the remaining six positions for the $T$s, and arrange the four distinct objects $AAA, E, I, K$ in the remaining four positions, which can be done in
$$\binom{8}{2}\binom{6}{2}4!$$
ways.
A pair of $A$s are adjacent and a pair of $M$s are adjacent: We have eight objects to arrange: $AA, A, MM, T, T, E, I, K$. Choose two of the eight positions for the $T$s and arrange the six distinct objects $AA, A, MM, E, I, K$ in the remaining six positions in
$$\binom{8}{2}6!$$
ways.
A pair of $A$s are adjacent and a pair of $T$s are adjacent: By symmetry, there are
$$\binom{8}{2}6!$$
such arrangements.
A pair of $M$s are adjacent and a pair of $T$s are adjacent: We have eight objects to arrange: $A, A, A, MM, TT, E, I, K$. Choose three of the eight positions for the $A$s and then arrange the remaining five distinct objects $MM, TT, E, I, K$ in the remaining five positions in
$$\binom{8}{3}5!$$
ways.
Arrangements with three pairs of adjacent identical letters: We again consider cases.
Two pairs of $A$s are adjacent and a pair of $M$s are adjacent: We have seven objects to arrange, $AAA, MM, T, T, E, I, K$. Choose two of the seven positions for the $T$s and arrange the five distinct objects $AAA, MM, E, I, K$ in the remaining five positions in
$$\binom{7}{2}5!$$
ways.
Two pairs of $A$s are adjacent and a pair of $T$s are adjacent: By symmetry, there are
$$\binom{7}{2}5!$$
such arrangements.
A pair of $A$s are adjacent, a pair of $M$s are adjacent, and a pair of $T$s are adjacent: We have seven objects to arrange: $AA, A, MM, TT, E, I, K$. Since all the objects are distinct, there are
$$7!$$
such arrangements.
Arrangements containing four pairs of adjacent identical letters: We have six objects to arrange: $AAA, MM, TT, E, I, K$. Since all the objects are distinct, there are
$$6!$$
such arrangements.
By the Inclusion-Exclusion Principle, there are
$$\binom{10}{3}\binom{7}{2}\binom{5}{2}3! - \binom{9}{2}\binom{7}{2}5! - \binom{9}{3}\binom{6}{2}4! - \binom{9}{3}\binom{6}{2}4! + \binom{8}{2}\binom{6}{2}4! + \binom{8}{2}6! + \binom{8}{2}6! + \binom{8}{3}5! - \binom{7}{2}5! - \binom{7}{2}5! - 7! + 6!=47760$$
arrangements in which no two adjacent letters are identical.
We start with a simple question: what is the total number of permutations on $[k]=\{1,2,3,\dots, k\}$ such that $i$ is in position $i$ or $i+1$ for all $i<k$.
We have $k$ possibilities:
\begin{align*}
\begin{matrix}
1&2&3&\dots&k-2&k-1&k\\
1&2&3&\dots&k-2&k&k-1\\
1&2&3&\dots&k&k-2&k-1\\
1&2&3&\dots&k-3&k-2&k-1\\
&&&&\vdots\\
1&2&k&\dots&k-3&k-2&k-1\\
1&k&2&\dots&k-3&k-2&k-1\\
k&1&2&\dots&k-3&k-2&k-1\\
\end{matrix}
\end{align*}
A more general problem: What is the total number of permutations on $[k]=\{1,2,3,\dots,k\}$ such that $i$ is in position $p_i$ or $p_i+1$ for all $i<k$, where $p_i=p_j$ iff $i=j$.
This is identical to the previous question; there are $k$ possibilities, since we are, in essence, just changing the labeling of the numbers.
The general problem: Let $[n]=\{1,2,3,\dots,n\}$, and let $S\subseteq [n-1]$. What is the total number of permutations on $[n]$ such that for each $i\in S$, $i$ is in position $p_i$ or $p_i+1$, where $p_i=p_j$ iff $i=j$.
Let $\{s_1, s_2, \dots, s_k\}\subset S$, and without loss of generality, suppose $p_{s_i}<p_{s_j}$ for all $i<j$. We will call this subset maximal if it satisfies the following conditions:
- $p_{s_i}=p_{s_1}+i-1$
- If $s\in S\backslash \{s_1, s_2, \dots, s_k\}$, then $p_{s_1}\neq p_s+1$ and $p_s\neq p_{s_k}+1$
Since a maximal subset can be in $k$ of $k+1$ spots in a permutation of $[n]$, there are $k+1$ different possible ways for $\{s_1, s_2, \dots, s_k\}$ permute in $[n]$.
Therefore, we can partition $S$ into disjoint subsets: $S=S_1\cup S_2\cup\dots\cup S_r$, where each $S_i$ is maximal. So, the number of permutations on $[n]$ that satisfy our condition is
$$[(|S_1|+1)(|S_2|+1)\dots(|S_r|+1)]\cdot(n-|S|)!$$
The final factorial comes from the elements that were not in $S$ that are allowed to go anywhere.
Let's see this in action. For your second example, we have $n=4$, $S=\{1,2\}$, $p_1=1$ and $p_2=2$. Therefore, the only maximal subset of $S$ is $S$ itself. Hence, the number of permutations is
$$(|S|+1)\cdot(n-|S|)! = 3\cdot 2!=6.$$
As another example, suppose we were working with $\{1,2,3,4,5,6\}$, and we want
- $2$ to be in position $3$ or $4$,
- $4$ to be in position $4$ or $5$,
- $5$ to be in position $1$ or $2$.
We have $n=6$, $S=\{2,4,5\}$, $p_2=3$, $p_4=4$, and $p_5=1$. So the maximal subsets of $S$ are $S_1=\{2,4\}$ and $S_2=\{5\}$. Therefore, the number of permutations is
$$(|S_1|+1)(|S_2|+1)\cdot(n-|S|)! = 3\cdot2\cdot3!=36.$$
Best Answer
Your method is correct. However, you added wrong. If you add up the values of your expressions, you should obtain $420$. In particular, it looks like you omitted Subcase 1 of Case 3 from your total.
A simpler approach is to choose two of the eight positions for the bs and two of the remaining six positions for the ds. The remaining four positions must be filled from left to right with the two as followed by the two cs. Hence, the number of admissible arrangements is $$\binom{8}{2}\binom{6}{2} = 420$$