Misplaced Pages

Interchange lemma

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
(Redirected from Interchange lemma for context-free languages)
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources.
Find sources: "Interchange lemma" – news · newspapers · books · scholar · JSTOR (March 2019) (Learn how and when to remove this message)
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (September 2022) (Learn how and when to remove this message)
(Learn how and when to remove this message)

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 {\displaystyle L} there is a c > 0 {\displaystyle c>0} such that for all n m 2 {\displaystyle n\geq m\geq 2} for any collection of length n {\displaystyle n} words R L {\displaystyle R\subset L} there is a Z = { z 1 , , z k } R {\displaystyle Z=\{z_{1},\ldots ,z_{k}\}\subset R} with k | R | / ( c n 2 ) {\displaystyle k\geq |R|/(cn^{2})} , and decompositions z i = w i x i y i {\displaystyle z_{i}=w_{i}x_{i}y_{i}} such that each of | w i | {\displaystyle |w_{i}|} , | x i | {\displaystyle |x_{i}|} , | y i | {\displaystyle |y_{i}|} is independent of i {\displaystyle i} , moreover, m / 2 < | x i | m {\displaystyle m/2<|x_{i}|\leq m} , and the words w i x j y i {\displaystyle w_{i}x_{j}y_{i}} are in L {\displaystyle L} for every i {\displaystyle i} and j {\displaystyle j} .

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

See also

References

  • William Ogden, Rockford J. Ross, and Karl Winklmann (1982). "An "Interchange Lemma" for Context-Free Languages". SIAM Journal on Computing. 14 (2): 410–415. doi:10.1137/0214031.{{cite journal}}: CS1 maint: multiple names: authors list (link)
Automata theory: formal languages and formal grammars
Chomsky hierarchyGrammarsLanguagesAbstract machines
  • Type-0
  • Type-1
  • Type-2
  • Type-3
Each category of languages, except those marked by a , is a proper subset of the category directly above it. Any language in each category is generated by a grammar and by an automaton in the category in the same line.


Stub icon

This grammar-related article is a stub. You can help Misplaced Pages by expanding it.

Categories: