CS 390 Solutions to Homework 5


1. Textbook p. 116

3.20 (b)

           

2. Textbook pp. 156 - 160:

4.2 (c) {1, 3, 4, 5}

4.10 (d)

State Input Next State| State Input Next State
1 a 2| 1,4,5 b empty set
1 b empty set| 1,2,5 a 1,2
2 a empty set| 1,2,5 b 3
2 b 3| 1,2 a 2
3 a 1,4,5| 1,2 b 3
3 b empty set |empty set a empty set
1,4,5 a 1,2,5 |empty set b empty set












Every state of DFA that contains state 1 of NFA is an accepting state.


4.13 Yes for (a) and (c) and No for (b).

4.14 tex2html_wrap_inline153 or
        aa*b*(a + b)( a + ba*b*(a + b) )* or anything equivalent.

4.16 (c) tex2html_wrap_inline157
(e) tex2html_wrap_inline161

3. The set of states, the alphabet and the initial state of the NFA are the same as those o f the tex2html_wrap_inline165 ,
The set of accepting states tex2html_wrap_inline167 of the NFA is equal to the set of accepting states of the tex2html_wrap_inline165 (denote it by A), if no accepting state can be reached from the initial state tex2html_wrap_inline175 by tex2html_wrap_inline177 -arcs in the tex2html_wrap_inline165 , else tex2html_wrap_inline167 = tex2html_wrap_inline183 .
For a transition tex2html_wrap_inline185 of the NFA, collect all the states reachable from q by taking any number of tex2html_wrap_inline177 -arcs, then one a-arc, then any number of tex2html_wrap_inline177 -arcs.