From fp Wed Feb 4 23:54:00 1998 Message-ID: <19980204235400.53720@rose.fpp.tm.informatik.uni-frankfurt.de> Date: Wed, 4 Feb 1998 23:54:00 +0100 From: Frank Pilhofer To: *****tdv.com, ****tdv.com, **********tdv.com, **********starlightlines.com, **********starshiptitanic.com, *******tdv.com Subject: The Anti-Alphabetiser Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.85 Status: RO Content-Length: 3451 Lines: 74 Dear Folks, I have truly enjoyed reading the Starship Titanic novel on your Web pages. An exciting read, even better than the telephone dictionary which I'd finished just a few days earlier. Yet even you must admit that the telephone dictionary's cast was mind-boggling. Of course I was disappointed that you kept the book's ending for yourself, but I've thought up a pretty good ending myself: zeal zebra zenith zero zest zigzag zip zodiac zone zoo Actually, these are all of my German-English dictionary's entries for `z', but still they have a nice touch. I especially like the introduction of the zebra, even though its personality isn't really explored beyond its general zealousness. Or was this question to guess the conclusion just a cunning trick on your part? I haven't yet seen the novel in print, so who grants me that you don't simply steal my ending and use it in the book? Maybe I should actually buy one to check. Then again, why should I, after already reading it. Of course I've also reengineered the novel into its original form with the `Anti-Alphabetiser' program attached below. It's written in Tcl, not Perl, which makes it slightly less elegant and less incomprehensible. As is, the program reads (alphabetised) text with punctuations-in-place from the standard input and produces all possible permutations. It may look a little long, but the central function `antipipa_rek' is 15 lines short. Some of the rest is necessary to set everything up, and a large portion of the code simply computes the number of possible permutations. Note that the program optimizes by generating a list of unique words, and therefore does not produce identical permutations. To reverse-engineer the Starship Titanic novel, all you need is a little time. It contains 51673 words, of which 6566 are unique. This totals a mere 1.71696200256 * 10^146445 permutations. You might be interested in my Googolplex Web page, http://www.uni-frankfurt.de/~fp/Tools/Googool.html on which I present a program that prints a Googolplex, complete with proof that it is pointless to run the program now, because in two years there will be hardware that can run the program in half the time and would finish first. Of course, this theorem obviously doesn't apply here, as the number of possibilities is a lot smaller than a Googolplex. Still, I would recommend not feeding this problem to an Eddie shipboard computer while being shot at by Vogons, if only in consideration of the necessary amount of ticker-tape. Given more time I could have optimized the program to only consider proper english sentences, or I could have written a parallel program to spread the joy of jamming computers all over the world, but it seems silly optimizing a program that any serious computer would only smile about. I have also wrapped the Anti-Alphabetizer in a CGI script, which you can try at http://www.uni-frankfurt.de/~fp/titanic/ Perhaps we should make both programs talk to each other, eliminating the need for a user inbetween. Oh, and please forgive me mailing this to several of your email addresses (some of which are probably bogus), but you didn't mention where to send such efforts. Have fun, Frank -- + Frank Pilhofer fp*informatik.uni-frankfurt.de + | http://www.uni-frankfurt.de/~fp/ | +---- Life would be a very great deal less weird without you. - DA ----+