What is pumping lemma?
Pumping lemma for regular languages
The pumping lemma is a property of a
Regular languages always satisfy the pumping lemma. However, if the pumping lemma is satisfied, the language does not need to be regular.
Note: This is only useful for infinite languages since all finite languages are regular.
Theorem
In simple terms, this theorem states that if
(length of + length of is ) ( , can be null, but cannot be null, and the length of )
Let's look at an example where the pumping lemma does not hold.
Example
Prove that
Applying Pumping lemma
Step 1: Assume that
Step 2: Taking a string s with
Step 3: Dividing s into
Case 1:
Case 2: y gets only
Case 3: y gets some
Step 4: Pumping the
Case 1:
Case 2:
Case 3:
Because there is a contradiction in every case, we conclude that
Now, let's look at an example where the pumping lemma holds:
Example
Prove that
Applying pumping lemma
Step 1: Suppose that
Step 2: Take a string
Step 3: Divide
Step 4: Pump the
As the new string still ends with
Free Resources