CS 381 Homework 6 Solutions
1.
L = L0
∩
L1
=
{ w#w(0 + 1)#  w
(0 + 1)
*
}
Describe the set L
*
∩
0#L*(0+1)
*
:
L
*
∩
0#L
*
(0+1)
*
is the set
{ 0 # w
0
# w
1
# w
2
# … # w
2n
# , where w
0
= 0(0+1), w
n
= w
n1
(0+1), and n>=0 }
This is another alternating blocks problem.
Each block forces the next block to equal
w(0+1), and the string must start with 0# due to the right side of the intersection.
Modify the set so that it has an odd number of blocks:
L
*
(0 + 1)
*
#
∩
0#L
*
Since each instance of L has 2 blocks, this set is guarenteed to have an odd number of
blocks.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
CS381, Homework #6 Solutions
Question 4.1.1
Prove that the language of balanced parenthesis is not regular
Proof by the Pumping Lemma: Suppose we select
w
from
L
such that
w
= (
n
)
n
where n is the n from the pumping lemma. Now we know that
xy can only contain opening parenthesis since

xy
 ≤
n
.
When we pump
on this string its easy to see that we will only increase the number of open
ing parenthesis, and since the pumped string contains a different number of
opening and closing parenthesis, they cannot possibly be balanced.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '05
 HOPCROFT
 Formal languages, Regular expression, Regular language, Pumping lemma for regular languages

Click to edit the document details