0% found this document useful (0 votes)
54 views31 pages

More Applications of The Pumping Lemma

The document provides examples of using the pumping lemma to prove that certain languages are not regular. It shows proofs for the non-regular languages L={vvR: v in {a,b}*}, L={anblcn+l: n,l ≥ 0}, and L={a: n!: n ≥ 0}. In each case, it assumes L is regular, applies the pumping lemma to obtain a contradiction, and thus concludes that L is not regular.

Uploaded by

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

More Applications of The Pumping Lemma

The document provides examples of using the pumping lemma to prove that certain languages are not regular. It shows proofs for the non-regular languages L={vvR: v in {a,b}*}, L={anblcn+l: n,l ≥ 0}, and L={a: n!: n ≥ 0}. In each case, it assumes L is regular, applies the pumping lemma to obtain a contradiction, and thus concludes that L is not regular.

Uploaded by

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

More Applications

of

the Pumping Lemma

1
The Pumping Lemma:
• Given a infinite regular language L
• there exists an integer m
• for any string w L with length | w| m

• we can write w x y z

• with | x y |  m and | y |  1

• such that: xy z  L
i i  0, 1, 2, ...
2
Non-regular languages L  {vv : v  *}
R

Regular languages

3
Theorem: The language

L  {vv : v  *}
R
  {a, b}
is not regular

Proof: Use the Pumping Lemma

4
L  {vv : v  *}
R

Assume for contradiction


that L is a regular language

Since L is infinite
we can apply the Pumping Lemma

5
L  {vvR : v  *}

Let m be the integer in the Pumping Lemma

Pick a string w such that: w L and

length | w| m

We pick wa b b a m m m m

6
Write a b b a xyz
m m m m

From the Pumping Lemma


it must be that length | x y |  m, | y | 1

m m m m
xyz  a...aa...a...ab...bb...ba...a
x y z

Thus: y  a , k 1
k
7
x y za b b a
m m m m
y  a , k 1
k

From the Pumping Lemma: xy z  L


i

i  0, 1, 2, ...

Thus: xy z  L
2

8
x y za b b a
m m m m
y  a , k 1
k

From the Pumping Lemma: xy z  L


2

m+k m m m
2
xy z = a...aa...aa...a...ab...bb...ba...a ∈ L
x y y z

m k m m m
Thus: a b b a L
9
m k m m m k 1
a b b a L

BUT: L  {vv : v  *}


R

m k m m m
a b b a L

CONTRADICTION!!!
10
Therefore: Our assumption that L
is a regular language is not true

Conclusion: L is not a regular language

11
Non-regular languages
n l n l
L  {a b c : n, l  0}

Regular languages

12
Theorem: The language
L  {a nbl cnl : n, l  0}

is not regular

Proof: Use the Pumping Lemma

13
n l n l
L  {a b c : n, l  0}

Assume for contradiction


that L is a regular language

Since L is infinite
we can apply the Pumping Lemma

14
n l n l
L  {a b c : n, l  0}
Let m be the integer in the Pumping Lemma

Pick a string w such that: w L and

length | w| m

We pick wa b c m m 2m

15
Write
m m 2m
a b c xyz

From the Pumping Lemma


it must be that length | x y |  m, | y | 1

m m 2m
xyz  a...aa...aa...ab...bc...cc...c
x y z

Thus: y  a , k 1
k
16
x y za b c
m m 2m
y  a , k 1
k

From the Pumping Lemma: xy z  L


i

i  0, 1, 2, ...

0
Thus: x y z = xz ∈ L

17
x y za b c
m m 2m
y  a , k 1
k

From the Pumping Lemma: xz  L


mk m 2m
xz  a...aa...ab...bc...cc...c  L
x z

mk m 2 m
Thus: a b c L
18
mk m 2 m k 1
a b c L

BUT: n l n l
L  {a b c : n, l  0}

mk m 2 m
a b c L

CONTRADICTION!!!
19
Therefore: Our assumption that L
is a regular language is not true

Conclusion: L is not a regular language

20
Non-regular languages L  {a : n  0}
n!

Regular languages

21
Theorem: The language L  {a : n  0}
n!

is not regular

n!  1  2  (n  1)  n

Proof: Use the Pumping Lemma

22
L  {a : n  0}
n!

Assume for contradiction


that L is a regular language

Since L is infinite
we can apply the Pumping Lemma

23
L  {a : n  0}
n!

Let m be the integer in the Pumping Lemma

Pick a string w such that: w L


length | w| m

We pick wa m!

24
Write a m!
xyz

From the Pumping Lemma


it must be that length | x y |  m, | y | 1
m m!m
xyz  a m!
 a...aa...aa...aa...aa...a
x y z

Thus: y  a , 1 k  m
k
25
x y za m!
y  a , 1 k  m
k

From the Pumping Lemma: xy z  L


i

i  0, 1, 2, ...

Thus: xy z  L
2

26
x y za m!
y  a , 1 k  m
k

From the Pumping Lemma: xy z  L


2

mk m!m
xy z  a...aa...aa...aa...aa...aa...a  L
2

x y y z

Thus: m! k
a L
27
m! k
a L 1 k  m

Since: L  {a : n  0}
n!

There must exist p such that:

m! k  p!

28
However: m! k  m! m for m 1
 m! m!
 m!m  m!
 m!(m  1)
 (m  1)!

m! k  (m  1)!

m! k  p! for any p


29
m! k 1 k  m
a L

BUT: L  {a : n  0}
n!

m! k
a L

CONTRADICTION!!!
30
Therefore: Our assumption that L
is a regular language is not true

Conclusion: L is not a regular language

31

You might also like