< Previous
Awesome Josh >

[Comments] (10) Anti-palindromes: What is the term for a sentence that reads as a completely different grammatical sentence if you reverse it? I've never heard of any such sentences, and I can't think of any, but they must exist. Seems like they'd be O(n2) times more difficult to construct than palindromes, because you have to combine the letters and then try to split them up again.


Comments:

Posted by Josh Myer at Thu Dec 22 2005 17:19

"Man bites dog//Dog bites man" is the first thing that immediately comes to mind.

The nature of syntax makes it tricky to do this in English: we have a definite preferred word order. So, any noun that requires determiners will spoil the reversal: you're stuck with single-word proper nouns.

Also, i've been meaning to email you: i assume you got the game design book? It looked like it got there, but i've been too helter-skelter-brained to send you an email (i just read the RSS feed =).

Posted by Leonard at Thu Dec 22 2005 17:44

I meant on the letter level, not the word level. You could split the bridge from TMBG's "I Palindrome I" into two separate utterances on the word level, and that would work.

Posted by Josh Barratt at Thu Dec 22 2005 17:59

There are a few single word unpalindromes. This will blast through /usr/dict/words....

#!/usr/bin/perl -w

use Tie::DictFile;

tie %dict, Tie::DictFile;

foreach my $word (keys %dict) {
my $rev = reverse($word);
if($rev eq $word) {
print "palindrome: $rev\n";
} elsif(defined($dict{$rev})) {
print "unpalindrome: $rev\n";
}
}


A sampling of results: (The ones consisting of just a few letters I more or less skimmed past.)

reneged, degener
stressed, desserts
reviled, deliver
nametag, gateman
stinker, reknits ('knits again.' It's in the dictionary.)
dioramas, samaroid (botany term: Resembling a samara, or winged seed vessel.)

So I'm not sure what to conclude. The relative scarcity of unpalindromes of any worth on the single-word level probably imply that sentence scale results are unlikely. Just a back-of-the-envelope conclusion though, feel free to prove me wrong in code.

Posted by Leonard at Thu Dec 22 2005 18:03

I'm not explaining this very well. Let me try to come up with some code of my own...

Posted by Josh Barratt at Thu Dec 22 2005 18:10

I think I did understand... you wanted to make a sentence that looked like

(assume these are real words)

abcd ef ghij

and have it reverse to something like

j ih gfedc ba

right?

I was just playing with single words since it's a much more manageable place to start, just to see what the problem space looked like. If you want to expand it to full sentences you'd need to not only check for each possible substring being a word, but also identify the part of speech and make sure that particular sequence of noun/verb/adverb/ajective/... constructed a sentence. Perhaps just 'a string of words' would be close enough, then humanly scan the list of generated words.... but how would you generate the list of source sentences? Hm. /me waits for code, perhaps I am confused.

Posted by Leonard at Thu Dec 22 2005 20:14

Yeah, you've got it. I'm working on some code that takes a starting word and tries to construct antipalindromic sentences one word at a time, adding whatever word will use up the leftover letters from the previous run. But I don't have any more time to work on it tonight.

Posted by anon at Thu Dec 22 2005 21:59

Some (not terribly good) examples here, some in German:
http://forum.leo.org/archiv/2004_02/08/20040208125011l_en.html

Example:
Draw no kayaks at summit!
Tim must ask a yak onward.

One contributor calls them "palindromes that are heterosemous". Catchy.

Posted by jaacob brnds at Fri Dec 23 2005 18:34

i think the term is "half a palindrome".

Posted by Factitious at Fri Dec 23 2005 19:45

You could get these by going through lists of regular palindromes and checking for ones with a word break in the middle. "Go hang a salami"/"I'm a lasagna hog," for example.

The problem is that not all of these result in two grammatical sentences, so you have to weed out things like "Rats live on" / "No evil star." Unless you're willing to count "No evil star" as a sentence.

Posted by Leonard at Fri Dec 23 2005 19:52

I like Jake's terminology though.


[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.