United States of Anagrams
with Raku

by Arne Sommer

United States of Anagrams

[200] Published 11. September 2022.

An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. For example, the word «anagram» itself can be rearranged into «nag a ram», also the word «binary» into «brainy» and the word «adobe» into «abode».

The original word or phrase is known as the subject of the anagram. Any word or phrase that exactly reproduces the letters in another order is an anagram.

We are going to use the 50 US states as examples (or subjects).

In Part 1: Permutations we will take a brute force approach, and see how far that will take us.

In Part 2: Canonical we will use a smarter approach, converting everything to a canonical form.

In Part 3: Multigrams we will look into multi word anagrams, or multigrams as I have chosen to call them, without actually generating them.

In Part 4: The Program we will present the full program used to generate the multigrams.

In Part 5: On My Wig we conclude this series with generated multigrams, based on the 50 US states.