INFO

An anagram is a rearrangement of a multiset of characters.
When characters repeat, we divide by the factorial of their frequencies to avoid overcounting identical arrangements.


General Formula

If a word has total letters, and some letters repeat with frequencies , then the number of distinct anagrams is:


Examples

1. Letters {E, E, T, S}

  • Total permutations of labeled characters:
  • Repetition of E counted times

2. Letters {O, O, F, F, N}

  • Total permutations:
  • Two letters (O and F) each repeated twice

3. Word: REASSESS

  • Letters: R, E, A, S, S, E, S, S
  • Frequencies: R (1), E (2), A (1), S (4)

NOTE

This is a classic use of the QuotientRule.