Palindrome


A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam, racecar. There are also numeric palindromes, including date/time stamps using short digits 11/11/11 11:11 and long digits 02/02/2020. Sentence-length palindromes ignore capitalization, punctuation, and word boundaries, so "A man, a plan, a canal, Panama!" is treated as AMANAPLANACANALPANAMA.
Composing literature in palindromes is an example of constrained writing.
The word palindrome was introduced by Henry Peacham in 1638. It is derived from the Greek roots πάλιν 'again' and δρóμος 'way, direction'; a different word is used in Greek, καρκινικός 'carcinic' to refer to letter-by-letter reversible writing.

History

The ancient Greek poet Sotades invented a form of Ionic meter called Sotadic or Sotadean verse, which is sometimes said to have been palindromic, but no examples survive, and the exact nature of the "reverse" readings is unclear.
.
A palindrome was found as a graffito at Herculaneum, a city buried by ash in 79 CE. This palindrome, called the Sator Square, consists of a sentence written in Latin: "Sator Arepo Tenet Opera Rotas". It is remarkable for the fact that the first letters of each word form the first word, the second letters form the second word, 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. As such, they can be referred to as palindromatic.
A palindrome with the same square property is the Hebrew palindrome, "We explained the glutton who is in the honey was burned and incinerated",, credited to Abraham ibn Ezra in 1924, and referring to the halachic question as to whether a fly landing in honey makes the honey treif.
The palindromic Latin riddle "In girum imus nocte et consumimur igni" describes the behavior of moths. It is likely that this palindrome is from medieval rather than ancient times. The second word, borrowed from Greek, should properly be spelled gyrum.
Byzantine Greeks often inscribed the palindrome, "Wash sins, not only face" ΝΙΨΟΝ ΑΝΟΜΗΜΑΤΑ ΜΗ ΜΟΝΑΝ ΟΨΙΝ, attributed to Gregory of Nazianzus, on baptismal fonts; most notably in the basilica of Hagia Sophia in Constantinople. A variant, also a palindrome, replaces the plural ΑΝΟΜΗΜΑΤΑ by the singular ΑΝΟΜΗΜΑ. This practice was continued in many churches in Western Europe, such as the font at St. Mary's Church, Nottingham and also the font of St. Stephen d'Egres, Paris; at St. Menin's Abbey, Orléans; at Dulwich College; and at the following churches in England: Worlingworth, Harlow, Knapton, St Martin, Ludgate, and Hadleigh.
A Greek poet in 1802 Vienna even composed a poem, Ποίημα Καρκινικόν, in Ancient Greek, where every one of the 455 lines was a palindrome.
In English, there are dozens of palindrome words, such as eye, madam, and deified, but English writers generally only cited Latin and Greek palindromic sentences in the early 19th century, even though John Taylor had coined one in 1614: "Lewd did I live, & evil I did dwel". This is generally considered to be the first English-language palindrome sentence, and was long reputed to be the only one, despite many efforts to find others. Then in 1848, a certain "J.T.R." coined "Able was I ere I saw Elba", which became famous after it was attributed to Napoleon.
In recent history, there have been competitions related to palindromes, such as the 2012 World Palindrome Championship, set in Brooklyn, USA.

Famous 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", and "Never odd or even".
English palindromes of notable length include mathematician Peter Hilton's "Doc, note: I dissent. A fast never prevents a fatness. I diet on cod" and Scottish poet Alastair Reid's "T. Eliot, top bard, notes putrid tang emanating, is sad; I'd assign it a name: gnat dirt upset on drab pot toilet."

Types

Characters, words, or lines

The most familiar palindromes in English are character-unit palindromes. The characters read the same backward as forward. Some examples of palindromic words are redivider, deified, civic, radar, level, rotor, kayak, reviver, racecar, madam, and refer.
There are also word-unit palindromes in which the unit of reversal is the word. Word-unit palindromes were made popular in the recreational linguistics community by J. A. Lindon in the 1960s. Occasional examples in English were created in the 19th century. Several in French and Latin date to the Middle Ages.
There are also line-unit palindromes.

Sentences and phrases

Palindromes often consist of a sentence or phrase, e.g., "Mr. Owl ate my metal worm", "Do geese see God?", "Was it a car or a cat I saw?", "Murder for a jar of red rum" or "Go hang a salami, I'm a lasagna hog". Punctuation, capitalization, and spaces are usually ignored. Some, such as "Rats live on no evil star", "Live on time, emit no evil", and "Step on no pets", include the spaces.

Semordnilap

Semordnilap is a name coined for words that spell a different word in reverse. The word was coined by Martin Gardner in his notes to C.C. Bombaugh's book Oddities and Curiosities of Words and Literature in 1961.
An example of this is the word stressed, which is desserts spelled backward.
Some semordnilaps are deliberate creations. An example in electronics is the mho, a unit of electrical conductance, which is ohm spelled backwards, the unit of electrical resistance and the reciprocal of conductance. Similarly, the daraf, a unit of elastance, is farad spelled backwards, the unit of capacitance and the reciprocal of elastance. In fiction, many characters have names deliberately made to be semordnilaps of other names or words, such as Alucard.
Semordnilaps are also known as emordnilaps, word reversals, reversible anagrams, heteropalindromes, semi-palindromes, half-palindromes, reversgrams, mynoretehs, volvograms, or anadromes. They have also sometimes been called antigrams, though this term usually refers to anagrams which have opposite meanings. As of October 2018, none of these terms have been accepted as official entries in the Oxford English Dictionary.

Names

Some names are palindromes, such as the given names Hannah, Ava, Anna, Eve, Bob and Otto, or the surnames Harrah, Renner, Salas, and Nenonen.
Lon Nol was Prime Minister of Cambodia. Nisio Isin is a Japanese novelist and manga writer, whose pseudonym is a palindrome when romanized using the Kunrei-shiki or the Nihon-shiki systems, and is often written as NisiOisiN to emphasize this. Some people have changed their name in order to make it palindromic, while others were given a palindromic name at birth.
There are also palindromic names in fictional media. "Stanley Yelnats" is the name of the main character in Holes, a 1998 novel and 2003 film. Four of the fictional Pokémon species have palindromic names in English.
The 1970s pop band ABBA is a palindrome using the starting letter of the first name of each of the four band members.

Numbers

The digits of a palindromic number are the same read backwards as forwards, for example, 91019; decimal representation is usually assumed. In recreational mathematics, palindromic numbers with special properties are sought. For example, 191 and 313 are palindromic primes.
Whether Lychrel numbers exist is an unsolved problem in mathematics about whether all numbers become palindromes when they are continuously reversed and added. For example, 56 is not a Lychrel number as 56 + 65 = 121, and 121 is a palindrome. The number 59 becomes a palindrome after three iterations: 59 + 95 = 154; 154 + 451 = 605; 605 + 506 = 1111, so 59 is not a Lychrel number either. Numbers such as 196 are thought to never become palindromes when this reversal process is carried out and are therefore suspected to be Lychrel numbers. If a number is not a Lychrel number, it is called a "delayed palindrome". In January 2017 the number 1,999,291,987,030,606,810 was published in OEIS as, and described as "The Largest Known Most Delayed Palindrome", with a delay of 261. Several smaller 261-delay palindromes were published separately as.
Every positive integer can be written as the sum of three palindromic numbers in every number system with base 5 or greater.
The continued fraction of + ⌊⌋ is a repeating palindrome when n is an integer, where ⌊x⌋ denotes the integer part of x.

Dates

A day or timestamp is a palindrome when its digits are the same when reversed. Only the digits are considered in this determination and the component separators are ignored. Short digits may be used as in 11/11/11 11:11 or long digits as in 02/02/2020.
A notable palindrome day is this century's 2 Feb 2020 because this date is a palindrome regardless of the date format by country used in various countries. For this reason, this date has also been termed as a "Universal Palindrome Day". Other universal palindrome days include, almost a millennium previously, 11/11/1111, the future 12/12/2121, and in a millennium 03/03/3030.

In speech

A phonetic palindrome is a portion of speech that is identical or roughly identical when reversed. It can arise in context where language is played with, for example in slang dialects like verlan. In French, there is the phrase une Slave valse nue, phonemically. John Oswald discussed his experience of phonetic palindromes while working on audio tape versions of the cut-up technique using recorded readings by William S. Burroughs. A list of phonetic palindromes discussed by word puzzle columnist O.V. Michaelsen include "crew work"/"work crew", "dry yard", "easy", "Funny enough", "Let Bob tell", "new moon", "selfless", "Sorry, Ross", "Talk, Scott", "to boot", "top spot", "Y'all lie", "You're caught. Talk, Roy", and "You're damn mad, Roy".

Classical music

's Symphony No. 47 in G is nicknamed "the Palindrome". In the third movement, a minuet and trio, the second half of the minuet is the same as the first but backwards, the second half of the ensuing trio similarly reflects the first half, and then the minuet is repeated.
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 García Lorca poem "¿Por qué 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 is entitled "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. All of Simpson's thirty-two variations are themselves palindromic.
Hin und Zurück is an operatic 'sketch' in one scene by Paul Hindemith, with a German libretto by Marcellus Schiffer. It is essentially a dramatic palindrome. Through the first half, a tragedy unfolds between two lovers, involving jealousy, murder and suicide. Then, in the reversing second half, this is replayed with the lines sung in reverse order to produce a happy ending.
The music of Anton Webern is often palindromic. Webern, who had studied the music of the Renaissance composer Heinrich Isaac, was extremely interested in symmetries in music, be they horizontal or vertical. An example of horizontal or linear symmetry in Webern's music is the first phrase in the second movement of the symphony, Op. 21. A striking example of vertical symmetry is the second movement of the Piano Variations, Op. 27, in which 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 G3—13 half-steps down from A4 is replicated as a B5—13 half-steps above.
Just as the letters of a verbal palindrome are not reversed, so are the elements of a musical palindrome usually presented in the same form in both halves. Although these elements are usually single notes, palindromes may be made using more complex elements. For example, Karlheinz Stockhausen's composition Mixtur, originally written in 1964, consists of twenty sections, called "moments", which may be permuted in several different ways, including retrograde presentation, and two versions may be made in a single program. When the composer revised the work in 2003, he prescribed such a palindromic performance, with the twenty moments first played in a "forwards" version, and then "backwards". Each moment, however, is a complex musical unit, and is played in the same direction in each half of the program. By contrast, Karel Goeyvaerts's 1953 electronic composition, Nummer 5 is an exact palindrome: not only does each event in the second half of the piece occur according to an axis of symmetry at the centre of the work, but each event itself is reversed, so that the note attacks in the first half become note decays in the second, and vice versa. It is a perfect example of Goeyvaerts's aesthetics, the perfect example of the imperfection of perfection.
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 "chiastic", referring to the cross-shaped Greek letter "χ" This is usually a form of reference to the crucifixion; for example, the Mass in B minor structure#Crucifixus movement of Bach's Mass in B minor. The purpose of such palindromic balancing is to focus the listener on the central movement, much as one would focus on the center of the cross in the crucifixion. Other examples are found in Bach's cantata BWV 4, Christ lag in Todes Banden, Handel's Messiah and Fauré's Requiem.
A table canon is a rectangular piece of sheet music intended to be played by two musicians facing each other across a table with the music between them, with one musician viewing the music upside down compared to the other. The result is somewhat like two speakers simultaneously reading the Sator Square from opposite sides, except that it is typically in two-part polyphony rather than in unison.

Long palindromes

The longest palindromic word in the Oxford English Dictionary is the onomatopoeic tattarrattat, coined by James Joyce in Ulysses for a knock on the door. The Guinness Book of Records gives the title to detartrated, the preterite 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, a language of southern India, is of equal length.
In English, two palindromic novels have been published: Satire: Veritas by David Stephens, and Dr Awkward & Olson in Oslo by Lawrence Levine. Another palindromic English work is a 224-word long poem, "Dammit I'm Mad", written by Demetri Martin.
According to Guinness World Records, the Finnish 19-letter word saippuakivikauppias, is the world's longest palindromic word in everyday use.

Biological structures

In most genomes or sets of genetic instructions, palindromic motifs are found. The meaning of palindrome in the context of genetics is slightly different, however, 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 with Thymine, Cytosine with Guanine ), a sequence of DNA is said to be a palindrome if it is equal to its complementary sequence read backward. 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 may form a hairpin. Palindromic motifs are made by the order of the nucleotides that specify the complex chemicals 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 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 frequently are also found 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 frequently are associated with low-complexity sequences. Their prevalence might also be related to an alpha helical formation propensity of these sequences, or in formation of proteins/protein complexes.

Computation theory

In 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 impossible for a computer with a finite amount of memory to reliably test for palindromes.
In addition, the set of palindromes may not be reliably tested by a deterministic pushdown automaton which also means that they are not LR-parsable or LL-parsable. 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.
It is possible to find the longest palindromic substring of a given input string in linear time.
The palindromic density of an infinite word w over an alphabet A is defined to be zero if only finitely many prefixes are palindromes; otherwise, letting the palindromic prefixes be of lengths nk for k=1,2,... we define the density to be
Among aperiodic words, the largest possible palindromic density is achieved by the Fibonacci word, which has density 1/φ, where φ is the Golden ratio.
A palstar is a concatenation of palindromic strings, excluding the trivial one-letter palindromes – otherwise all strings would be palstars.

Notable palindromists