CMPSCI 401: Theory of Computation
Second Midterm Exam, Spring 2013
David Mix Barrington
28 March 2013
Directions:
- Answer the problems on the exam pages.
- There are eight problems
for 120 total points plus 15 extra credit.
Actual scale was A = 105, C = 69.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
- The first five questions are statements -- in each case say
whether
the statement is true or false and give a convincing justification
of your answer --
a proof, counterexample, quotation from the book or from lecture, etc.
You get five points for the correct boolean answer (so
there is no reason not to guess if you don't know) and up to five for
the justification.
Q1: 10 points
Q2: 10 points
Q3: 10 points
Q4: 10 points
Q5: 10 points
Q6: 25 points
Q7: 15 points
Q8: 30+15 points
Total: 120+15 points
If C is any class of computers, such as DFA's, CFG's, LBA's TM,
strange
variant TM's, etc.:
- AC = {(M, w): M is a computer in C and w ∈ L(M)}
- EC = {(M): M is a computer in C and L(M) = ∅}
- ALLC = {(M): M is a computer in C and L(M) =
Σ*}
- EQC = {(M, N): M and N are computers in C and L(M) =
L(N)}
- REGC = {(M): M is a computer in C and L(M) is a
regular language}
- COMPC = {(M, N): M and N are computers in C and L(M)
is the complement of L(N)}
The language DECIDER is the set {(M): M halts (either accepts or
rejects) on every input}.
Recall that if A and B are two languages, A is mapping
reducible to B, written A ≤m B, if there exists a
function f: Σ* → Σ* such that
for any string w, w ∈ A ↔ f(w) ∈ B.
A language A is Turing recognizable (TR) if it equals L(M)
for some Turing machine M.
A is Turing decidable if A = L(M)
for some Turing machine M that always halts.
A function f is
Turing computable if there exists a Turing machine M such
that for any string w, M when started on w halts with f(w) on its
tape.
A stupid Turing machine (STM) has one tape which "wraps
around" -- moving left from its leftmost cell takes you to its
rightmost cell, and moving right from its leftmost cell takes you to
its leftmost cell. It begins with the input string filling the
entire tape.
A very stupid Turing machine (VSTM) is like an STM except
that for some of its state-letter pairs it may replace the current
cell with two cells, writing to both of them, instead of just
writing to the current cell. Thus its transition function is
δ (Q × Σ) ↔ (Q × (Σ ∪
(Σ × Σ)) × {L, R}).
The function S from N × N to N is
defined as follows. Consider all the k-state Turing machines with
tape alphabet {0, 1, blank} and consider all input strings in {0,
1}n. S(k, n) is the number of steps taken by the
longest of any of the halting computations of any of these
machines on any of these inputs. (This is similar to the "busy
beaver function" but is not exactly the same thing.)
- Question 1 (10):
True or false with justification:
The language ASTM is Turing decidable.
- Question 2 (10):
True or false with justification:
The language AVSTM is Turing decidable.
- Question 3 (10):
True or false with justification:
Any regular language is the language of some STM.
- Question 4 (10):
True or false with justification:
It is not true that REGCFG ≤m REGTM.
- Question 5 (10):
True or false with justification:
The set of all TR languages is countably infinite.
- Question 6 (25):
These questions use the definition of the language COMPC
above.
- (a, 10) Prove that the language COMPNFA is
Turing decidable.
- (b, 15) Is the language COMPCFG Turing
decidable? Prove your answer.
- Question 7 (15):
Prove that the function S from N × N to
N, defined above, is not Turing computable. (Hint: Assume
that it is, and from this assumption prove the statement
"ATM is Turing decidable", which we know to be false.)
- Question 8 (30+15):
These questions use the definitions of the languages DECIDER and
COMPC from above.
- (a, 10): Prove, by any valid method, that DECIDER is not
Turing decidable.
- (b, 5XC): Prove, using the Recursion Theorem, that DECIDER
is not Turing decidable. (Hint: Assume that there is a decider
for DECIDER and that you can design a machine to obtain its own
description, and derive a contradiction.)
- (c, 10): Prove that DECIDER is not Turing recognizable.
(Hint: You could show that the complement of ATM is
≤m DECIDER, but it may be easier to show that
ALLTM ≤m DECIDER. You may assume without
proof that ALLTM is not TR.
- (d, 10): Prove that DECIDER
≤mCOMPTM. What can you conclude about
COMPTM from this result?
- (e, 10XC): Recall that a language A is in the class
Π2 if there is some Turing decidable language B such
that for any string w, w ∈ A if and only if
∀x:∃y: (w, x, y) ∈ B. Prove that if A is any
language in Π2, then A ≤m DECIDER.
Last modified 3 April 2013