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.
In simple terms, this theorem states that if
Let's look at an example where the pumping lemma does not hold.
Prove that
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:
Prove that
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