6.045J Lecture 5: Non-regular languages and the pumping lemma
More Applications of the Pumping Lemma
description
Transcript of More Applications of the Pumping Lemma
![Page 1: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/1.jpg)
Fall 2006 Costas Busch - RPI 1
More Applications
of
the Pumping Lemma
![Page 2: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/2.jpg)
Fall 2006 Costas Busch - RPI 2
The Pumping Lemma:
• Given a infinite regular language L
• there exists an integer (critical length)m
• for any string with length Lw mw ||
• we can write zyxw
• with andmyx || 1|| y
• such that: Lzyx i ...,2,1,0i
![Page 3: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/3.jpg)
Fall 2006 Costas Busch - RPI 3
Regular languages
Non-regular languages *}:{ vvvL R
![Page 4: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/4.jpg)
Fall 2006 Costas Busch - RPI 4
Theorem:The language
is not regular
Proof: Use the Pumping Lemma
*}:{ vvvL R },{ ba
![Page 5: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/5.jpg)
Fall 2006 Costas Busch - RPI 5
Assume for contradictionthat is a regular languageL
Since is infinitewe can apply the Pumping Lemma
L
*}:{ vvvL R
![Page 6: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/6.jpg)
Fall 2006 Costas Busch - RPI 6
mmmm abbaw We pick
Let be the critical length for
Pick a string such that: w Lw
mw ||length
m
and
*}:{ vvvL R
L
![Page 7: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/7.jpg)
Fall 2006 Costas Busch - RPI 7
we can write: zyxabbaw mmmm
with lengths:
From the Pumping Lemma:
ababbabaaaaxyz ..................
x y z
m m m m
1||,|| ymyx
mkay k 1,Thus:
w
![Page 8: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/8.jpg)
Fall 2006 Costas Busch - RPI 8
From the Pumping Lemma: Lzyx i
...,2,1,0i
Thus: Lzyx 2
mmmm abbazyx mkay k 1,
![Page 9: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/9.jpg)
Fall 2006 Costas Busch - RPI 9
From the Pumping Lemma:
Lababbabaaaaaazxy ∈.....................=2
x y z
km + m m m
y
Lzyx 2
Thus:
mmmm abbazyx
Labba mmmkm
mkay k 1,
![Page 10: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/10.jpg)
Fall 2006 Costas Busch - RPI 10
Labba mmmkm
Labba mmmkm
BUT:
CONTRADICTION!!!
1k
*}:{ vvvL R
![Page 11: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/11.jpg)
Fall 2006 Costas Busch - RPI 11
Our assumption thatis a regular language is not true
L
Conclusion: L is not a regular language
Therefore:
END OF PROOF
![Page 12: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/12.jpg)
Fall 2006 Costas Busch - RPI 12
Regular languages
Non-regular languages
}0,:{ lncbaL lnln
![Page 13: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/13.jpg)
Fall 2006 Costas Busch - RPI 13
Theorem:The language
is not regular
Proof: Use the Pumping Lemma
}0,:{ lncbaL lnln
![Page 14: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/14.jpg)
Fall 2006 Costas Busch - RPI 14
Assume for contradictionthat is a regular languageL
Since is infinitewe can apply the Pumping Lemma
L
}0,:{ lncbaL lnln
![Page 15: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/15.jpg)
Fall 2006 Costas Busch - RPI 15
mmm cbaw 2We pick
Let be the critical length of
Pick a string such that: w Lw
mw ||length
m
}0,:{ lncbaL lnln
and
L
![Page 16: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/16.jpg)
Fall 2006 Costas Busch - RPI 16
We can write zyxcbaw mmm 2
With lengths
From the Pumping Lemma:
cccbcabaaaaaxyz ..................
x y z
m m m2
1||,|| ymyx
Thus:
w
mkay k 1,
![Page 17: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/17.jpg)
Fall 2006 Costas Busch - RPI 17
From the Pumping Lemma: Lzyx i
...,2,1,0i
Thus:
mmm cbazyx 2
Lxzzyx ∈=0
mkay k 1,
![Page 18: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/18.jpg)
Fall 2006 Costas Busch - RPI 18
From the Pumping Lemma:
Lcccbcabaaaxz ...............
x z
km m m2
mmm cbazyx 2
Lxz
Thus: Lcba mmkm 2
mkay k 1,
![Page 19: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/19.jpg)
Fall 2006 Costas Busch - RPI 19
Lcba mmkm 2
Lcba mmkm 2
BUT:
CONTRADICTION!!!
}0,:{ lncbaL lnln
1k
![Page 20: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/20.jpg)
Fall 2006 Costas Busch - RPI 20
Our assumption thatis a regular language is not true
L
Conclusion: L is not a regular language
Therefore:
END OF PROOF
![Page 21: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/21.jpg)
Fall 2006 Costas Busch - RPI 21
Regular languages
Non-regular languages }0:{ ! naL n
![Page 22: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/22.jpg)
Fall 2006 Costas Busch - RPI 22
Theorem:The language
is not regular
Proof: Use the Pumping Lemma
}0:{ ! naL n
nnn )1(21!
![Page 23: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/23.jpg)
Fall 2006 Costas Busch - RPI 23
Assume for contradictionthat is a regular languageL
Since is infinitewe can apply the Pumping Lemma
L
}0:{ ! naL n
![Page 24: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/24.jpg)
Fall 2006 Costas Busch - RPI 24
!mawWe pick
Let be the critical length of
Pick a string such that: w Lw
mw ||length
m
}0:{ ! naL n
L
![Page 25: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/25.jpg)
Fall 2006 Costas Busch - RPI 25
We can write zyxaw m !
With lengths
From the Pumping Lemma:
aaaaaaaaaaaxyz m ...............!
x y z
m mm !
1||,|| ymyx
mkay k 1,Thus:
w
![Page 26: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/26.jpg)
Fall 2006 Costas Busch - RPI 26
From the Pumping Lemma: Lzyx i
...,2,1,0i
Thus:
!mazyx
Lzyx 2
mkay k 1,
![Page 27: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/27.jpg)
Fall 2006 Costas Busch - RPI 27
From the Pumping Lemma:
Laaaaaaaaaaaazxy ..................2
x y z
km mm !
Thus:
!mazyx mkay k 1,
Lzyx 2
y
La km !
![Page 28: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/28.jpg)
Fall 2006 Costas Busch - RPI 28
La km !
!! pkm
}0:{ ! naL nSince:
mk 1
There must exist such that: p
![Page 29: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/29.jpg)
Fall 2006 Costas Busch - RPI 29
However:
)!1(
)1(!
!!
!!
!
m
mm
mmm
mm
mmkm ! for 1m
)!1(! mkm
!! pkm for any p
![Page 30: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/30.jpg)
Fall 2006 Costas Busch - RPI 30
La km !
La km !
BUT:
CONTRADICTION!!!
}0:{ ! naL n
mk 1
![Page 31: More Applications of the Pumping Lemma](https://reader030.fdocuments.net/reader030/viewer/2022033017/56814583550346895db26092/html5/thumbnails/31.jpg)
Fall 2006 Costas Busch - RPI 31
Our assumption thatis a regular language is not true
L
Conclusion: L is not a regular language
Therefore:
END OF PROOF