What is the Pumping Lemma in Layman's terms?

前端 未结 9 1227
时光取名叫无心
时光取名叫无心 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:23

    Its a difficult thing to get in layman's terms, but basically regular expressions should have a non-empty substring within it that can be repeated as many times as you wish while the entire new word remains valid for the language.

    In practice, pumping lemmas are not sufficient to PROVE a language correct, but rather as a way to do a proof by contradiction and show a language does not fit in the class of languages (Regular or Context-Free) by showing the pumping lemma does not work for it.

提交回复
热议问题