Professional Documents
Culture Documents
TOC - Pumping Lemma App
TOC - Pumping Lemma App
Note: Pumping lemma is a technique to identify the class of language for finite automata (FA).
Solution:
Let L be a regular language and any string w = apbp, w ∊ L.
Now, according to the pumping lemma of regular set, ‘w’ can be decomposed into x, y, and z
as:
x = aq
y = ar (r >0)
z = ap-(q+r)bp, where w = xyz ∊ L
Here, our assumption w ∊ L contradict with our result obtained. Hence, language L = {anbn :
n > 0 } is not regular.
Note: In the decomposition of the string, we must decompose the first symbol for the first and
second string and then put all remaining parts on the final string.
Solution:
Let L be a regular language and x = anbn then any string w = anbnanbn, w ∊ L.
Now, according to the pumping lemma of regular set, ‘w’ can be decomposed into the strings
r, s, and t as:
r = al
s = am (r >0)
t = an-(l+m)bnanbn, where w = rst ∊ L
Here, our assumption w ∊ L contradict with our result obtained. Hence, language L = {xx : x
∊ (0, 1)*} is not regular.
Solution:
Here, we have to show that the pumping lemma does not hold for L. Thus, consider any
pumping number p ≥ 1.
Now, choose w = ap2
Theory of Computation - Compiled by Yagya Raj Pandeya, NAST, Dhangadhi ©yagyapandeya@gmail.com Page 1
Here, our assumption w ∊ L contradict with our result obtained. Hence, language L = {ai2 : i ≥
1} is not regular.
Solution:
Here, we can write, L = a2n = a(a2)ia, i ≥ 0 [As i = 0, L = aa and i = 1, L = a(a2)ia]
Now, let a2 = p
Hence, L = ap*a, which can be represented by finite automata as given below:
Theory of Computation - Compiled by Yagya Raj Pandeya, NAST, Dhangadhi ©yagyapandeya@gmail.com Page 2