This preview shows pages 1–2. Sign up to view the full content.
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 contextfree languages are not closed under complement.
3. Prove that the contextfree languages are closed under reversal.
Hint: figure out a
scheme for generating the reverse of a CFL, and then prove that it works.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '11
 PLUMMER

Click to edit the document details