There are 5 questions for credit and two for your spiritual growth. The first spiritual growth
question is not hard, all of you can give it a shot if you have time: however, it will not help
you do well in the course. The second spiritual growth question is deep and difficult. Please
don’t get obsessed with it. It will not help you prepare for the exam.
Question 1[15 points] Show that L(G1) \ L(G2) = ; is co-CE but not computable (decid
able). Here G1 and G2 are context-free grammars.
Question 2[20 points] For this question the alphabet is fa; bg. Suppose that the language
L is CE but not computable; this means that L cannot be CE. We define a new language as
1. Show that K is not computable. [5 points]
2. Show that K is not CE. [10 points]
3. Show that K is not co-CE. [10 points]
Question 3[20 points] Suppose that M is a Turing machine and w is a word. Is the question
\Does M ever use more than 330 cells on its tape while processing w?” decidable or not.
Prove your answer. Hint: Rice’s theorem will not help you.
Question 4[25 points]
1. 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
Show that L=w is regular. [10 points]
2. 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, fanbnjn ≥ 0g). Now consider the language
L = (N#Σ∗) [ (Σ∗#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 rigourously as the people who used the hint. [15 points]