



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




CMSC 330, Practice Problems 2 (SOLUTIONS)
d. Give a NFA that only accepts binary numbers that include either “00” or “11”.
e. Give a NFA that only accepts binary numbers that include both “00” and “11”.
2 3
7
6
1
(^8 9 )
4 5
10 11
2 3
77
6
1
(^8 9 )
4 5
10 11
f. What language (or set of strings) is accepted by the following NFA?
(010)(0|* ε ) g. Compute the ε-closure of the start state for each of the NFA above.
k. What language (or set of strings) is accepted by the following DFA?
Described as a list of strings: { “01”, “111”, “0011”, “01111”, “10”, “000”, “0110”, “1111”, “00111”, “011111”…} where all underlined strings may have any number of 0s appended
Described as a regular expression: 01 | (1 | 00 | 011)(11 | (0 | 111)0)*
Explanation (for each underlined portion of RE)
l. For each regular expression: 1, (0|01) a) Reduce the RE to an NFA using the algorithm described in class. b) Reduce the resulting NFA to a DFA using the subset algorithm. c) Show whether the DFA accepts / rejects the strings “1”, “11”, “101” d) Minimize the resulting DFA using Hopcroft reduction e) Are any 2 of the minimized DFA identical?
1* → NFA → DFA
Accept / reject
Minimized DFA Initial partitions: accept ={ {3,1,4}, {2,4,3,1} } = P1, nonfinal = Ø move({3,1,4}, 1) → P move({2,4,3,1}, 1) → P No need to split P1, minimization done. After cleanup, minimal DFA is