Solutions by Bob
Problem 1.
(Exercise 2.5.2)
Consider the following
²
NFA.
²
a
b
c
→
p
{
q,r
}
∅
{
q
}
{
r
}
q
∅
{
p
}
{
r
}
{
p,q
}
*
r
∅
∅
∅
∅
(a) Compute the
²
closure of each state.
(b) Give all the strings of length three or less accepted by the automaton.
(c) Convert the automaton to a DFA.
(a)
eclose
(
p
) =
{
p,q,r
}
eclose
(
q
) =
{
q
}
eclose
(
r
) =
{
r
}
(b) First we check
²,a,b,c
and they’re all accepted. In addition, we have
p
∈
ˆ
δ
(
p,a
) and
p
∈
ˆ
δ
(
p,c
) which means if the ﬁrst bit is
a
or
c
, we can choose to go back to start state and
start over. Hence,
a
(
a
+
b
+
c
) and
c
(
a
+
b
+
c
) are all accepted. Now we check
ba,bb,bc
and they’re all accepted.
Now we know (
a
+
b
+
c
)(
a
+
b
+
c
) (all strings of length 2) are all accepted. For the
same reason as above, we have
a
(
a
+
b
+
c
)(
a
+
b
+
c
) and
c
(
a
+
b
+
c
)(
a
+
b
+
c
) be accepted.
However, there are no ways to accept
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 '07
 Jiang

Click to edit the document details