Question: 1. Prove countable by finding the 1-1 and onto correspondence with the natural number N a. Strings over {a,b). that begin with a b. Strings

1. Prove countable by finding the 1-1 and onto correspondence with the natural number N a. Strings over {a,b). that begin with a b. Strings over {a,b} with even number of a's C. How many languages over {a,b} are there that only contain strings with an even number of a's and an even number of b's? 2. Write (1) DFA and (ii) smallest NFA you can think of for strings over {0,1} a. Begin and end with 00 b. Contain the substring 00 C. Do NOT contain the substring 00 3. Some regular expressions are easy to write; some hard./ a. Write a regular expression for strings over {a,b} that end "aab b. In class we wrote this expression for stings NOT containing the substring aab a* b*a*|(b*ab*aa*)* The a* is not needed -- can just be dropped. Why? Can you think of a string that should be generated and is not? If so, what? Can you think of a string that this generates which is not legal? If so, what? = d. Can you find a correct expression for string NOT containing "aab? If so, what is it? 4. (Old Capstone) Give regular expressions describing each of the following languages over { = {0, 1}: a. {w: the fourth symbol of wis a 0} b. {w: wis odd} C. {w: w contains either substring 000 or substring 111} d. {w: every 0 in w is immediately followed by a 1} e. {w:w+2} 5. Write simpler NFAs for these languages a. (aa)*(bb)* b. (aba)* | (bab)* c. (aa | bb)* aab d. a*bb ba* al b 42 6. Convert the NFA to a DFA (Sipser algorithm Th 11.39)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
