Homework 2

Due Date: March 1, 2010

1. [20 points] Do Exercise 1.16 part a only.

2. [20 points] Give regular expressions generating the languages of Exercise 1.6 parts a, b, d, e, f, g, i, j, l, n only.

3. [20 points] Do Exercise 1.19 part b only. Your answer should be the NFA that results from following the algorithm exactly. You should not change the algorithm or simplify your machine.

4. [20 points] Do Exercise 1.21 part b only by following the algorithm exactly. Clearly describe each step. Do not skip any step and do not simplify the intermediate or the final regular expressions.

5. [20 points] Prove that the language { ak : k is a perfect square } is not regular by “pumping down.” You may model your proof after this proof by “pumping up.”

Extra credit: For any string w, define even(w) to be the string that results from deleting all the letters that occur in odd positions of w. For example, even(a)=ε, even(ab)=b, even(acb) = c, and even(acbd) = cd. Now extend the definition of even to languages as follows. For any language L, define even(L) to be the language { even(w) : w ∈ L }. Prove that if L is regular then even(L) is regular.