Transcript PPT
Homework 1 Solution: Problem 3.6
Problem 3.6 (a) – page 147
CSE4100
0(0|1)*0 - describes all strings over the alphabet
={0,1} of length at least two that both begin
and end with the character 0
Problem 3.6 (b) – page 147
((|0)1*)* - describes all strings over the alphabet
={0,1}. It is equivalent to the regular
expression (0|1)*.
Problem 3.6 (c) – page 147
(0|1)*0(0|1)(0|1) - describes all strings over the
alphabet ={0,1} of length at least three, where
the third character from the end of the string is
a 0.
ANN.1
Homework 1 Solution – Problem 1
CSE4100 1a:
Accepts either one “a” or zero or more “b”s
followed by a c.
1b:
Accepts either one or more “ab” followed by a
c or one “b” followed by zero or more a’s
1c:
No Answer Provided …
ANN.2
Homework 1 Solution – Problem 2
CSE4100
2a:
2b:
(1|00)*
cons = {b, c, d, e, f ,,, y, z}
vow = {a, e, i, o, u}
ANS = cons* (vow | epsilon) cons*
ANN.3
Homework 1 Solution: 3.16a and 3.17a
a
2
CSE4100
0
3
1
6
b
4
7
5
b
0, 1, 2, 4, 7
1, 2, 4, 5, 6,
7
b
a
a
1, 2, 3, 4, 6,
7,
a
ANN.4
b
Homework 1 Solution: 3.16d and 3.17d
a
12
CSE4100
11
14
b
9
0
a
4
b
17
15
8
3
a
1
16
b
2
10
13
b
5
6
7
Try Yourself:
DFA for 3.17d Should
have a total of 7 states
ANN.5