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

為{幸葍}努か 提交于 2019-11-28 09:22:25

The reason that finite languages work with the pumping lemma is because you can make the pumping length longer than the longest word in the language. The pumping lemma, as stated on Wikipedia (I don't have my theory of computation book with me) is the following:

Let L be a regular language. Then there exists an integer p ≥ 1 depending only on L such that every string w in L of length at least p (p is called the "pumping length") can be written as w = xyz (i.e., w can be divided into three substrings), satisfying the following conditions:

  1. |y| ≥ 1
  2. |xy| ≤ p
  3. for all i ≥ 0, xyizL

Now, consider some finite language L, and let k = maxwL |w| be the length of the longest word in L. Then I claim that the minimal pumping length for L is p = k+1. Since there are no words in L with length at least k+1, it is (vacuously) true that every such word satisfies the three conditions (or, indeed, any other condition you care to specify).

You can see that any finite language is regular, of course (regular languages are closed under finite union, and all languages of one word are regular), but note that this argument doesn't show this; it's important to remember that while any regular language can be pumped, there exist languages that can be pumped but are not regular.

"IN CONTEXT OF PUMPING LEMMA FOR REGULAR LANGUAGES "

Yes we agree, All finite languages are regular language means we can have Finite automata as well as regular expression for any finite language.
Whereas a infinite language may be regular or not. Venn-Diagram is shown below. So we need to only check for infinite language L where its regular of not!

Think about FA:

  • Any automata for a finite language can not contains loop! (also regular expressions for finite language will be without * and +operation).

  • Any automata for a infinite language(regular) will contain the loop. We can't construct an automata for infinite language without loop; where loop may be a self loop of via some other state. {If its self loop then a single symbol repeats any number of time, if via other state a sequence of symbols comes in loop can be repeat any numbers of time}.

Pumping means repeating. In pumping lemma w can be break in three parts x, y, z. The 'y' is in part of w occurs in loop (that's y>=1 ). So pumping lemma is nothing finding looping part y and repeating this looping part any numbers of time.

You can see if you repeat loop any number of times and generates new string w' its still in language.

NOTE: Regular Expressions for infinite language can't be without * and +operation!

[answer] There is no loop in an automata for finite language so we can't pump(generate by repeating) new strings in language. And Pumping Lemma is not applicable for finite language.

Although some writers also explain pumping lemma for finite language where i in xyiz can be repeat boundedly (say k ≤ i ≤ m )


In Venn-Diagram Every finite set is regular. Infinite set may be regular or not. Regular-Languages ⊆ Non-Regular Languages


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.

Finite languages are regular languages by definition because you can build a regular expression that satisfies it by just expressing the union of all the words (e.g. (abc)|(defghi) is a regular expression that satisfies your language) and consequently you can have a deterministic finite automaton that satisfies it.

Not being able to pass the pumping lemma does not means that the language is not regular. In fact, to use the pumping lemma your language must have some kind of closure in its definition. If your language is just a set of words there is nothing to "pump" in it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!