Palindrome
A palindrome is a word, phrase, number or other sequence of units  that can be read the same way in either direction (the adjustment of punctuation and spaces between words is generally permitted). Composing literature in palindromes is an example of constrained writing. 
The word "palindrome" was coined from Greek roots palin (Template:Polytonic; "back") and dromos (Template:Polytonic; "way, direction") by English writer Ben Jonson in the 1600s. The actual Greek phrase to describe the phenomenon is karkinike epigrafe (Template:Polytonic; crab inscription), or simply karkinieoi (Template:Polytonic; crabs), alluding to the backward movement of crabs, like an inscription which can be read backwards. 

# History
Palindromes date back at least to 79 A.D., as the palindromic Latin word square "Sator Arepo Tenet Opera Rotas" 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 top left to bottom right orpoertically from bottom right to top left. While some sources translate this as "The sower Arepo holds the wheels at work", translation is problematic as the word arepo is otherwise unknown; the square may have been a coded Christian signifier, with TENET forming a cross.
A palindrome with the same property is the Hebrew palindrome "We explained the glutton who is in the honey was burned and incinerated" (Template:Script/Hebrew; PRShNW R`BTN ShBDBSh NTB`R WNShRP or parasnu ra`avtan sheba'dvash nitba'er venisraf) by Ibn Ezra, referring to the halachic question as to whether a fly landing in honey makes the honey treif.
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 my sins not only my face" (: Template:Polytonic; Modern: Template:Polytonic; Nipson anomemata me monan opsin, note ps is the single Greek letter psi ()) on baptismal fonts. This is round the font at St. Mary's Church, Nottingham and also the font in the basilica of St. Sophia, Constantinople, the font of St. Stephen dEgres, Paris; at St. Menins Abbey, Orleans; at Dulwich College; and at the following churches: Worlingsworth (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.  An example which has been called "the most complex and exquisite type of palindrome ever invented", appears in the 19th canto of the 8th century epic poem sisupala-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 only included here 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:

# Types

## Characters
The most familiar palindromes, in English at least, are character-by-character: the written characters read the same backwards as forwards. Palindromic words exist, for example civic, level, rotator, rotor, kayak, and racecar.
Palindromes often consist of a phrase or sentence ("Was it a rat I saw?", "Step on no pets", "Sit on a potato pan, Otis", "Lisa Bonet ate no basil", "Satan, oscillate my metallic sonatas", "I roamed under it as a tired nude Maori"). Punctuation, capitalization, and spacing are usually ignored, although some (such as "Rats live on no evil star") include the spacing.
The three famous English palindromes are "Able was I ere I saw Elba" (which is also palindromic with respect to spacing), "A man, a plan, a canal, Panama!, and Madam, I'm Adam.
Some people have names that are palindromes. 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 Neo-Nazi philologist Revilo Oliver and more than one man named Mike Kim).

## Words
Some palindromes use words as units rather than letters. Examples are "Fall leaves after leaves fall", "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.

## Lines
Still other palindromes take the line as the unit. The poem Doppelganger, composed by James A. Lindon, is an example.
The dialogue "Crab Canon" in Douglas Hofstadter's Godel, Escher, Bach is nearly a line-by-line palindrome. The second half of the dialog consists, with some very minor changes, of the same lines as the first half, but in reverse order and spoken by the opposite characters (i.e., lines spoken by Achilles in the first half are spoken by the Tortoise in the second, and vice versa). In the middle is a non-symmetrical line spoken by the Crab, who enters and spouts some nonsense, apparently triggering the reversal. The structure is modeled after the musical form known as crab canon, in particular the canon a 2 cancrizans of Johann Sebastian Bach's The Musical Offering.

## 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 that read the same backwards and forwards.

## Numbers
A palindromic number is a number whose digits, with decimal representation usually assumed, are the same read backwards, for example, 58285. 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.

## 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. For example, in the dd/mm/yyyy style, the 20th of February in 2002 (20-02-2002) was palindromic.

## 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.
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 Bela Bartok.  George Crumb also used musical palindrome to text paint the Federico Garcia Lorca poem "Porque naci?", 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. 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.
The music of Anton Webern is often imbued with palindromes. Webern, who had studied the music of the Renaissance composer Heinrich Issac, 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 Opus 21 Symphony. In one of the most striking examples of vertical symmetry, the second movement of the Opus 27 Piano Variations, 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.
Husker Du'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. Similarly, The Stone Roses' first album contains the songs "Waterfall" and "Don't Stop," the latter of which is essentially the former performed backwards.
The title track of the 1992 album entitled UFO Tofu by Bela 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.City of San Diego Public Art website.
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.
The 2007 re-release of Yoko Ono's song "No, No, No" is credited simply to "Ono", making the artisttitle combination a palindrome.
Baby Gramps is known for songs where the lyrics are made up of palindromes.
The Fall of Troy made a song with the famous palindrome "A Man, A Plan, A Canal, Panama" as 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".
Staralfur, from Sigur Ros's Agtis byrjun has the strings part palindrome.

## Acoustic
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.

# Long palindromes

## Single words
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 past tense of detartrate, a somewhat contrived 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 term  only redivide and redivision appear in the Shorter Oxford Dictionary. Malayalam, an Indian language, is of equal length (strictly, this name should be spelt either Malayaalam or Malayalam, as the next to last vowel is long). Another aspect of the word "malayalam" is that it stays a letter palindrome if it is written in any phonetic script like devanagari.
The Finnish word saippuakivikauppias (soap-stone vendor) 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 (soapdish batch seller). Koortsmeetsysteemstrook (fever measuring system strip) is probably the longest palindrome in Dutch.

# 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) which, 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 is recently  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 protein/protein complexes .

# Computation theory
In the automata theory, a set of all palindromes in a given alphabet is a typical example of a language which is context-free, but not regular.   This means that it is theoretically impossible for a computer with a finite amount of memory to reliably test for palindromes.  (For practical purposes with modern computers, this limitation would only apply to incredibly long letter-sequences.)
Additionally, 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 essentially impossible to locate the middle until the entire word has been read.

# Semordnilaps
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 palindromes; 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 instance in English is probably stratagem / mega tarts, which consists of nine letters. There are many examples containing eight letters, such as:
- 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:
- gateman / nametag
- deliver / reviled
- lamina / animal
- dennis / sinned
- straw / warts
- star / rats
- stop / pots
- snap / pans
- pins / snip
- lived / devil
- diaper / repaid
- smart / trams
- spit / tips
- live / evil
- dog / god
- gut / tug
- maps / spam
- war / raw
- was / saw
- trap / part

# 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 Danish and other Nordic languages, A and A with a ring (A) are distinct letters and must be mirrored exactly to be considered a true palindrome.

# More examples of English palindromes
- Step on no pets.
- Dammit, I'm mad!
- Rise to vote, sir.
- Never odd or even
- If I had a hi-fi
- Yo, banana boy!
- Do geese see God?
- No devil lived on.
- Ah, Satan sees Natasha.
- Lewd did I live & evil I did dwel!
- Was it a car or a cat I saw?
- Are we not drawn onward, we few, drawn onward to new era?
- No lemon, no melon
- Now I see bees, I won.
- Ma is as selfless as I am.
- Nurse, I spy gypsiesrun!
- Was it Eliot's toilet I saw?
- No, sir, away! A papaya war is on!
- Go hang a salami, I'm a lasagna hog.
- I, madam, I made radio! So I dared! Am I mad? Am I?
- Swap God for a janitor, rot in a jar of dog paws.
- Eva, can I see bees in a cave?
- So many dynamos!
- Red rum, sir, is murder.
- Never even

# Family
There is a certain warmth provided by palindromes perhaps coming from childhood.
Ironically many family nicknames, particularly in English, are palindromes:
Mom, Dad, Pop, Pap and Sis. 
Likewise there are palindromes with a tag like: Momma, Poppa, Poppy, Pappy, Bubba, Nanna, Mamma, 
Daddy and Sissa.  Abba is the name for God the father.