World's Longest Palindrome? 21,012 words

See also: comments, program

Luckily for me, I had a better word list: the very nice Moby Word list from Grady Ward , from which I was able to extract the 126,342-word npdict.txt. Also, very importantly, I had a laptop computer which was at least 1,000 times more powerful than the minicomputer Hoey had in 1984, allowing me to do all computation in memory, rather than having to manage disk data files. That made it easy for me to create a program that appears smarter, even though Hoey's program was probably more difficult to author.

Version 1: 15,139 Word Palindrome

Created: 20-02-2002 Words: 15,319 Letters: 63,647 Phrases: 12,400 Program: pal.py Palindrome: A man, a plan, a caddy, Ore, Lee, tsuba, Thaine, a lair, ... (more) ..., Aeniah, Tabu, Steele, Roydd, a canal, Panama. Storyboard: ... A man, a plan, a caddy,

Commentary: Cognoscenti such as Mark Saltveit, editor of The Palindromist, rightfully point out that my creation should not be called a true palindrome, because it makes no sense. But Saltveit says that I am probably safe in calling this "the world's longest palindromic sentence, or the world's longest parody of `A man, a plan.' " I agree with that assessment.

Maybe I'm biased, but I think the sentence starts out quite strong. "A man, a plan, a caddy" is the basic premise of a classic piece of storytelling. Unfortunately, things go downhill from there rather quickly. It contains truths, but it does not have a plot. It has Putnam, but no logic; Tesla, but no electricity; Pareto, but no optimality; Ebert, but no thumbs up. It has an ensemble cast including Tim Allen, Ed Harris and Al Pacino, but they lack character development. It has Sinatra and Pink, but it doesn't sing. It has Monet and Goya, but no artistry. It has Slovak, Inuit, Creek, and Italian, but it's all Greek to me. It has exotic locations like Bali, Maui, Uranus, and Canada, but it jumps around needlessly. It has Occam, but it is the antithesis of his maxim "Entia non sunt multiplicanda praeter necessitatem." If you tried to read the whole thing, you'd get to "a yawn" and stop. Or you might be overcome by the jargon, such as PETN, ILGWU, PROM, UNESCO, and MYOB. Most serendipitous of all is that Steele, who collected several shorter versions of the Panama oeuvre in a book about a Lisp, shows up in the very last line. Steele and some others have some comments. You can read the results from top to bottom (if you don't get bored) or you can start in the middle; the letter "y" in "Moray".

Speed: The program increases the length of the longest palindrome found by roughly 200 words every second; so in 3 or 4 seconds it breaks Hoey's record, and in 30 seconds it is over 6000 words. At around 8000 words progress slows to about 1,000 words per minute, and by around 10,000 to 12,000 words progress is sporadic. This is because we are running out of good words: there are 126,000 words in the dictionary, but only about 10% of them are easily reversible. For example, there are 426 words that contain "eq" or "sq", but these are hard to use in a palindrome because there are no words containing "qe" or "qs", and only a few words that end in "q" (and could then be followed by a word starting with "e" or "s".

Goals: This almost doubles Hales' letter count, and quadruples Hoey's aspiration for word count.

Version 2: 17,826 Word Palindrome

Created: 7:00-2-11-2007 Words: 17,826 Letters: 74,663 Phrases: 14,382 Program: pal2.py Palindrome: A man, a plan, a cameo, Zena, Bird, Mocha, ... (more) ..., Comdr, Ibanez, OEM, a canal, Panama! Storyboard: ... A man, a plan, a cameo, Zena,

Commentary: After a reader sent in a suggestion, I made 4 changes to the program: