What is the Pumping Lemma in Layman's terms?

前端 未结 9 1231
时光取名叫无心
时光取名叫无心 2021-01-29 18:47

I saw this question, and was curious as to what the pumping lemma was (Wikipedia didn\'t help much).

I understand that it\'s basically a theoretical p

9条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-29 19:41

    Basically, you have a definition of a language (like XML), which is a way to tell whether a given string of characters (a "word") is a member of that language or not.

    The pumping lemma establishes a method by which you can pick a "word" from the language, and then apply some changes to it. The theorem states that if the language is regular, these changes should yield a "word" that is still from the same language. If the word you come up with isn't in the language, then the language could not have been regular in the first place.

提交回复
热议问题