YOGI
YOGI
“J N A N A S A N G A M A” B E L A G A VI – 5 9 0 0 1 8
BACHELOR OF ENGINEERING
IN
INFORMATION SCIENCE AND ENGINEERING
ON
YOGESHWARAYA BS
[4GM23IS405]
Formal Statement
If L is a regular language, then there exists a positive integer p (the "pumping length")
such that for every string w in L with |w| ≥ p, w can be divided into three substrings x, y,
and z (i.e., w = xyz) satisfying the following conditions:
* |y| > 0: The substring y is not empty.
* |xy| ≤ p: The combined length of x and y is at most p.
* For all i ≥ 0, xy<sup>i</sup>z ∈ L: The string w can be "pumped" by repeating y any
number of times (including zero times), and the resulting string will still be in L.
Example
Let's prove that the language L = {a<sup>n</sup>b<sup>n</sup> | n ≥ 0} is not regular
using the pumping lemma.
* Assume L is Regular: Assume L is regular.
* Choose a Pumping Length: Let p be the pumping length.
* Select a String: Choose w = a<sup>p</sup>b<sup>p</sup>.
* Divide the String: According to the pumping lemma, w can be divided into x, y, and z
such that |xy| ≤ p and |y| > 0. Since |xy| ≤ p, y must consist only of as.
* Pump the String: Let i = 0. Then, xy<sup>0</sup>z = xz = a<sup>p-
|y|</sup>b<sup>p</sup>.
* Show that xy<sup>i</sup>z ∉ L: Since y consists only of as, xz has fewer as than bs.
Therefore, xz ∉ L, which contradicts the pumping lemma.
This contradiction proves that our initial assumption (L is regular) is false. Hence, L =
{a<sup>n</sup>b<sup>n</sup> | n ≥ 0} is not a regular language.
Key Points
* The pumping lemma is a powerful tool for proving that a language is not regular.
* It cannot be used to prove that a language is regular.
* The choice of the string w is crucial for a successful proof.
By understanding and applying the pumping lemma, you can effectively analyze the
properties of formal languages and determine their regularity.
3
4