This preview shows pages 1–3. Sign up to view the full content.
Com S 381
Homework 7
Solutions
1.
L : { ww
R
 w
∈
(a+b)* } is not a regular set.
Suppose L is regular.
Then there exists a constant
n
such that for every string
w
in L such that 
w

≥
n
, we can break
w
into three strings
w = xyz
such that:
y
≠
ε
xy
≤
n
For all
k
≥
0, the string
xy
k
z
is also in L.
Let
w
be strings of the form
a
n
bba
n
.
Because 
xy

≤
n
, the substring
xy
must be
in the form a
m
,
we can pump
y
up and let
k
= 2, then the
w
becomes
a
n + y
bba
n
.
This is not in the language L, therefore we proved L not regular by the pumping
lemma.
2.
We can express this language as
C
1
∩
C
2
where,
C
1
: {a
m
b
m
c
n
d
n
 n
≥
1, m
≥
1}
Grammar:
S
→
aMbcNd
M
→
aMb 
ε
N
→
cNd 
ε
C
2
: {a*b
n
c
n
d*  n
≥
1}
Grammar:
S
→
aSd  bBc
B
→
bBc 
ε
Because C
1
forces a and b, c and d to be the same length, and C
2
forces b and c to
be the same length, the intersection of the two language has a, b, c, d all be the
same length.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document3.
We can express this language as
This is the end of the preview. Sign up
to
access the rest of the document.
 Fall '06
 HOPCROFT

Click to edit the document details