29 ms·
I wrote a multi-threaded anagram engine some years ago in Rust. It uses dynamic programming to linearize the problem as much as possible. The word list I typica
by DFHippie 4y ago
I wrote a multi-threaded anagram engine some years ago in Rust. It uses dynamic programming to linearize the problem as much as possible. The word list I typically use it with is not comprehensive by any means. I've taken words out, for instance, that would upset people to see in anagrams of their names (not fart, say, but you can imagine the sort of thing). Even with a simple set of word counts the number of anagrams, excluding permutations, of even simple things is vast. I get 6 from my handle here, which itself isn't very promising. A challenging short name like "Elon Musk" (it has a "k"), gives 36 (examples, "sulk omen" and "elk muons"). Things blow up quickly. My own name, including the middle name, has 23 characters, none of them difficult. The program finds 37,277,770, again, not including permutations. So with your character counts I think you're looking at a pretty big number. And you can blow it up further with a bigger, less polite word list.
- 867-5309 4y ago>I've taken words out, for instance, that would upset people to see in anagrams of their names appreciate this. sincerely, Lana Ginger Shoales-Watts