Context-free grammar for even palindromes
= Context-free grammar for even palindromes
The productions $S\to0S0\mid1S1\mid00\mid11$ generate exactly the nonempty binary palindromes of even length.
= Context-free grammar for even palindromes
The productions $S\to0S0\mid1S1\mid00\mid11$ generate exactly the nonempty binary palindromes of even length.