Pumping lemma for context-free languages

In computer science, in particular in formal language theory, the pumping lemma for context-free languages, also known as the Bar-Hillel lemma,[1] is a lemma that gives a property shared by all context-free languages and generalizes the pumping lemma for regular languages.

The pumping lemma can be used to construct a refutation by contradiction that a specific language is not context-free. Conversely, the pumping lemma does not suffice to guarantee that a language is context-free; there are other necessary conditions, such as Ogden's lemma, or the Interchange lemma.

  1. ^ Kreowski, Hans-Jörg (1979). "A pumping lemma for context-free graph languages". In Claus, Volker; Ehrig, Hartmut; Rozenberg, Grzegorz (eds.). Graph-Grammars and Their Application to Computer Science and Biology. Lecture Notes in Computer Science. Vol. 73. Berlin, Heidelberg: Springer. pp. 270–283. doi:10.1007/BFb0025726. ISBN 978-3-540-35091-0.