TITLE: How many permutations are there for the letters in the word "meеt"?
QUESTION [11 upvotes]: Which would be correct: $$P_4=4!=24 \quad \text{or} \quad \frac{4!}{1!2!1!}=12?$$
I don't know if Meеt and Meеt with exchanging the two $e$'s are different or not?
If the answer is the latter, why would it be different from the permutations of the word Meat with an $a$, which should be $24$ permutations I believe?
Thanks.

REPLY [3 votes]: Let's ask Python and itertools.permutation!
If 'e's are identical, you get a collection of $\frac{4!}{1!2!1!}$ unique strings:
>>> from itertools import permutations
>>> sorted(set(''.join(chars) for chars in permutations('meet')))
['eemt', 'eetm', 'emet', 'emte', 'etem', 'etme', 'meet', 'mete', 'mtee', 'teem', 'teme', 'tmee']
>>> len(set(''.join(chars) for chars in permutations('meet')))
12

If 'e's are distinguishable, e.g. with a stroke on one 'e', the set has $4!$ elements:
>>> sorted(set(''.join(chars) for chars in permutations('meɇt')))
['emtɇ', 'emɇt', 'etmɇ', 'etɇm', 'eɇmt', 'eɇtm', 'metɇ', 'meɇt', 'mteɇ', 'mtɇe', 'mɇet', 'mɇte', 'temɇ', 'teɇm', 'tmeɇ', 'tmɇe', 'tɇem', 'tɇme', 'ɇemt', 'ɇetm', 'ɇmet', 'ɇmte', 'ɇtem', 'ɇtme']
>>> len(set(''.join(chars) for chars in permutations('meɇt')))
24

Instead of generating every permutation and filtering the duplicates, it's also possible to generate the list directly without any duplicate. Here's an example.
It generates $\frac{10!}{9!}$ ($=10$) strings without having to generate $10!$ strings and removing $10*(9!-1)$ duplicates:
>>> [''.join(chars) for chars in perm_unique('aaaaaaaaab')]
['baaaaaaaaa', 'abaaaaaaaa', 'aabaaaaaaa', 'aaabaaaaaa', 'aaaabaaaaa', 'aaaaabaaaa', 'aaaaaabaaa', 'aaaaaaabaa', 'aaaaaaaaba', 'aaaaaaaaab']
>>> len(list(permutations('aaaaaaaaab')))
3628800