CISC 603 M02 HW1
Deterministic Finite Accepters
Provide solutions to the following exercises. Solutions should be in the form of a hand-drawn transition
graph (you may instead use a software tool like the Finite State Machine Designer). Note: Text
descriptions and ASCII images will not be accepted.
Linz Section 2.1
1. For ?= {a; b}, construct DFAs that accept the sets consisting of
(a) all strings of odd length
(b) all strings of even length
(c) all strings of length greater than 5
(d) all strings with an even number of a's
(e) all strings with an even number of a's and an odd number of b's
2. For ?= {a; b}, construct DFAs that accept the sets consisting of
(a) all strings with exactly one a
(b) all strings with at least two a's
(c) all strings with no more than two a's
(d) all strings with at least one b and exactly two a's
(e) all strings with exactly two a's and more than three b's
3. Give DFAs for the languages below:
(a) L = \{ab$^4$wb$^2$ | w ? {a,b}$^*$ \}
(b) L = \{ab$^n$a$^m$ | n ? 3, m ? 2\}
(c) L = \{w$_1$abbw$_2$ | w$_1$ ? {a,b}$^*$, w$_2$ ? {a,b}$^*$\}
(d) L = \{ba$^n$ | n ? 1, n ? 4\}
4. Show that the following languages are regular by constructing DFAs for each:
(a) L = \{a$^n$ | n ? 3\}
(b) L = \{bbab$^n$ | n ? 2\}
(c) L = \{a$^n$ | n ? 0; n ? 3 \}
(d) L = \{a$^n$ | n is either a multiple of three or a multiple of 5\}
(e) L = \{a$^n$ | n is a multiple of three but NOT a multiple of 5 \}