Assignment 1: solution set
Jalaj Upadhyay
1
Question 1
Let
M
:= (Σ
, Q, S, F, δ
)
be an automaton defined over the alphabet set
Σ
using the transition table
δ
,
where
S
is the set of the starting states,
Q
is the set of all states, and
F
is the set of accepting states. For this
question, we assume
Σ =
{
0
,
1
}
.
(a)
Q
:=
{
q
0
, q
1
}
,
S
:=
{
q
0
}
and
F
=
Q
.
δ
(
q
0
,
0) =
q
0
,
δ
(
q
0
,
1) =
q
1
, and
δ
(
q
1
,
1) =
q
1
.
In order to prove the correctness of the above NFA, we prove both the direction. First, to see that all
words in
L
are accepted by
L
(
M
)
, note that we can break
L
as a union of
∪
0
+
∪
1
+
∪
0
+
1
+
. The first part
of this union is trivial, the second part is accepted by
F
=
q
0
, the third part by a transition from
q
0
to
q
1
and
then staying thereafter in
q
1
. For the last part, we first loop in
q
0
and then make a transition of the previous
form on seeing the first
1
.
To show the converse, we prove the contrapositive. Any words in the complement of
L
has a substring
of the form
10
. Now, notice that once the NFA is fed in
1
, it moves to
q
1
, hence forth any encounter with
0
will result in crashing of NFA. Hence, if
w
∈
¯
L
, it is not accepted by
M
, proving the result.
(b)
Q
:=
{
q
0
, q
1
, q
2
, q
3
, q
4
, q
5
}
,
S
:=
{
q
0
}
and
F
=
{
q
2
, q
5
}
. The transition table is as follows:
δ
(
q
0
,
0) =
q
1
δ
(
q
0
,
1) =
q
3
δ
(
q
1
,
0) =
q
2
δ
(
q
1
,
1) =
q
4
δ
(
q
2
,
0) =
q
2
δ
(
q
2
,
0) =
q
5
δ
(
q
3
,
0) =
q
4
δ
(
q
4
,
0) =
q
5
δ
(
q
5
,
0) =
q
5
.
Note that there is encountering a
0
, we make a transition to the next state, except when we are in the
accepting states. Also, when there is a
1
, we make a transition from
q
i
to
q
i
+3
for
i
=
{
0
,
1
}
. This will be
useful in proving the correctness.
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.
 Winter '08
 JohnWatrous

Click to edit the document details