This language is not context-free. Suppose it were, and define the homomorphism
Then closure under inverse homomorphism and intersection of a context-free language with a regular language would make
context-free. The equality holds because the midpoint of a square with four nonempty alternating runs must lie between its second and third runs.
Apply the pumping lemma for context-free languages to . A pumpable window of length at most meets at most two adjacent blocks. Pumping changes at least one block but cannot reach its equal-count partner two blocks away, so either the counts or the counts cease to agree. This contradiction proves the claim.

Articles by others on the same topic (0)

There are currently no matching articles.