This preview shows pages 1–2. Sign up to view the full content.
Theory of Algorithms. Spring 2000. Homework 9 Solutions.
Section 8.1
(5a)
Let
L
=
±
a
n
ww
R
a
n
:
n
≥
0
,w
∈{
a, b
}
*
²
.T
h
e
n
L
is
contextfree.
In fact,
L
is just
±
ww
R
:
w
∈{
a, b
}
*
²
.
(5b)
Let
L
=
{
a
n
b
j
a
n
b
j
:
n
≥
0
,j
≥
0
}
.Th
en
L
is not contextfree.
Proof.
Assume towards a contradiction that
L
is contextfree. Let
m>
0 be given by the Context
Free Pumping Lemma. Then let
w
=
a
m
b
m
a
m
b
m
.N
o
t
i
c
et
h
a
t
w
∈
L
and

w
≥
m
.S
o
l
e
t
w
=
uvxyz
be the decomposition of
w
given by the Pumping Lemma. So

vxy
≤
m
and

vy
≥
1.
Here are some of the possibilities for what
v
and
y
look like:
(Case 1)
vxy
is a substring of the ﬁrst block of
a
’s. In this case let
i
=2
. W
ehav
e
w
2
=
uv
2
xy
2
z
=
a
m
+
k
b
m
a
m
b
m
where
k
=

vy

.S
ince
k
6
=0
,
w
2
/
∈
L
.
(Case 2)
vx
is a substring of the ﬁrst block of
a
’s, and
y
=
a
k
b
s
for some
k,s
≥
1. In this case
let
i
=2. Noticethat
w
2
/
∈
L
(
a
*
b
*
a
*
b
*
), so
w
2
/
∈
L
.
(Case 3)
v
is a substring of the ﬁrst block of
a
’s and
y
is a substring of the ﬁrst block of
b
’s. In
this case let
i
=2
. Wehave
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.
This note was uploaded on 07/17/2011 for the course MAD 3512 taught by Professor Staff during the Spring '07 term at University of Florida.
 Spring '07
 Staff

Click to edit the document details