How many anagrams are there for the word “MERCABLE” with given conditions

combinatorics

I couldn't figure out an answer. Got several different answers, actually. Could someone try it? Here it goes.

How many anagrams are there for the word "MERCABLE" with "M" as the first letter, or "E" as the second letter or "R" as the third letter? Consider that the first letter is the one far to the left; for example, in "ABCD", the first letter would be "A", second would be "B", etc. Also, consider that the logical connective "or" is non-exclusive.

Best Answer

By PIE (principal of inclusion and exclusion), we first count the number of ways such that $n(M) + n(E) + n(R)$. This is equivalent to $\frac{7!}{2} + 7! + \frac{7!}{2} = 2 \cdot 7! = 10080$ (since in the first and third cases, we have two $E$'s, so we divide by $2$.

Now, we subtract $n(M \cap E) + n(M \cap R) + n(E \cap R)$, which is $6! + \frac{6!}{2} + 6! = 1800$. Finally we add back $n(M \cap E \cap R) = 5! = 120$, so the answer should be $10080 - 1800 + 120 = \boxed{9120}$