To make sure: Pumping lemma for infinite regular languages only?

前端 未结 4 684
囚心锁ツ
囚心锁ツ 2020-12-09 21:19

So this is not about the pumping lemma and how it works, it\'s about a pre-condition.

Everywhere in the net you can read, that regular languages must pass the pumpin

4条回答
  •  伪装坚强ぢ
    2020-12-09 21:45

    There's a simplest way to show that some language is infinite. Assume that L is the language for some regular expression E, L(E).

    Suppose L(E) is equivalent to {ab^nc | n ≥ 0}.

    We know that E is in the form ab*c, and we know this language is probably regular(we can't prove something be regular), since the pumping lemma this conclusion is k = 0, put in another way, xz = ac, and every regular expression has an equivalent automaton.

    The conclusion is simple, if the DFA has some state with transition to itself, the language is infinite.

         a   b   c
    
     q0  q1    
     q1     q1  q2
    *q2         
    

    q1 has transition to itself, thus L(E) is infinite.

提交回复
热议问题