2
1
2
1
L
L
L
L
∩
=

2
L
Chapter 4, Section 1
2. Use the construction in Theorem 4.1 to find nfa’s that accept
(We can save time, by allowing nfa’s as long as there are no multiple arcs.
Missing arcs are OK, with the
understanding that a dfa would go to a trap state, the corresponding intersection would also, and we just leave
out the arc.)
a)
L
((
a
+
b
)
a
*)
∩
L
(
baa
*)
In part b) the intersection states Q
12
, Q
13
, Q
22
and Q
23
would be accepting states if they are necessarily drawn.
b)
L
(
ab
*
a
*)
∩
L
(
a
*
b
*
a
)
3. Give a constructive proof that the regular languages are closed under set difference.
Since we know that
we use a similar construction as was used in problem 2.
First find dfa’s
for
L
1
and
L
2
.
From
the dfa for
L
2
, construct a dfa for the complement of
L
2
.
Then use the
construction as shown in problem 2 to find the intersection machine.
6. The symmetric difference of two sets is merely (
S
1
∪
S
2
) – (
S
1
∩
S
2
).
By all the previous results with regard
to union, intersection and difference, the regular languages must be closed under symmetric difference.
Chapter 4, Section 2
1.
Show that there exists an algorithm to determine whether or not
w
∈
L
1
–
L
2
for all strings
w
and any regular
languages
L
1
and
L
2
.
We have seen in problem 3 in section 4.1 that we can build a dfa for
L
1
–
L
2
if these two languages are regular.
Do so.
Now feed any string
w
into this constructed machine.
See whether accepted or not accepted.
2.
Show that there exists an algorithm to determine
L
1
⊆
L
2
for any regular languages
L
1
and
L
2
.
L
1
⊆
L
2
means that no element in
L
1
is not in
L
2
.
This can be written as
L
1
∩
=
φ
.
Construct a machine for
this intersection as in problem 1.
Apply the algorithm of Theorem 4.6 to determine if the language accepted by
this machine is empty.
3.
Show that there is an algorithm for determining if
λ
∈
L
, for any regular language
L
.
Construct a dfa for
L
.
λ
∈
L
if and only if the initial state of this machine is an accepting state.
5.
A language is said to be a palindrome language if
L
=
L
R
.
Find an algorithm for determining if a regular
language is a palindrome language.
a
a
q
0
a,b
b
a
q
1
p
0
p
2
p
1
Q
00
Q
11
Q
12
Q
00
Q
13
Q
11
a
a
b
a
b
b
a
a
a
b
q
0
q
2
q
1
p
0
p
1
p
2
a
a
b
p
3
a
a
a
a
Q
23
Q
22
b
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentFind an nfa for
L
that contains only one accepting state.
Reverse all the arcs on that machine and make the
intial state the accepting state and the accepting state the initial state.
Convert this machine into a dfa.
This dfa
accepts
L
R
.
Use the algorithm that determines if two regular languages are equal to see if
L
is a palindrome
language.
Chapter 4, Section 3
3.
Show that the language
L
= {
w
:
n
a
(
w
) =
n
b
(
w
)} is not regular.
Is
L
* regular?
Here is a perfect example of how we can use the Pumping Lemma to prove that a language is not regular.
The
idea is this.
The Pumping Lemma states that for any regular language there is a value
m
(which we
affectionately refer to as the “magic number”) so that if you pick any string of the language with a length
greater than
m
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 Icamarra
 Formal languages, Regular expression, Regular language, Pumping lemma for regular languages, Pumping Lemma

Click to edit the document details