Interchange lemma

{{Multiple issues|

{{primary sources|date=March 2019}}

{{No footnotes|date=September 2022}}

}}

In the theory of formal languages, the interchange lemma states a necessary condition for a language to be context-free, just like the pumping lemma for context-free languages.

It states that for every context-free language L there is a c>0 such that for all n\geq m\geq 2 for any collection of length n words R\subset L there is a Z=\{z_1,\ldots,z_k\}\subset R with k\ge |R|/(cn^2), and decompositions z_i=w_ix_iy_i such that each of |w_i|, |x_i|, |y_i| is independent of i, moreover, m/2<|x_i|\leq m, and the words w_ix_jy_i are in L for every i and j.

The first application of the interchange lemma was to show that the set of repetitive strings (i.e., strings of the form xyyz with |y|>0) over an alphabet of three or more characters is not context-free.

See also

References

  • {{cite journal | author=William Ogden, Rockford J. Ross, and Karl Winklmann | title=An "Interchange Lemma" for Context-Free Languages | journal= SIAM Journal on Computing| volume=14 | year=1982 | pages=410–415 | doi=10.1137/0214031 | issue=2}}

{{Formal languages and grammars |state=collapsed}}

Category:Formal languages

Category:Lemmas

{{grammar-stub}}