CSCI 2400  Models of Computation
Homework 3 Solutions
Problem 1 (25 points)
Give a regular expression that describes the following language:
L
=
{
a
n
b
m
:
n
+
m
= 3
k
,
k
≥
0
}
.
Solution:
(
aaa
)
*
(
aab
+
abb
+
λ
) (
bbb
)
*
Problem 2 (75 = 5x15 points)
Show that the following languages are not regular:
L
1
=
{
a
n
3
:
n
≥
0
}
Solution
L
1
:
This language can be shown to be not regular by using the pump
ing lemma, and the Proof by Contradiction proof technique.
Assume the language is regular, and attempt to find a contradiction.
For
the pumping lemma to hold, there must
∃
m
≥
1 such that
∀
w
∈
L
1
with

w
 ≥
m
, there
∃
a partition
xyz
of
w
subject to the constraints

y
 ≥
1 and

xy
 ≤
m
,
such that
∀
i
≥
0,
xy
i
z
∈
L
1
.
For any arbitrary value of
m
, let us look at the string
a
m
3
. This string is
clearly of length
≥
m
for all
m
≥
1, and it is clearly
∈
L
1
.
Further, for any arbitrary partition
xyz
of this string, let us look at the string
xy
2
z
which must be
∈
L
1
for the pumping lemma to hold.

xy
2
z

=
m
3
+
k
,
where 1
≤
k
≤
m
. The length of this string

xy
2
z

cannot equal

a
n
3

for any
n
:
m
3
<
m
3
+
k
<
(
m
+1)
3
=
m
3
+ 3
m
2
+ 3
m
+ 1
Thus
xy
2
z
negationslash∈
L
1
, which is a contradiction.
L
1
is not regular.
L
2
=
{
a
3
n
:
n
≥
0
}
Solution
L
2
:
This language can be shown to be not regular by using the pump
ing lemma, and the Proof by Contradiction proof technique.
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 '08
 CAROTHERS
 Prime number, Formal languages, 1 K, 1 j, 3 3m

Click to edit the document details