Lesson 10 Pumping Lemma
Lesson 10 Pumping Lemma
Assume L is regular.
Regular languages
R
L {vv : v *} {a, b}
is not regular
L Since is infinite
we can apply the Pumping Lemma
w
Pick a string such that:
w L and
length | w| m
m m m m
We pick
wa b b a
Courtesy Costas Busch - RPI 19
m m m m
Write
a b b a xyz
m m m m
xyz a...aa...a...ab...bb...ba...a
x y z
k
Thus:
y a , k 1 Courtesy Costas Busch - RPI 20
m m m m k
x y za b b a y a , k 1
i
From the Pumping Lemma:
xy z L
i 0, 1, 2, ...
2
Thus:
xy z L
Courtesy Costas Busch - RPI 21
m m m m k
x y za b b a y a , k 1
2
From the Pumping Lemma:
xy z L
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
Courtesy Costas Busch - RPI
L 22
m k m m m
a b b a L k 1
R
BUT: L {vv : v *}
m k m m m
a b b a L
CONTRADICTION!!!
Courtesy Costas Busch - RPI 23
Therefore: L
Our assumption that
is a regular language is not true
n l n l
L {a b c : n, l 0}
Regular languages
n l n l
L {a b c : n, l 0}
is not regular
L Since is infinite
we can apply the Pumping Lemma
w
Pick a string such that:
w L and
length | w| m
m m 2m
We pick
wa b c
Courtesy Costas Busch - RPI 28
m m 2m
Write
a b c xyz
m m 2m
xyz a...aa...aa...ab...bc...cc...c
x y z
k
Thus:
y a , k 1 Courtesy Costas Busch - RPI 29
m m 2m k
x y za b c y a , k 1
i
From the Pumping Lemma:
xy z L
i 0, 1, 2, ...
0
Thus:
x y z = xz ∈ L
Courtesy Costas Busch - RPI 30
m m 2m k
x y za b c y a , k 1
x z
mk m 2m
Thus:
a b c
Courtesy Costas Busch - RPI
L 31
mk m 2m
a b c L k 1
n l n l
BUT: L {a b c : n, l 0}
mk m 2m
a b c L
CONTRADICTION!!!
Courtesy Costas Busch - RPI 32
Therefore: Our assumption that
L
is a regular language is not true
Regular languages
n! 1 2 (n 1) n
L Since is infinite
we can apply the Pumping Lemma
w
Pick a string such that:
w L
length | w| m
m!
We pick
wa
Courtesy Costas Busch - RPI 37
m!
Write
a xyz
i
From the Pumping Lemma:
xy z L
i 0, 1, 2, ...
2
Thus:
xy z L
Courtesy Costas Busch - RPI 39
m! k
x y za y a , 1 k m
2
From the Pumping Lemma:
xy z L
mk m!m
2
xy z a...aa...aa...aa...aa...aa...a L
x y y z
m ! k
Thus:
a L
Courtesy Costas Busch - RPI 40
m! k
a L 1 k m
n!
Since:
L {a : n 0}
m! k p!
Courtesy Costas Busch - RPI 41
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!
Courtesy Costas Busch - RPI
for any
p 42
m! k 1 k m
a L
n!
BUT: L {a : n 0}
m! k
a L
CONTRADICTION!!!
Courtesy Costas Busch - RPI 43
Therefore: Our assumption that
L
is a regular language is not true