[收藏夹]世界上最长的Word Palindrome

       英语中的回文,也就是Word Palindrome(或者叫Palindromic Sentence),是指正着写和倒着写字母组成完全一样的词语或者句子。比如:



                          He stolne lots,eh?


       2002年的时候,Peter Norvig读到了Don Hoey编写的用于产生回文句子的程序。这个1984年编写的程序可以生成一个包括540个单词的回文句子。由于对自己编程能力的自信,Peter Norvig觉得自己完全可以编写一个更好的程序来超越Don Hoey。他的第一次试验生成了包含15139个单词的回文。而最近,他又得到了一个由17259个单词组成的回文--也就是现在的世界纪录。

       由于两个人的算法都是基于下面那句经典的回文,所以最后得到的回文基本上没有什么可读性。不过Norvig使用的是Python来编程,并且有在自己的网站上公布整个开发的过程。我看了他的文章和那些天马行空的留言,对自己死去的创造力感到无限的哀伤。



               A man, a plan, a canal: Panama.


       相比之下,回文单词更有意思。世界上最长的回文单词出现在芬兰语中,共有两个冠军:“saippuakivikauppias”(卖皂石的人)和“solutomaattimittaamotulos”(测量单位测出的番茄重量)。而英语中有三个最长的回文单词:“tattarrattat”、 “kinnikinnik”或者是  “detartrated”,当然,我很怀疑这些东西能不能够称为英语单词。
  
       在国外,有大量的文字游戏爱好者都喜欢玩回文,他们甚至有自己的杂志。下面是诗人James的一首回文诗Dopplganer,本座觉得比电脑生成的世界记录要有意思多了。

—————————————————————————————
                                  Doppelganger

    Entering the lonely house with my wife
    I saw him for the first time
    Peering furtively from behind a bush —
    Blackness that moved,
    A shape amid the shadows,
    A momentary glimpse of gleaming eyes
    Revealed in the ragged moon.
    A closer look (he seemed to turn) might have
    Put him to flight forever —
    I dared not
    (For reasons that I failed to understand),
    Though I knew I should act at once.

    I puzzled over it, hiding alone,
    Watching the woman as she neared the gate.
    He came, and I saw him crouching
    Night after night.
    Night after night
    He came, and I saw him crouching,
    Watching the woman as she neared the gate.

    I puzzled over it, hiding alone —
    Though I knew I should act at once,
    For reasons that I failed to understand
    I dared not
    Put him to flight forever.

    A closer look (he seemed to turn) might have
    Revealed in the ragged moon.
    A momentary glimpse of gleaming eyes
    A shape amid the shadows,
    Blackness that moved.

    Peering furtively from behind a bush,
    I saw him for the first time,
    Entering the lonely house with my wife.

————————————————————————————

延伸阅读


        Peter Norvig的网页
        Palindrome百科全书
        Palindrome杂志
     
       


Lenciel,男的,活的。是一个高尚的,纯粹的,有道德的,坚决不脱离低级趣味的人。-查看简介
144 readers
subscribe via RSS
447 followers
follow on sina


About this entry