Question: 3. Let A = {0|n is divisible by 2} and B = {0|n is divisible by 3). The superscript denotes repetition, not numerical exponentiation. For
3. Let A = {0"|n is divisible by 2} and B = {0"|n is divisible by 3). The superscript denotes repetition, not numerical exponentiation. For example, A contains strings 00 and 0000, while B contains strings 000 and 000000, etc. (a) (8 pts) First, give a two-state DFA MA that recognizes A and a three-state DFA MB that recognizes B. (b) (10 pts) Then use the union construction explained in Theorem 1.25 in our textbook to combine MA and MB into a single DFA called Mc that recognizes the language C = {0"|n is divisible by 2 or 3}. (c) 2 pts Compare your DFA Mc with the NFA example we have seen in class for recognizing C. Are they the same? If not, how are they different? 4. Let L = {ww has an odd number of a's and ends with a b}. If you look closely, you will see that L is the intersection two simpler languages. (a) (6 pts) Construct the DFAs for the simpler languages. In each case, S = {a,b}. (b) 9 pts) Then use the method explained as a footnote in Theorem 1.25 (page 46 in the book's 3rd edition) to give the state diagram of a DFA for the intersection of these simpler languages, which is L
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
