Function Repository Resource:

Anagrams

Source Notebook

Find all the anagrams of a word

Contributed by: Sander Huisman

ResourceFunction["Anagrams"][string]

finds all the anagrams of string.

Details and Options

An anagram of string is a word formed by rearranging the letters of string, using all the letters therein exactly once.
The cases of the letters in string are ignored.
string is removed from the list of anagrams returned by ResourceFunction["Anagrams"][string].

Examples

Basic Examples (2) 

Find an anagram of "feel":

In[1]:=
ResourceFunction["Anagrams"]["feel"]
Out[1]=

Some words have many anagrams:

In[2]:=
ResourceFunction["Anagrams"]["steal"]
Out[2]=

Properties and Relations (1) 

The anagrams returned by Anagrams all satisfy AnagramQ:

In[3]:=
test = ResourceFunction["Anagrams"]["rales"]
Out[3]=
In[4]:=
ResourceFunction["AnagramQ"] /@ test
Out[4]=

Publisher

SHuisman

Version History

  • 1.0.0 – 31 July 2019

Related Resources

License Information