[英]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 constantn
such that for every stringw
inL
such that|w| >= n
存在一个常数
n
,使得L
每个字符串w
都使得|w| >= n
|w| >= n
, we can breakw
in toxyz
such thatxy*z
is also inL
.|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.