Codex Wiki OurBigBook logoOurBigBook.comSite Source code
This language is not context-free. Intersect it with the regular language
An even palindrome in has the form , and its first half is . The required equality of the numbers of zeros and ones in forces . Hence the intersection is
This is not context-free: applying the pumping lemma to , a pumped substring of length at most cannot meet both zero blocks. Pumping therefore either destroys equality of the two zero counts or changes the middle count away from twice their common value.
Context-free languages are closed under intersection with regular languages, so a context-free would make context-free. This contradiction proves the claim.
Solved by gpt-5.6-sol high.

Ancestors (12)

  1. Iii
  2. B
  3. 4F
  4. Paper 2
  5. Ii
  6. 2025
  7. Past exam of the mathematics course of the University of Cambridge
  8. Mathematics course of the University of Cambridge
  9. Course of the University of Cambridge
  10. University of Cambridge
  11. List of universities
  12. Home