This preview shows pages 1–2. Sign up to view the full content.
Automata and Formal Languages
(60
points)
Sample Solutions
Problem
1.
[lo
points]
Consider the language
L
defined by the regular expression 00*10. Provide a PDA
M
for this
language using
as few states as possible.
Note that there is a PDA with only
1
state and
that the number of points you get will depend on the number of states used in your solution.
Solution:
The following PDA with only
1
state accepts the language L(00*10) by empty stack. The
PDA has the following components:
Q
=
{q),
C
=
{0,1),
I'
=
{Zo,
X,
Y),
qo
=
q, and
F
=
1).
The transition function is as follows:
Problem
2.
[18
points]
Decide whether the following statements are
TRUE
or
FALSE.
You will receive
3 points for
each correct answer and
2 points for each incorrect answer.
I. If
L1
and
Lp
are both nonregular, then
L1
n
L2
must be nonregular.
2.
L
=
{w E
{a, b,
c)*
I
w does not contain an equal number of occurrences of a,
b,
and c)
is contextfree.
3.
Let
L
represent the language of a nondeterministic finitestate automaton
N;
then,
swapping the final and nonfinal states of
N
gives a machine
N'
whose language is the
complement of
L.
4.
Assume that P
#
NP. If
L1
is in P and
L2
is in NP, then
L1
n
L2
must be in
P
5.
If
L1
and
L2
are both in NP, then
L1.L2
must be in NP.
6.
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.
 '08
 Motwani,R

Click to edit the document details