0% found this document useful (0 votes)
44 views6 pages

Pumping Lemma Problems

The document presents a series of problems demonstrating that certain languages are not regular using the pumping lemma. Each problem provides a specific language, an assumption of regularity, and a proof that leads to a contradiction, thereby confirming the language's non-regularity. Examples include languages defined by patterns of zeros and ones, palindromes, and languages based on prime numbers and perfect squares.

Uploaded by

angshu7august
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views6 pages

Pumping Lemma Problems

The document presents a series of problems demonstrating that certain languages are not regular using the pumping lemma. Each problem provides a specific language, an assumption of regularity, and a proof that leads to a contradiction, thereby confirming the language's non-regularity. Examples include languages defined by patterns of zeros and ones, palindromes, and languages based on prime numbers and perfect squares.

Uploaded by

angshu7august
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Pumping Lemma Problems

#1. Show that L= { 0n 1n | n>=0} is not


regular language.
Solution:
Let assume given L is regular language.
Let ‘w’ be string from L
w=0i1i
|w| = 2i
‘n’ is a positive integer chosen
|w|>=n
w=xyz
w=0i-j 0j 1i ; x=0i-j ; y=0j ; z=1i
|y|>0; |xy|<=n
By pumping lemma,
k=2, xy2z
=0i-j 0j 0j 1i
=0i+j 1i ∉ L, Hence the language is not
regular.
#2. Let us show that the language L
consisting of all palindrome over (0+1)* is
not regular.
Solution:
Let us assume given L is regular language.
Let ‘n’ be the positive integer.
Let w=0n10n here |w|=2n+1
x=0n-1 ; y=01 ; z=10n
|y|>0 ; |xy|<=n
By pumping lemma,
k=2,
xy2z
=0n-1 01 01 10n
=0n+1 10n ∉ L, Hence the language is
not regular.
#3. Show that L={aibjck |0≤i<j<k} is not
regular language.
Solution:
Assume given L is regular.
Let ‘n’ be the positive integer.
Let w= an bn+1 cn+2
x=an-k ; y= ak ; z= bn+1 cn+2
|y|>0 ; |xy|<=n
By pumping lemma,
k=2,
= an-k ak ak bn+1 cn+2
= an+k bn+1 cn+2 ∉ L, Hence the language
is not regular.
#4. L={anb2n|n>0} is not regular.

Solution:
Let assume L is regular.
‘n’ is positive integer
w=anb2n
|w|>=n
x=an-j
y=aj | j>0
z=b2n
|xy|<=n
By pumping lemma,
xykz, k=2
an-j aj aj b2n = an+j b2n ∉ L, Hence the
language is not regular.
#5. Show that L ={ap | p is prime number} is
not regular.
w= { aa,aaa,aaaaa,aaaaaaa,…..}
Solution:
Let assume given L is regular
Let ‘n’ be the positive integer.
Let p=r+s+t
w=ar as at ; x= ar ; y= as; z= at
1. s>0
2.|xy|<=n
3. xyp+1z
By pumping lemma,
=xypyz
= ar (as)p as at
= a (r+s+t) asp
= ap asp
=a (s+1)p ∉ L, Hence the language is
not regular.
#6. Show that L= {0n | n is a perfect square}
is not regular.
Solution:
Let assume L be regular language.
Let ‘n’ be the positive integer.
Let w=0n^2
w=xyz
|w|>=n
|xy|<=n
|y|>0
By pumping lemma, k=2
|xy2z| =|xyz|+|y|
1<=|y|<=n
=n2 + (1<=|y|<=n)
=n2+1 <= n2+|y|<=n2+n
= n2+1<=|xyz|+|y|<= n2+n
= n2+1<=|xy2z| <= n2+n
Hence the minimum and maximum length
(limits) are not perfect square, hence the
language is not regular.

You might also like