Here is a question on regular languages just to get you in shape for the final exam. Suppose that L is a regular language and w is any word, not necessarily in L. We define the set L/w = {x ∈ Σ* | xw ∈ L}.
Show that L/w is regular.
2. Corrected_text: Suppose that G is a context-free grammar. Show that the question "Is L(G) regular?" is undecidable. Here is a possible approach. Let N be some language that is known to be context-free but not regular (for example, {ab^n | n ≥ 0}). Now consider the language L = (N#Σ*) U (Σ*#L(G)), where # is some symbol that is not in L(G) or N. Prove that L is always context-free but is regular if and only if L(G) = Σ*. This, by itself, does not complete the question, so you have to complete all the remaining steps as well as proving the claim. Also, you should think about why I put part (1) together with this question? You are free to ignore this hint, but if you do so, I will mark you just as rigorously as the people who used the hint.