CFG of Language of all even and odd length palindromes.

CFG of Language of all even and odd length palindromes.

Strings of the language

  • abba
  • bbbb
  • baab
  • baaaab
  • abbbba
  • aaaa
  • bbbb

Context Free Grammar

S =>abSYX|baSXY|ε

X =>a

Y =>b

Video Lecture