Lecture 38
-
Upload
wade-carson -
Category
Documents
-
view
7 -
download
0
description
Transcript of Lecture 38
![Page 1: Lecture 38](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812e73550346895d941339/html5/thumbnails/1.jpg)
1
Lecture 38
• Showing CFL’s not closed under set intersection and set complement
![Page 2: Lecture 38](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812e73550346895d941339/html5/thumbnails/2.jpg)
2
Nonclosure Properties for CFL’s
![Page 3: Lecture 38](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812e73550346895d941339/html5/thumbnails/3.jpg)
3
CFL’s not closed under set intersection
• How do we prove that CFL’s are not closed under set intersection?– State closure property as IF-THEN statement
• If L1 and L2 are CFL’s, then L1 intersect L2 is a CFL
– Proof is by counterexample• Find 2 CFL’s L1 and L2 such that L1 intersect L2 is
NOT a CFL
![Page 4: Lecture 38](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812e73550346895d941339/html5/thumbnails/4.jpg)
4
Counterexample
• What is a possible L1 intersect L2?
– What non-CFL languages do we know?
• What could L1 and L2 be?
– L1 =
– L2 =
– How can we prove that L1 and L2 are context-free?
![Page 5: Lecture 38](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812e73550346895d941339/html5/thumbnails/5.jpg)
5
CFL’s not closed under complement
• How can we prove that CFL’s are not closed under complement?– We could do the same thing, find a
counterexample– Another way
• Use fact that any language class which is closed under union and complement must also be closed under intersection
![Page 6: Lecture 38](https://reader035.fdocuments.us/reader035/viewer/2022080916/56812e73550346895d941339/html5/thumbnails/6.jpg)
6
Language class hierarchy
All languages over alphabet
RE
REG
HH
EqualCFLREC
Equal-3