Professional Documents
Culture Documents
a)
b)
c)
d)
e)
f)
ba
bbbaaabbb
aabaabb
aabb
abaaba
abab
0,1
1
0,1
T
3.1) (3 points) How many states are there in an equivalent minimal nite
state automaton?
3.2) (3 points) How many accepting states are there in an equivalent minimal
nite state automaton?
3.3) (2 points) Which of the following regular expressions describes the language recognized by this automaton? (a) (0 1) (b) ((0 1)(0 1)) (c)
0 1 (d) 1 0 (e) (01) (f) (10) (g) None of these.
For the following question, choose the best answer.
4. (4 points) The language {an bm : m = 2n} is
a) nite
b) regular
c) context-free but not regular
d) not context free
5. (4 points) Which of the following is a method for showing that a language
L is not regular?
a) Constructing a nite state automaton recognizing L
b) Showing that the relation L has innitely many equivalence classes.
c) Constructing a push-down automaton recognizing L
d) Showing that the opponent can always win the regular expression game
for L.
2
7. (6 points) Consider the language L = {(aa)m c(bb)n : m, n 0}. This language contains the strings c, aacbb, aaaacbb, et cetera. Consider the following
theorem and proof:
Theorem: L is not regular.
Proof: We show that in the regular expression game, A (the opponent)
can always win. Suppose A picks the integer N = 50, B picks any string
(aa)m c(bb)n of length larger than 50, then if m 1 A picks x = e, y = aa,
z = (aa)m1 c(bb)n . Now whatever value of i B picks, the string xy i z is in L
because xy i z is (aa)i (aa)m1 c(bb)n . If m = 0 then (because the string has
length larger than 50), n 1 and A picks x = c, y = bb, and z = (bb)n1 .
This is possible because n 1. Whatever value of i B picks, the string xy i z
is in L because xy i z is c(bb)i (bb)n1 . Therefore the opponent (A) can always
win, so L is not regular.
Is the proof correct? Justify your answer.
8. (4 points) Among the following statements, write the letters of all correct
statements here:
a) The language {am bn cp dq : m + n = p + q} is context-free.
b) The union of innitely many context-free languages is context-free.
c) The language {am bcn : m = n} is regular.
d) The language {ai bj ck dck bj ai : i, j, k 0} is context free.
9. EXTRA CREDIT (5 points) Consider the language L = {x {a, b, c} :
x has at least three as, three bs, and three cs}. How many states are there
in a minimal deterministic nite automaton recognizing L? If you think L is
not regular, answer 0 (zero).
3