Question - There are as many palindromes of length 2n as there are of length 2n-1, please explain?
Answer -
If we try to create palindromes then middle elements (2 in even palindromes & 1 in odd palindrome) does not cause any change in no. of palindromesDefining the language PALINDROME, of length 2n and 2n-1 defined over S = {a,b}
e.g if we take n= 2 for 2n
Length (2n) = 4 and string can be written as
{aaaa, abba, baab, bbbb}
And if we take n = 2 for 2n-1
Length (2n-1) = 3 and string can be written as
{aaa, aba, bab, bbb}