0% found this document useful (0 votes)
51 views7 pages

cs3100 Test 1 October 12, 2004

This document is the test for CS3100 and contains 10 questions assessing regular languages and finite automata. It specifies that the test is open book and notes and neatly written answers are required. The questions cover topics such as constructing DFAs for various regular languages, proving regular language properties, minimizing DFAs, and deriving regular expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views7 pages

cs3100 Test 1 October 12, 2004

This document is the test for CS3100 and contains 10 questions assessing regular languages and finite automata. It specifies that the test is open book and notes and neatly written answers are required. The questions cover topics such as constructing DFAs for various regular languages, proving regular language properties, minimizing DFAs, and deriving regular expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

cs3100 Test 1

October 12, 2004


This test is open book and open notes.
Only the class textbook, class notes, and class assignments may be used.
Please write neatly. Unreadable answers are wrong answers
1
1. (5 marks) Give a DFA recognizing the language (0 + 1)

01.
2. (5 marks)
Give a construction showing that the regular languages are closed under
reversal. In other words, show that if L is regular then the set L
R
obtained
by reversing each string in L is also regular.
2
3. (5 marks)
Show that if L is regular, then the language
{x | x L len(x) is odd}
is regular.
4. (5 marks)
Give a regular expression for the set of all strings whose third symbol from
the left is a 1 and whose third symbol from the right is a 1.
5. (5 marks)
Suppose you have gone to work for Nefarious Spammers Inc. and your
task is to write regular expression patterns that extract email addresses
from webpages. Give a regular expression that will recognize a wide-
variety of email addresses, including those that arent valid, but become
valid when spaces are deleted, the string at is replaced by @, and the
string dot is replaced by a period (.). Thus [email protected] and
Konrad dot Slind at cs dot utah dot edu should both be detected
by your pattern.
3
6. (5 marks)
Minimize the following DFA. Show your work!
q
0
q
1
q
2
q
3
q
4
q
5
0
0
0
0
0
0
4
7. (5 marks)
Give a DFA recognizing the language (0 + 1(01

0)

1)

. Try to remove as
many superuous -transitions as possible.
5
8. (5 marks)
Give a DFA for recognizing the language of all binary strings having a
substring 00 but not ending with 01.
6
9. (5 marks)
Give a regular expression recognizing the set of all binary strings with an
even number of 1s or an odd number of 0s.
10. (5 marks)
Prove the identity 0

(0 + 1)

= (0 + 10

You might also like