CFG of Language of all even and odd length palindromes.

By: Prof. Fazal Rehman Shamil
Last modified on April 26th, 2020

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