COT 3100 Homework # 6 Solutions
Fall 2000
1)
Give regular expressions for each of the following languages: (Note: each language is
over the alphabet L = {a,b}
a)
The language of all strings containing the substring ab.
(a
∪
b)*ab(a
∪
b)*
b)
The language of all strings of length
≥
3.
(a
∪
b) (a
∪
b) (a
∪
b) (a
∪
b)*
c)
The language of all strings with exactly 3 b’s.
a*ba*ba*ba*
d)
The set of all strings where every
a is followed by 3 or more b’s.
b*(abbbb*)*
2)
Create a DFA to recognize the following languages over the alphabet L = {a,b}.
In each of these solns, the start state will be q0. Each final state will be
underlined. A self loop will be designated by the letter right above or below the
appropriate state.
a)
The language of all strings of odd length.
a,b
q0 > q1
<
a,b
b)
The language of all strings that contain exactly 2n a’s where n is an integer.
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 '09
 #, TW, abaaabbba, string x∈ TW

Click to edit the document details