OddThinking

A blog for odd things and odd thoughts.

Most Anagrammatical Words

“But, Julian,” I hear you ask, “What words in the English language have the most anagrams?”

Well, based on a English dictionary I found on my computer, there are two sets: TEARS and PEARS.

Here they are, for each word-length:

Len Count Anagrams
3 5 ETA, TAE, ATE, EAT, TEA
4 9 TAES, SETA, ETAS, TEAS, EATS, SEAT, SATE, ATES, EAST
5 13 EARST, REAST, STEAR, STARE, TARES, RESAT, ASTER, TASER, TERAS, TEARS, ARETS, RATES, STRAE
PARES, SPEAR, PRESA, PEARS, PARSE, RAPES, PRASE, SPARE, SPAER, ASPER, APERS, APRES, REAPS
6 12 ARTELS, TARSEL, STALER, ALERTS, ESTRAL, SALTER, TALERS, STELAR, SLATER, LASTER, ALTERS, RATELS
7 11 GAINEST, SEATING, TSIGANE, TEASING, TAGINES, INGATES, TANGIES, EATINGS, EASTING, GENISTA, INGESTA
RETSINA, RETAINS, STARNIE, NASTIER, STEARIN, RETINAS, RESIANT, ANESTRI, RATINES, STAINER, ANTSIER
8 11 GRANITES, TASERING, GANISTER, ASTRINGE, ANGRIEST, INGRATES, GANTRIES, ANGSTIER, REASTING, STEARING, RANGIEST
9 6 ITERANCES, CENTIARES, CISTERNAE, NECTARIES, CREATINES, ENCRATIES
10 5 RECAUTIONS, CAUTIONERS, NOCTUARIES, COINTREAUS, RECUSATION
POTTINGERS, POTTERINGS, REPOTTINGS, RESPOTTING, PROTESTING
11 6 MISCREATION, REACTIONISM, ANISOMETRIC, ROMANICITES, CREATIONISM, ROMANTICISE
12 4 REACTIONISMS, CREATIONISMS, MISCREATIONS, ROMANTICISES
NEPHROLOGIES, PIGEONHOLERS, PHRENOLOGISE, PHRENOLOGIES
13 3 ELECTRISATION, ACETONITRILES, INTERSOCIETAL
ACCOUTREMENTS, ACCOUTERMENTS, ACCOUSTREMENT
14 3 INDISCRETENESS, INDIRECTNESSES, INDISCREETNESS
15 4 PHONOGRAMICALLY, GRAMOPHONICALLY, MONOGRAPHICALLY, NOMOGRAPHICALLY

I hope that answers your question satisfactorily. You’re welcome.


Comments

  1. You only answered some of my questions. How did you come up with the list? A web page somewhere? Or did you write some code to process your dictionary? If so, let’s see it.

  2. I wrote some Python code. I didn’t think it was particularly exciting, but here it is:

    
        longest_word_length = 20
        dict_path = r"wordlist.txt"
    
        anagram_map = dict(
            # Map from
            #     Word length
            #         -> sorted list of letters
            #              -> set of words with those letters
            [(length, dict()) for length in range(longest_word_length + 1)]
            )
        
        for line in file(dict_path, "r"):
            # Extract file word on line, letters only.
            first_word_extended = line.split(" ")[0]
            first_word_list = [
                letter
                for letter in first_word_extended
                if letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                ]
            first_word = ''.join(first_word_list)
            
            first_word_sorted_list = sorted(first_word_list)
            first_word_sorted = ''.join(first_word_sorted_list)
            first_word_length = len(first_word_sorted_list)
            
            if first_word_sorted not in anagram_map[first_word_length]:
                anagram_map[first_word_length][first_word_sorted] = set()
            anagram_map[first_word_length][first_word_sorted].add(first_word)
            
        # Words of length 1 and 2 can't have an interesting number of anagrams.
        for word_length in xrange(3, longest_word_length + 1):
            
            if anagram_map[word_length]:
                max_number_of_anagrams = max(
                    [len(anagram_map[word_length][key])
                        for key in anagram_map[word_length]
                    ])
                print (
                    "There are at most %s anagrams for any word of length %s."
                    % (max_number_of_anagrams, word_length)
                    )
                if max_number_of_anagrams > 1:
                    for key in anagram_map[word_length]:
                        if (
                            len(anagram_map[word_length][key])
                                == max_number_of_anagrams
                           ):
                            print "* " + (', '.join(anagram_map[word_length][key]))
    
    
    
  3. The table would also be more useful if it included the count of anagrams for each of the words.

  4. Aristotle, finally done.

  5. 🙂

    Nice.

Leave a comment

You must be logged in to post a comment.