- Answer the problems on the exam pages.
- There are seven problems on pages 2-6, for 120 total. Probable scale is somewhere around A=105, C=70.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
- The first four questions are each statements which you are to determine to be true or false. You get five points for a correct boolean answer (so there is no reason not to guess if you are not sure) and up to five for a convincing justification (proof, counterexample, quotation from the text or from lecture, etc.)

Q1: 10 points Q2: 10 points Q3: 10 points Q4: 10 points Q5: 20 points Q6: 30 points Q7: 30 points Total: 120 points

**Question 1 (10):***(True/False with justification)*Define the language SUB_{CFG}to be {(G_{1}, G_{2}): G_{1}and G_{2}are CFG's and L(G_{1}) ⊆ L(G_{2})}. Then SUB_{CFG}is not Turing decidable.**Question 2 (10):***(True/False with justification)*Define the language TR_{TM}to be {M: M is a Turing machine and L(M) is TR}. Then TR_{TM}is Turing decidable.**Question 3 (10):***(True/False with justification)*Let A be any Turing decidable language. There must exist an enumerator E that outputs all the elements of A in*nonincreasing order*, which means that E never outputs a longer string after a shorter one.**Question 4 (10):***(True/False with justification)*For any Turing machine M, define L_{D}(M) to be the language of all strings w such that ww (the concatenation of two copies of w) is in L(M). There exists a Turing machine N such that L_{D}(N) = L(N).**Question 5 (30):**For this question, recall that the alphabet of a one-tape Turing machine must contain a**blank character**, which initially occupied all the cells on the tape to the right of the input. The blank character cannot occur as part of the input string, and (following Sipser) we assume that there are*no*tape cells to the left of the input stringA

**left-blank Turing machine**is a one-tape Turing machine that always moves left when it sees a blank character. We define A_{LBTM}to be the set of pairs (M, w) where M is a left-blank Turing machine and w ∈ L(M).- (a,10) Is A
_{LBTM}Turing decidable? Prove your answer. - (b,10) Similarly, a
**right-blank Turing machine**is a one-tape Turing machine that always moves right when it sees a blank, and A_{RBTM}is the set of pairs (M, w) where M is a right-blank Turing machine and w ∈ L(M). Is A_{RBTM}Turing decidable? Prove your answer.

- (a,10) Is A
**Question 6 (30):**This question deals with functions from**N**to**N**, where**N**is the set {1,2,3,...}. Define S to be the set of all functions from**N**to**N**. A function in S is called**periodic**if there are positive integers t and q such that for all n with n ≥ t, f(n) = f(n+q). For example, the function whose values in order are (3, 16, 3, 3265, 24, 7, 24, 7, 24, 7, 24, 7,...) is periodic because we may take t = 5 and q = 2. Define SP to be the set of all periodic functions in S.- (a,10) Prove that S is an uncountable set. (Hint: If f is any
function from
**N**to S, show that f is not onto by giving an example of a function in S that is not in the range of f.) - (b,10) Prove that SP is a countable set.
- (c,10) Prove that every function in SP is Turing computable.

- (a,10) Prove that S is an uncountable set. (Hint: If f is any
function from
**Question 7 (30):**Here are three easy questions dealing with mapping reducibility. Recall that if A and B are any two languages, A ≤_{m}B means that there exists a Turing computable (always-defined) function f such that for any string x, x ∈ A if and only if f(x) ∈ B.- (a, 10)
Prove that if A ≤
_{m}B and B ≤_{m}C for any three languages A, B, and C, then A ≤_{m}C. (This is solved exercise 5.6 in Sipser, but of course you may not just quote it.) - (b, 10)
Recall that A
_{TM}is the set of pairs (M, W) where M is a Turing machine and w ∈ L(M). Recall that L_{BOS}is the set of Turing machines M such that M ∉ L(M). Prove that L_{BOS}≤_{m}A_{TM}. - (c, 10) Prove that
A
_{TM}≤_{m}L_{BOS}.

- (a, 10)
Prove that if A ≤

Last modified 13 April 2008