Re: Social Security/CommerceNet/PitneyBowes try digital ...

I'm not a real doofus, but I play one at a national laboratory. (
Fri, 17 Jan 1997 11:58:15 -0600

Of course, the size of this stuff can become oppressive. Fortunately, I have
96 MB in my workstation, so it handles it w/o much complaint. Here's a little
treatise I sent to a hapless Oxonian I picked on a few months back...


> And I'm astounded that you managed over 700 of the things!

Of course, the quantity isn't the problem. It's the quality. The number of
unique permutations of a given string of n characters is:

product ((m sub i)!)

where (m sub i) is the number of times the ith unique character occurs in the

If each character is unique, each of the (m sub i) items is 1, and hence their
product is one, leaving n! as the number of permutations.

So for "Matthew 'Colin' Page", ignoring the spaces and punctuation marks, we
have 16!/8, which is 2,615,348,736,000 permutations. (And that doesn't even
take into account the additional factor for potential placement of spaces,
another factor of 2**(n-1) or 32,768.) So, 700 anagrams hasn't even reached
the 1 part per billion (or, I suppose you would say milliard?) level. But
then, you probably already knew all that.

Leaving the realm of such abtract quantities, and dealing only with real words,
the string subsumes 2236 entries in my dictionary, a considerably friendlier
number. Alas, even that number gets uglier soon, and I have to limit my
anagram generator to looking for combinations of no more than 3 words (or, to
be more correct, dictionary entries, since mine includes a number of phrases
not found in ordinary dictionaries, like "Green Eggs And SPAM", to mention but
a single example). Unfettered it would probably find a million or so unique
anagrams. The vast majority are meaningless. A minute fraction is actually


Then, there was this addendum the next day.

> Unfettered it would probably find a million or so unique anagrams.

For the fun of it, I let the anagram generator run yesterday, and on into last
night. It found 88,020,723. With these sorts of numbers, dealing with a mere
16 letters, one gains some appreciation for the complexity of DNA.