PALINDROME

An Important language

PALINDROME

The language consisting of Λ and the strings s defined over Σ  such that Rev(s)=s.

It is to be denoted that the words of PALINDROME are called palindromes.

 

Example

For Σ={a,b},

PALINDROME={Λ , a, b, aa, bb, aaa, aba, bab, bbb, ...}

 

Remark

There are as many palindromes of length 2n as there are of length 2n-1.

To prove the above remark, the following is to be noted:

 

Note

Number of strings of length ‘m’ defined over   alphabet of ‘n’ letters is nm.

 

Examples

The language of strings of length 2, defined over Σ={a,b} is L={aa, ab, ba, bb} i.e. number of strings = 22

The language of strings of length 3, defined over Σ={a,b} is L={aaa, aab, aba, baa, abb, bab, bba, bbb} i.e. number of strings = 23

 

 

 

Previous

 

 

TOC

 

 

Next