Palindrome

A palindrome is a word, phrase, number, or other sequence of units that can be read the same way in either direction, with general allowances for adjustments to punctuation and word dividers.

Composing literature in palindromes is an example of constrained writing. The word "palindrome" was coined from Greek roots palin (πάλιν; "again") and dromos (δρóμος; "way, direction") by English writer Ben Jonson in the 17th century. The actual Greek phrase to describe the phenomenon is karkinikê epigrafê (καρκινικὴ επιγραφή; crab inscription), or simply karkinoi (καρκίνοι; crabs), alluding to the backward movement of crabs, like an inscription that can be read backwards.

History
Palindromes date back at least to 79 AD, as the palindromic Latin word square "Sator Arepo Tenet Opera Rotas" (The sower, Arepo, holds works wheels) was found as a graffito at Herculaneum, buried by ash in that year. This palindrome is remarkable for the fact that it also reproduces itself if one forms a word from the first letters, then the second letters and so forth. Hence, it can be arranged into a word square that reads in four different ways: horizontally or vertically from either top left to bottom right or bottom right to top left.

A palindrome with the same property is the Hebrew palindrome "We explained the glutton who is in the honey was burned and incinerated" (PRShNW R`BTN ShBDBSh NTB`R WNShRP or parasnu ra`abhtan shebad'vash nitba'er venisraf) by Abraham ibn Ezra, referring to the halachic question as to whether a fly landing in honey makes the honey treif (not kosher).

 פ ר ש נ ו ר ע ב ת ן ש ב ד ב ש נ ת ב ע ר ו נ ש ר ף

Another Latin palindrome, In girum imus nocte et consumimur igni ("We go wandering at night and are consumed by fire"—In girum ire is translated as "go wandering" instead of the literal "go in a circle", cf. Italian andare in giro, "go strolling or wandering around"), was said to describe the behavior of moths. It is likely from medieval rather than ancient times.

Byzantine Greeks often inscribed the palindrome "Wash [the] sins not only [the] face" ΝΙΨΟΝ ΑΝΟΜΗΜΑΤΑ ΜΗ ΜΟΝΑΝ ΟΨΙΝ (Nīpson anomēmata mē mōnan ōpsin, note ps is the single Greek letter Ψ, psi) on baptismal fonts. This practice was continued in many English churches. Examples include the font at St. Mary's Church, Nottingham and also the font in the basilica of St. Sophia, Constantinople, the font of St. Stephen d'Egres, Paris; at St. Menin's Abbey, Orléans; at Dulwich College; and at the following churches: Worlingworth (Suffolk), Harlow (Essex), Knapton (Norfolk), St Martin, Ludgate (London), and Hadleigh (Suffolk).

Palindromes in ancient Sanskrit
Palindromes of considerable complexity were experimented with in Sanskrit poetry. Complex palindromes appear in the 19th canto of the 8th-century epic poem śiśupāla-vadha by Magha. It yields the same text if read forwards, backwards, down, or up:

(Note: hyphen indicates continuation of same word.) The last four lines are an inversion of the first four and are not part of the verse. They are included here only so that its properties can be more easily discerned, as the up-and-down reading depends on re-reading the text back up again in each column.

The stanza translates as:
 * [That army], which relished battle (rasāhavā), contained allies who brought low the bodes and gaits of their various striving enemies (sakāranānārakāsakāyasādadasāyakā), and in it the cries of the best of mounts contended with musical instruments (vāhasāranādavādadavādanā).

The same work (Śiśupāla-vadha) also contains stanzas in which each line is a palindrome, and stanzas that can be read backwards to give a new stanza (semordnilaps). Such stanzas are also found in the earlier work Kirātārjunīya.

This sanskrit poem was written by "nandi-ghanta kavis" in kanda style.

सारस नयना घन   जघ

नारचित रतार कलिक हर सार रसा

सार रसारह कलिकर

तारत चिरनाघ जनघ नायनसरसा !

Palindromes in Tamil poetry
Palindromes are referred to in Tamil as Maalai Maatru (மாலை மாற்று). The earliest known palindromic verses (11 couplets) occur in the devotional poetry of Shaivism saint Sambandhar who lived around the 7th Century C.E.

The first of these eleven verses runs thus -

யாமாமாநீ யாமாமா யாழீகாமா காணாகா

காணாகாமா காழீயா மாமாயாநீ மாமாயா

It refers to Shiva as the incomparable God, the one who plays the Veena, the beautiful one adorned with snakes, the one who destroyed Kama, whose abode is Sirkazhi, who also appears as Vishnu, and beseeches him (Shiva) to rid the devotee of impurities.

Palindromic verses are also to be found in Madhava Shivagnana Yogi's Kanchi Puranam (மாதவச்சிவஞானயோகிகள் காஞ்சிப் புராணம்) and Mahavidvaan Meenakshi Sundaram Pillai's Thirunaagaik kaaronap puranam (மகாவித்துவான் மீனாட்சிசுந்தரம் பிள்ளை திருநாகைக் காரோணப் புராணம்).

Characters
The most familiar palindromes, in English at least, are character-by-character: The written characters read the same backwards as forwards. Some examples of common palindromic words: civic, radar, level, rotor, kayak, reviver, racecar, redder, madam, toot, boob, pop and noon.

Ancient Deities
Shamash is an ancient deity palindrome.

Phrases
Palindromes often consist of a phrase or sentence, e.g.: "Eva, can I stab bats in a cave?", "Mr. Owl ate my metal worm.", "Was it a rat I saw?", "A nut for a jar of tuna", "Ma is as selfless as I am", "Dammit, I'm mad!", and "A Santa lived as a devil at NASA". Punctuation, capitalization, and spacing are usually ignored, although some, such as "Rats live on no evil star" and "Step on no pets", include the spacing.

Famous English palindromes
Some well-known English palindromes are "Able was I ere I saw Elba", "A man, a plan, a canal, Panama", "Madam, I'm Adam" or "Madam in Eden, I'm Adam", "Doc, note: I dissent. A fast never prevents a fatness. I diet on cod." and "Never odd or even." "Rise to vote sir" was featured in an episode of The Simpsons.

Names
Some people have names that are palindromes. A few common palindrome names are: Ada, Anna, Bob, Eve, Hannah and Otto. Lon Nol (1913–1985) was Prime Minister of Cambodia. Nisio Isin is a Japanese novelist and manga writer, whose real name (西尾 維新, Nishio Ishin) is a palindrome in Japanese and when romanized using Kunrei-shiki or Nihon-shiki (it is often written as NisiOisiN to emphasize this). Some changed their name in order to be a palindrome (one example is actor Robert Trebor), while others were given a palindromic name at birth (such as philologist Revilo P. Oliver and Korean-American Mike Kim). Palindromic names are very common in Finland. Examples include Olavi Valo, Emma Lamme, Sanna Rannas, Anni Linna and Asko Oksa. "Stanley Yelnats" is the name of a character in "Holes", a 1998 novel and 2003 film.

Words
Some palindromes use words as units rather than letters. Examples are "Fall leaves after leaves fall", "You can cage a swallow, can't you, but you can't swallow a cage, can you?", "First Ladies rule the State and state the rule: ladies first" and "Girl, bathing on Bikini, eyeing boy, sees boy eyeing bikini on bathing girl". The command "Level, madam, level!", composed only of words that are themselves palindromes, is both a character-by-character and a word-by-word palindrome.

Molecular biology
Restriction enzymes recognize a specific sequence of nucleotides and produce a double-stranded cut in the DNA. While recognition sequences vary widely, with lengths between 4 and 8 nucleotides, many of them are palindromic, which correspond to nitrogenous base sequences between complementary strands, which, when read from the 5' to 3' direction, are identical sequences.

Numbers
A palindromic number is a number whose digits, with decimal representation usually assumed, are the same read backwards, for example, 5885. They are studied in recreational mathematics where palindromic numbers with special properties are sought. A palindromic prime is a palindromic number that is a prime number.

The continued fraction of $$\sqrt{n} + \lfloor\sqrt{n}\rfloor$$ is a repeating palindrome when $$n$$ is an integer.

Dates
Palindromic dates are of interest to recreational mathematicians and numerologists, and sometimes generate comment in the general media. Whether or not a date is palindromic depends on the style in which it is written. In the mm/dd/yyyy style, the most recently occurring palindromic date was January 2, 2010 (01/02/2010), and the next one will be on November 2, 2011 (11/02/2011). While in the dd/mm/yyyy style, the 1st of February, 2010 (01/02/2010) would be one example and the most recent was 11/02/2011 - the 11th day of February, 2011. Some dates have more than one palindromic form. For example, the date September 29, 1929, can be written as a palindrome 3 ways. Without the year, it's 9/29. With the year, it is 9/29/29 or 9/29/1929. January 10, 2011 is a four-way palindrome, as 1/10/2011, 1/10/11, I/X/MMXI, or I/X/XI.

Acoustics
A palindrome in which a recorded phrase of speech sounds the same when it is played backwards was discovered by composer John Oswald in 1974 while he was working on audio tape versions of the cut-up technique using recorded readings by William S. Burroughs. Oswald discovered in repeated instances of Burroughs speaking the phrase "I got" that the recordings still sound like "I got" when played backwards.

In French, a more complex example has been identified with "Une slave valse nue" (a Slavic girl waltzes naked)

Rhythm
The Afro-Cuban rhythm "Cáscara" is a palindrome :

x0xx0x0xx0x0xx0x (where "x" is a hit, "0" is a rest)

Classical music
Joseph Haydn's Symphony No. 47 in G is nicknamed "the Palindrome". The third movement, minuet and trio is a musical palindrome. This clever piece goes forward twice and backwards twice and arrives back at the same place.

W.A. Mozart's Scherzo-Duetto di Mozart is played by one violinist as written and the second with the same music inverted.

The interlude from Alban Berg's opera Lulu is a palindrome, as are sections and pieces, in arch form, by many other composers, including James Tenney, and most famously Béla Bartók. George Crumb also used musical palindrome to text paint the Federico Garcia Lorca poem "¿Porque nací?", the first movement of three in his fourth book of Madrigals. Igor Stravinsky's final composition, The Owl and the Pussy Cat, is a palindrome.

The first movement from Constant Lambert's ballet Horoscope (1938) is titled "Palindromic Prelude". Lambert claimed that the theme was dictated to him by the ghost of Bernard van Dieren, who had died in 1936.

British composer Robert Simpson also composed music in the palindrome or based on palindromic themes; the slow movement of his Symphony No. 2 is a palindrome, as is the slow movement of his String Quartet No. 1. His hour-long String Quartet No. 9 consists of thirty-two variations and a fugue on a palindromic theme of Haydn (from the minuet of his Symphony No. 47). All of Simpson's thirty-two variations are themselves palindromic, equating to a remarkable feat in string quartet writing.

The music of Anton Webern is often imbued with palindromes. Webern, who had studied the music of the Renaissance composer Heinrich Isaac, was extremely interested in symmetries in music, be they horizontal or vertical. For one of the most famous examples of horizontal or linear symmetry in Webern's music, one should look no further than the first phrase in the second movement of the symphony, Op. 21. In one of the most striking examples of vertical symmetry, the second movement of the Piano Variations, Op. 27, Webern arranges every pitch of this dodecaphonic work around the central pitch axis of A4. From this, each downward reaching interval is replicated exactly in the opposite direction. For example, a G-sharp3—13 half-steps down from A4—is replicated as a B-flat5—13 half-steps above.

In classical music, a crab canon is a canon in which one line of the melody is reversed in time and pitch from the other. A large scale musical palindrome covering more than one movement is called "chiasic" referring to the cross shaped Greek letter "X" (pronounced "chi".) This is usually a form of reference to the crucifixion for example, the crucifixus section of the Bach B-minor mass. The purpose of such palindromic balancing is to focus the listener on the central movement much like one would focus on the center of the cross in the crucifixion. Other examples are found in BWV. 4, Christ lag in Todesbanden, Handel's Messiah and the Faure Requiem.

Musical content
Hüsker Dü's concept album Zen Arcade contains the songs "Reoccurring Dreams" and "Dreams Reoccurring", the latter of which appears earlier on the album but is actually the intro of the former song played in reverse. In similar manner, The Stone Roses' first album contains the songs "Waterfall" and "Don't Stop", the latter of which is, in essence, the former performed backwards. The 12" and CD formats of their single Elephant Stone feature the B-side "Full Fathom Five", which is an alternate mix of the title track played in reverse.

The title track of the 1992 album entitled UFO Tofu by Béla Fleck and the Flecktones is said by its composer to be a musical palindrome.

In 2003, the city of San Diego, California commissioned sculptor Roman DeSalvo and composer Joseph Waters to create a public artwork in the form of a safety railing on the 25th Street overpass at F and 25th Streets. The result, Crab Carillon, is a set of 488 tuned chimes that can be played by pedestrians as they cross the overpass. Each chime is tuned to the note of a melody, composed by Waters. The melody is in the form of a palindrome, to accommodate walking in either direction.

"Starálfur", from Sigur Rós's Ágætis byrjun has the strings part palindrome.

The song "You Can Call Me Al" by Paul Simon features a palindromic bass run performed by Bakithi Kumalo.

Lyrics
The song "I Palindrome I", by They Might Be Giants, features palindromic lyrics and imagery. The 27-word bridge is word-symmetrical.

"Weird Al" Yankovic's song "Bob", from his 2003 album Poodle Hat, consists of rhyming palindromes and parodies the Bob Dylan song "Subterranean Homesick Blues".

Baby Gramps is known for songs where the lyrics are made up of palindromes.

Names and titles
In 1975, the Swedish pop group ABBA had a hit single titled "SOS", a unique occasion in which a song's title and the name of its recording artist are both palindromes.

The Grateful Dead's 1969 album Aoxomoxoa is a notable early use of palindrome in the title of a popular music album.

In 1992, the grunge band Soundgarden released an EP called Satanoscillatemymetallicsonatas or SOMMS; the title is a palindrome and puns on the supposed connection between the Devil and heavy metal music.

On Boris and Sunn O)))'s collaborative album "Altar", the vinyl version included a full disc, double-sided bonus track entitled "Satan Oscillate My Metallic Sonatas" (in reference to the Soundgarden EP of the same name), in which the various instruments (mainly guitars) are introduced one at a time on side one, and then fade out in reverse order on side two. Kim Thayil of Soundgarden appears on this track.

The Fall of Troy made a song with the famous palindrome "A Man, A Plan, A Canal, Panama" as the title.

The first and last tracks on Andrew Bird's album Noble Beast form a palindrome ("Oh No" and "On Ho!") and the seventh track is a palindrome in itself: "Ouo". He has also mentioned palindromes in earlier music, giving his songs names like "11:11" "T'N'T" and "Fake Palindromes" (although the last title is not a palindrome itself). He also mentions palindromes in the lyrics of the song "I" and the "I" redux "Imitosis".

"racEcar" by Vitamin Party features a repeating chorus of "A Man, A Plan, A Canal, Panama" (the title itself is palindromic).

"Never Odd or Even", which was to be the title of the first album by Aleka's Attic, the band formed by the late River Phoenix, is a palindrome.

"If I Had a Hi-Fi", a 2010 cover album by American alternative rock band Nada Surf, is a palindrome.

Miles Davis and Black Sabbath both had albums called "Live Evil". Inversely, Lynch Mob and Diamond Head had albums called "Evil Live".

D.R.U.G.S. has two songs that are palindromes on the self-titled debut album, "Mr. Owl Ate My Metal Worm" and "Laminated E.T. Animal".

The Asian-American teenage Riot Grrrl band Emily's Sassy Lime's name is palindromic.

Long palindromes
The longest palindromic word in the Oxford English Dictionary is the onomatopoeic tattarrattat, coined by James Joyce in Ulysses (1922) for a knock on the door. The Guinness Book of Records gives the title to detartrated, the preterit and past participle of detartrate, a chemical term meaning to remove tartrates. Rotavator, a trademarked name for an agricultural machine, is often listed in dictionaries. The term redivider is used by some writers but appears to be an invented or derived term—only redivide and redivision appear in the Shorter Oxford Dictionary. Malayalam, an Indian language, is of equal length.

According to Guiness World Records, the Finnish word saippuakivikauppias (soapstone vendor), a 19 letter word, is claimed to be the world's longest palindromic word in everyday use. A meaningful derivative from it is saippuakalasalakauppias (soapfish bootlegger). An even longer effort is saippuakuppinippukauppias (soap dish wholesale vendor). Almost equally long is the Estonian word kuulilennuteetunneliluuk (the hatch a bullet flies out of when exiting a tunnel).

In English, two palindromic novels have been published: Satire: Veritas by David Stephens (1980, 58,795 letters), and Dr Awkward & Olson in Oslo by Lawrence Levine (1986, 31,954 words). In French, Oulipo writer George Perec's "Grand Palindrome" (1969) is 5,556 letters in length. In Hebrew, Noam Dovev wrote a 303-word, 1111-letter palindromic story called "Do god".

Biological structures
In most genomes or sets of genetic instructions, palindromic motifs are found. However, the meaning of palindrome in the context of genetics is slightly different from the definition used for words and sentences. Since the DNA is formed by two paired strands of nucleotides, and the nucleotides always pair in the same way (Adenine (A) with Thymine (T), Cytosine (C) with Guanine (G)), a (single-stranded) sequence of DNA is said to be a palindrome if it is equal to its complementary sequence read backwards. For example, the sequence ACCTAGGT is palindromic because its complement is TGGATCCA, which is equal to the original sequence in reverse complement.

A palindromic DNA sequence can form a hairpin. Palindromic motifs are made by the order of the nucleotides that specify the complex chemicals (proteins) that, as a result of those genetic instructions, the cell is to produce. They have been specially researched in bacterial chromosomes and in the so-called Bacterial Interspersed Mosaic Elements (BIMEs) scattered over them. Recently a research genome sequencing project discovered that many of the bases on the  Y-chromosome are arranged as palindromes. A palindrome structure allows the Y-chromosome to repair itself by bending over at the middle if one side is damaged.

It is believed that palindromes are also found frequently in proteins, but their role in the protein function is not clearly known. It has recently been suggested that the prevalence existence of palindromes in peptides might be related to the prevalence of low-complexity regions in proteins, as palindromes are frequently associated with low-complexity sequences. Their prevalence might be also related to an alpha helical formation propensity of these sequences, or in formation of proteins/protein complexes.

Computation theory
In the automata theory, a set of all palindromes in a given alphabet is a typical example of a language that is context-free, but not regular. This means that it is, in theory, impossible for a computer with a finite amount of memory to reliably test for palindromes. (For practical purposes with modern computers, this limitation would apply only to incredibly long letter-sequences.)

In addition, the set of palindromes cannot be reliably tested by a deterministic pushdown automaton and is not LR(k)-parseable. When reading a palindrome from left-to-right, it is, in essence, impossible to locate the "middle" until the entire word has been read completely.

Semordnilap
Semordnilap is a name coined for a word or phrase that spells a different word or phrase backwards. "semordnilap" is itself "palindromes" spelled backwards. According to author O.V. Michaelsen, it was probably coined by logologist Dmitri A. Borgmann and appeared in Oddities and Curiosities, annotated by Martin Gardner, 1961. Semordnilaps are also known as volvograms, heteropalindromes, semi-palindromes, half-palindromes, reversgrams, mynoretehs, reversible anagrams, word reversals, or anadromes. They have also sometimes been called antigrams, though this term now usually refers to anagrams with opposing meanings.

These words are very useful in constructing palindromic texts; together, each pair forms a palindrome, and they can be added on either side of a shorter palindrome in order to extend it.

The longest single-word English examples contain eight letters:


 * stressed / desserts
 * samaroid (resembling a samara) / dioramas
 * rewarder / redrawer
 * departer / retraped (construction based on the fact that verb trape is recorded as an alternative spelling of traipse)
 * reporter / retroper (construction based on the fact that trope is recorded as a verb, meaning "to furnish with tropes")

Other examples include:


 * was / saw
 * gateman / nametag
 * enoteca / acetone
 * deliver / reviled
 * straw / warts
 * star / rats
 * lived / devil
 * live / evil
 * diaper / repaid
 * smart / trams
 * spit / tips
 * stop / pots
 * bats / stab

The poem Lost Generation is a line-by-line semordnilap. When the lines are read in reverse order, it becomes new poem.

Non-English palindromes
Palindromes in languages that use an alphabetic writing system work in essentially the same way as English palindromes. In languages that use a writing system other than an alphabet (such as Chinese), a palindrome is still a sequence of characters from that writing system that remains the same when reversed, though the characters now represent words rather than letters.

The treatment of diacritics varies. In languages such as Czech and Spanish, letters with diacritics or accents (except tildes) are not given a separate place in the alphabet, and thus preserve the palindrome whether or not the repeated letter has an ornamentation. However, in the Nordic languages, A, Å and Ä/Æ, as well as O and Ö/Ø, are all distinct letters and must be mirrored exactly to be considered a palindrome.

The longest palindrome in the Dutch language, according to the Dutch Guinness Book of World Records, is koortsmeetsysteemstrook, which translates into English as thermometer. The Dutch Wikipedia states, however, that Hugo Brandt Corstius, in his book, Opperlandse taal- en letterkunde, came up with the longest existing Dutch palindrome—potstalmelkkoortspilstaalplaatslipstrookklemlatstop—which has no definitive meaning, although it consists of legitimate Dutch words.