简体   繁体   English

普通语言L有无限的单词吗?

[英]Is any regular language L has infinite words?

This is weird but by pumping lemma, say 这很奇怪,但是说出引理

Let L be a regular language. L为常规语言。 There exists a constant n such that for every string w in L such that |w| >= n 存在一个常数n ,使得L每个字符串w都使得|w| >= n |w| >= n , we can break w in to xyz such that xy*z is also in L . |w| >= n ,我们可以将w分解为xyz这样xy*z也在L

This lemma is strong because it argues for all regular languages. 这个引理很强,因为它支持所有常规语言。 But what if the regular language L = a ? 但是,如果常规语言L = a怎么办? There is only one word ( a ) in it. 其中只有一个字( a )。 How the pumping lemma works for this case? 在这种情况下抽引引理如何工作?

If n = 2 then it is vacuously true that any w in L with |w| >= n 如果n = 2那么L中的任何w都具有|w| >= n完全是虚假的|w| >= n |w| >= n satisfies the conclusion of the pumping lemma. |w| >= n满足泵引理的结论。 No words in L are long enough to serve as counterexamples. L中没有任何单词足以用作反例。 More generally, if L is any finite language then L satisfies the pumping lemma: just take n to be greater than the length of the longest word in L . 更一般而言,如果L是任何有限的语言,则L满足泵激引理:只要使n大于L最长单词的长度即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM