homework 1 solution: problem 3.6
DESCRIPTION
Homework 1 Solution: Problem 3.6. Homework 1 Solution – Problem 1. 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 …. - PowerPoint PPT PresentationTRANSCRIPT
ANN.1
CSE4100
Homework 1 Solution: Problem 3.6Homework 1 Solution: Problem 3.6
Problem 3.6 (a) – page 147
0(0|1)*0 - describes all strings over the alphabet={0,1} of length at least two that both beginand 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 regularexpression (0|1)*.
Problem 3.6 (c) – page 147
(0|1)*0(0|1)(0|1) - describes all strings over thealphabet ={0,1} of length at least three, wherethe third character from the end of the string isa 0.
ANN.2
CSE4100
Homework 1 Solution – Problem 1Homework 1 Solution – Problem 1
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.3
CSE4100
Homework 1 Solution – Problem 2Homework 1 Solution – Problem 2
2a: (1|00)*
2b: cons = {b, c, d, e, f ,,, y, z} vow = {a, e, i, o, u}
ANS = cons* (vow | epsilon) cons*
ANN.4
CSE4100
Homework 1 Solution: 3.16a and 3.17aHomework 1 Solution: 3.16a and 3.17a
0 76
5
3
4
2
1
a
b
1, 2, 3, 4, 6, 7,
1, 2, 4, 5, 6, 7
0, 1, 2, 4, 7
a
b
b
a a
b
ANN.5
CSE4100
Homework 1 Solution: 3.16d and 3.17dHomework 1 Solution: 3.16d and 3.17d
0 76
5
3
4
2
1
a
b
10 1716
15
13
14
12
11
a
b
8
9
a
b
b
Try Yourself:DFA for 3.17d Shouldhave a total of 7 states