{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

13 - 13 Closure Properties of CFLs Theorem 1 CFLs are...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
13: Closure Properties of CFLs Theorem 1 CFLs are closed under 1. union, 2. concatenation, 3. Kleene Star. Proof Let G 1 = ( V 1 , Σ 1 , R 1 , S 1 ), and G 2 = ( V 2 , Σ 2 , R 2 , S 2 ) be the two CFG generating the CFLs L 1 and L 2 . Rename the nonterminals, if necessary, so that V 1 Σ 1 and V 2 Σ 2 are disjoint sets. 1. Let G = ( V 1 V 2 ∪ { S } , Σ 1 Σ 2 , R 1 R 2 ∪ { S S 1 , S S 2 } , S ). Prove that L ( G ) = L ( G 1 ) L ( G 2 ): w L ( G ) iff S G w . iff S G S 1 G w or S G S 2 G w . iff S 1 G w or S 2 G w . iff S 1 G 1 w or S 2 G 2 w , since S V 1 V 2 and ( V 1 Σ 1 ) ( V 2 Σ 2 ) = . iff w L ( G 1 ) or w L ( G 2 ). iff w L ( G 1 ) L ( G 2 ). 1
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2. Let G = ( V 1 V 2 ∪ { S } , Σ 1 Σ 2 , R 1 R 2 ∪ { S S 1 S 2 } , S ). Prove that L ( G ) = L ( G 1 ) L ( G 2 ). 3. Let G = ( V 1 ∪ { S } , Σ 1 , R 1 ∪ { S e, S SS 1 } , S ). Prove that L ( G ) = L ( G 1 ) . Note: CFLs are not closed under intersection and comple- mentation. (see next set of notes).
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern