3 ms·
Inverse pangram challenge? This string is a frequency map of English letter usage in words (relative to the least common, q = 1). How many different sentences
by photochemsyn 4y ago
Inverse pangram challenge? This string is a frequency map of English letter usage in words (relative to the least common, q = 1). How many different sentences can be constructed from it, using all letters once (using say, the scrabble dictionary as the list of acceptable words)?
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbccccccccccccccccccccccccddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffggggggggggggghhhhhhhhhhhhhhhhiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijkkkkkkllllllllllllllllllllllllllllmmmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnooooooooooooooooooooooooooooooooooooopppppppppppppppppqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrssssssssssssssssssssssssssssssttttttttttttttttttttttttttttttttttttuuuuuuuuuuuuuuuuuuuvvvvvvwwwwwwwxxyyyyyyyyyyzz'
I have a feeling this blows up pretty fast, computationally.
- tgv 4y ago> I have a feeling this blows up pretty fast, computationally. Of course it does, but there's no way to compute the number without checking all combinations. There are hundreds of thousands of English words, and about the only initial filtering you can do is remove words with more than one q. Each partition will contain at least 20 words, so have >20! permutations.
- thih9 4y agoDefine sentence. Does it need to have meaning? Do sentences have to follow each other (or can they be unrelated)?
- DFHippie 4y agoI 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