CS381
First Mid Term
Monday Oct 7, 2002
Fall 2002
Olin 155
9:059;55
This is a 50 minute in class closed book exam.
All questions are straight forward and you
should have no trouble doing them.
Please show all work and write legibly.
Thank you.
1.
Write a regular expression for the set of all strings of 0’s and 1’s such that the number
of occurrences of the substring 01 is even.
Zero occurrences is even.
Argue in English that your regular expression is correct.
2.
Let
k
ij
R
be the regular expression denoting all strings that take a finite automaton from
state i to state j without going through any state numbered higher than k.
(a)
Give the formula for
k
ij
R
in terms of
l
ij
R
for l<k.
(b)
What is
the regular
expression
for
2
34
R
for
the above
state
diagram?
(c)
What is
the regular
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.
 Fall '05
 HOPCROFT
 Regular expression, Nondeterministic finite state machine, 50 minute, rij

Click to edit the document details