Theory of Computing
Homework 3
CS 3810, Fall 2009
Due Friday, September 18
Each problem should be submitted on a separate piece of paper.
Please put your netid on your
homework!
1.
Describe the set
{
}
{
}
{
}
{
}
2
2
0 10 1
1 *
0*1
01 0 10 1
1 *
0*1
n
n
n
n
n
n
ε
≥
+
≥
+
I
.
Why did we add
the term
{
}
0*1
+
to the two subexpressions?
2.
a)
Write a regular expression for all strings of 0’s and 1’s having an even number of 0’s.
Does every string denoted by your expression have an even number of 0’s?
Is every string
with an even number of 0’s included in your regular expression?
b)
Write a regular expression for all strings of 0’s and 1’s in which all 0’s occur before any
1’s.
c)
Write a regular expression for all strings of 0’s and 1’s that are of odd length.
3.
a)
Write a regular expression for all strings of 0’s and 1’s in which the total number of zeros
to the right of each 1 is even.
b)
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.
 Fall '07
 HOPCROFT

Click to edit the document details