Prof. Franklin, Spring 2009 ECS 120 Homework #1 (covers Sipser 1.1,1.2) Due Thurs 9 April, 2009 1. Find simple DFA's for the following languages over alphabet {0,1}: (a) {w : w starts with 0 and has at most two 1's} (b) {w : w starts with 0 and has at least two 1's} (c) {w : w has an odd number of 0's or an odd number of 1's} (d) {w : w has 111 as a substring} (e) {w: w does not have 000 as a substring} 2. Find a four-state NFA for 1*(01)*1+ over alphabet {0,1}. 3. Use the construction from the proof of Theorm 1.45 to give the state diagram of an NFA for the union of the languages described in problems (1a) and (1b). 4. Use the construction from the proof of Theorem 1.47 to give the state diagram of an NFA for the concatenation of the languages described in problems (1a) and (1b). 5. Use the construction from the proof of Theorem 1.49 to give the state diagram of an NFA for the star of the language described in problem (1a). 6. Use the construction from the proof of Theorem 1.39 to convert the following NFA into an equivalent DFA: Q = {1,2,3}, start = 1, F = {3}, Sigma = {a,b}, delta = {(1,a) -> 2, (2,b or epsilon) -> 3, (3, a or epsilon) -> 1}. Then simplify your DFA by removing unnecessary states.