Formal Language & Automata Theory Midterm 70 min Spring 2005 50 pts [Note: All questions carry equal points. Some question will take longer time to answer than the others. In answering a question feel free to refer your answer of another question.] 1. Prove by induction that the number of subsets of a set with cardinality n is 2n. 2. Find the regular expression that the following DFA accepts: d(q1, a)=q1, d(q1, b)=q2, d(q2, a)=d(q2, b)=q2, q1 is the start state and q2 is the final state, and sigma={a, b} a. Intuitively describe in a line exactly what type of strings are there in this language. [2] b. Apply the relevant algorithm to find the appropriate R value in the last column that represents the regular expression accepted by the machine. [8] 3a. Suppose the only information you have about the above automaton is sigma={a, b}, number of states=2, (not the transition function) and given a string over the sigma whether the DFA accepts or rejects it. What are the only strings you have to try in order to determine if it accepts the empty language or not? [2] 3b. What are the only strings you have to try on the above DFA in order to determine if it accepts an infinite language or not? [8] 4a. Draw an NFA-e that accepts (00)*1* or 1*(00)* over sigma={0, 1}. You must use epsilon transition. [5] 4b.Translate the above NFA-e to an equivalent NFA. [5] 5a. Write the Context Free Grammars for each of the two expressions (00)*1* and 1*(00)*. [6] 5b. Combine the two to generate a CFG that generates (00)*1* + 1*(00)*. [2] 5c. Explain if (00)*1* + 1*(00)* is a regular language. [2]