StringTools[Anagrams] - search for anagrams
|
Calling Sequence
|
|
Anagrams( word, wordlist )
|
|
Parameters
|
|
word
|
-
|
Maple string; word to anagram
|
wordlist
|
-
|
sorted list of strings; list of words to search for anagrams
|
|
|
|
|
Description
|
|
•
|
An anagram of a word (string) is a permutation of word. The Anagrams(word, wordlist) command searches wordlist for anagrams of word. An expression sequence of the anagrams of word is returned. The order of the strings in the returned expression sequence is not defined. If no anagrams are found, then the NULL expression sequence is returned.
|
•
|
The list wordlist is required to be a (lexicographically) sorted list of strings. (The requirement that the list be sorted is not currently used or enforced, but may be in a future implementation.)
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
To generate all anagrams of a string, use Permute and combinat[permute].
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
|
|
Download Help Document
Was this information helpful?