简体   繁体   中英

Is any regular language L has infinite words?

This is weird but by pumping lemma, say

Let L be a regular language. There exists a constant n such that for every string w in L such that |w| >= n |w| >= n , we can break w in to xyz such that xy*z is also in L .

This lemma is strong because it argues for all regular languages. But what if the regular language L = a ? There is only one word ( a ) in it. How the pumping lemma works for this case?

If n = 2 then it is vacuously true that any w in L with |w| >= n |w| >= n satisfies the conclusion of the pumping lemma. No words in L are long enough to serve as counterexamples. 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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