PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: Very high Entry average rating: No information on entry rating
reversal (Definition)

Let $\Sigma$ be an alphabet and $w$ a word over $\Sigma$ . The reversal of $w$ is the word obtained from $w$ by ``spelling'' it backwards. Formally, the reversal is defined as a function $\operatorname{rev}:\Sigma^* \to \Sigma^*$ such that, for any word $w=a_1\cdots a_n$ , where $a_i \in \Sigma$ , $\operatorname{rev}(w):= a_n \cdots a_1$ . Furthermore, $\operatorname{rev}(\lambda):=\lambda$ . Oftentimes $w^R$ or $\operatorname{mi}(w)$ is used to denote the reversal of $w$ .

For example, if $\Sigma = \lbrace a, b\rbrace$ , and $w=aababb$ , then $\operatorname{rev}(w)=bbabaa$ .

Two properties of the reversal are:

  • it fixes all $a\in \Sigma$ : $\operatorname{rev}(a)=a$ .
  • it is idempotent: $\operatorname{rev}\circ \operatorname{rev} = 1$ , and
  • it reverses concatenation: $\operatorname{rev}(ab)=\operatorname{rev}(b)\operatorname{rev}(a)$ .
In other words, the reversal is an antihomomorphism. In fact, it is the antihomomorphism that fixes every element of $\Sigma$ . Furthermore, $g$ is an antihomomorphism iff $g\circ \operatorname{rev}$ is a homomorphism. By the second property above, $h$ is a homomorphism iff $h\circ \operatorname{rev}$ is an antihomomorphism.

A word that is fixed by the reversal is called a palindrome. The empty word $\lambda$ as well as any symbol in the alphabet $\Sigma$ are trivially palindromes. Also, for any word $w$ , the words $wx\operatorname{rev}(w)$ and $\operatorname{rev}(w)xw$ are both palindromes, where $x$ is either a symbol in $\Sigma$ or the empty word. In fact, every palindrome can be written this way.

The language consisting of all palindromes over an alphabet is context-free, and not regular if $\Sigma$ has more than one symbol. It is not hard to see that the productions are $\sigma \to \lambda$ , $\sigma \to a$ and $\sigma \to a\sigma a$ , where $a$ ranges over $\Sigma$ .

Reversal of words can be extended to languages: let $L$ be a language over $\Sigma$ , then $$\operatorname{rev}(L):= \lbrace \operatorname{rev}(w) \mid w\in L\rbrace.$$

A family $ \mathscr{F}$ of languages is said to be closed under reversal if for any $ L\in \mathscr{F}$ , $ \operatorname{rev}(L)\in \mathscr{F}$ . It can be shown that regular languages, context-free languages, context-sensitive languages, and type-0 languages are all closed under reversal.




"reversal" is owned by CWoo.
(view preamble | get metadata)

View style:

See Also: palindrome

Other names:  mirror image
Log in to rate this entry.
(view current ratings)

Cross-references: type-0 languages, context-sensitive languages, context-free languages, regular languages, closed under, ranges, productions, regular, context-free, language, empty word, palindrome, fixed, homomorphism, iff, element, antihomomorphism, concatenation, idempotent, properties, function, alphabet
There are 13 references to this entry.

This is version 9 of reversal, born on 2009-05-10, modified 2009-06-15.
Object id is 11774, canonical name is Reversal.
Accessed 589 times total.

Classification:
AMS MSC68Q45 (Computer science :: Theory of computing :: Formal languages and automata)
 68Q70 (Computer science :: Theory of computing :: Algebraic theory of languages and automata)

Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)