This permutation question appears harder than it seems.
I first to combine a set of "m" and "a" together. Then subtract all cases where "ma" and the other "ma", or "am" and the other "am" as they can switch places. Then subtract the "ama", "mam" cases.
Eventually, get lost in the numerous duplicate cases, can someone please help me with this.
Thanks in advance.
In the following, we try to solve the compliment problem by constructing all permutations of $\mathtt {management}$ with no adjacent pair of $\mathtt a$ and $\mathtt m$.
Distribute each of these gap-words on the $9$, $8$ or $7$ slots that remain from the ten characters of length in a permutation of $\mathtt{management}$ after accounting for letter-gap combinations (considering that a letter-gap combination is supposed to occupy two characters). There are
Reinterpret in each of these distributions the letter-gap combinations again as two characters. Then remove in each the gap symbols and put in the remaining letters on the slots that are still vacant. There are $180 = \frac {6!} {2!2!}$ permutations of the word $\mathtt {eegnnt}$, so there are $180$ ways to put in the remaining letters in order.
Now you should have counted the number of ways to rearrange the letters of $\mathtt {management}$ such that there is no adjacent pair of the letters $\mathtt a$ and $\mathtt m$. I hope I didn’t count any doubles by mistake.
My answer would then be that there are $$83 160 = (2·126 + 2·70 + 2·35)·180$$ ways to do this. That would be the complement of your problem. Since there are $226800 = \frac {10!} {2!2!2!2!}$ permutations of $\mathtt {management}$, you end up with $$143 640 = 226 800 - 83 160$$ ways to rearrange the letters of $\mathtt {management}$ with at least one adjacent pair of the letters $\mathtt a$ and $\mathtt m$.
Combinatorics isn’t my thing, though, so better check my answer twice for any mistakes.
Update. See? I told you combinatorics wasn’t my thing. Torsten has found that I did count a lot of stuff twice – many thanks! I have now fixed my solution. Since I get the same numbers as Torsten now, I feel quite confident that the solution now is correct.