CS 181 — Winter 2007
Formal Languages and Automata Theory
Problem Set #1 Solutions
Problem 1.1.
a.
Show that Σ
1
⊆
Σ
2
implies Σ
*
1
⊆
Σ
*
2
. Is the converse true?
Solution
By deﬁnition, the language Σ
*
consists of all words over the alphabet Σ. Equivalently, every
word
w
∈
Σ
*
can be written as
w
=
w
1
w
2
···
w
n
where each
w
i
∈
Σ. We can use this deﬁnition
to prove the statement as follows:
Assume that Σ
1
⊆
Σ
2
. Fix
w
∈
Σ
*
1
. Then, by the deﬁnition of Σ
*
1
, we can write
w
=
w
1
w
2
w
n
where each
w
i
∈
Σ
1
. But since Σ
1
⊆
Σ
2
, we also have that each
w
i
∈
Σ
1
⊆
Σ
2
.
Since we can write
w
=
w
1
w
2
w
n
where each
w
i
∈
Σ
2
, it follows that
w
∈
Σ
*
2
. Notice our
choice of
w
was arbitrary, so we can conclude that Σ
1
⊆
Σ
2
.
Intuitively, what we have shown is the following: If all symbols in an alphabet Σ
1
appear in a
larger alphabet Σ
2
, then any word we can write using symbols in Σ
1
we can also write using
those same symbols in Σ
2
.
The converse of the statement reads as follows: Σ
*
1
⊆
Σ
*
2
implies Σ
1
⊆
Σ
2
. It turns out that
this statement is also true! The proof is as follows:
Let Σ
*
1
⊆
Σ
*
2
. Assume, by way of contradiction, that Σ
1
6⊆
Σ
2
. In particular, there exists a
symbol
σ
∈
Σ
1
such that
σ /
∈
Σ
2
. Now, consider the word consisting of just on symbol,
σ
.
Clearly,
σ
∈
Σ
*
1
since
σ
∈
Σ
1
. However, since
σ /
∈
Σ
2
, we know
σ /
∈
Σ
*
2
. Thus, there exists
some word in Σ
*
1
and doesn’t appear in Σ
*
2
. This contradicts the fact that Σ
*
1
⊆
Σ
*
2
. We can
thus conclude that Σ
1
⊆
Σ
2
.
b.
Let (
Q,
Σ
,δ,q
0
,F
) be an FA. Deﬁne
ˆ
δ
:
Q
×
Σ
*
→
Q
by induction as follows:
ˆ
δ
(
q,±
)
=
q
ˆ
δ
(
q,w.a
) =
δ
(
ˆ
δ
(
q,w
)
,a
)
where
w
∈
Σ
*
and
a
∈
Σ. Argue (using induction) that a word
w
∈
Σ
*
is accepted iﬀ
ˆ
δ
(
q
0
,w
)
∈
F
.
Solution
Recall that a FA (
Q,
Σ
0
) accepts a word
w
=
w
1
w
2
w
n
if there exists a sequence of
states
r
0
,r
1
,...,r
n
∈
Q
such that
(1)
r
0
=
q
0
,
(2)
r
i
+1
=
δ
(
r
i
i
+1
) for
i
= 0
,...,n

1, and
(3)
r
n
∈
F
.