35+PS6 - Handout #35 May 2, 2011 CS103 Robert Plummer...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Handout #35 CS103 May 2, 2011 Robert Plummer Problem Set #6—Due Monday, May 9 in class 1. (a) Give a CFG for the language L 1 = {w | w {0, 1}* and w does not contain the substring 01} (b) Give a CFG for the language L 2 = {a n b m | n < m}. (c) Give a CFG for the language L 3 = {a n b m | n m}. 2. In PS5, the first #9, we defined the complement of a language L over an alphabet to be the language of all strings over that are not in L. Using Sipser's notation of an overbar for complement, we could express this as L = * - L. (a) Prove that if L 1 and L 2 are languages over , then L 1 L 2 = (L 1 L 2 ) You do not have to give a detailed set equality proof. Just argue why the language on the right is the same as the one on the left. (b) Show that context-free languages are not closed under complement. 3. Prove that the context-free languages are closed under reversal. Hint: figure out a scheme for generating the reverse of a CFL, and then prove that it works.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

35+PS6 - Handout #35 May 2, 2011 CS103 Robert Plummer...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online