CMPSCI 501: Theory of Computation
Final Exam, Spring 2014
David Mix Barrington
2 May 2014
Directions:
- Answer the problems on the exam pages.
- There are eight problems
for 120 total points plus 10 extra credit.
Actual scale was A = 105, C = 60.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
- Many useful definitions are given in a body before the questions.
- 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: 30 points
Q7: 20+10 points
Q8: 20 points
Total: 120+10 points
If C is any class of computers, such as DFA's, CFG's, LBA's, TM's,
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) =
Σ*}
A language 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.
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. If such an f exists
that
is computable in polynomial time, we say that A is poly-time
reducible to B, written A ≤p B. If f is
computable
in log space, we say that A is log-space reducible to B,
written
A ≤L B.
Although we did not prove this in lecture, you may assume both:
- There exists a Turing decidable language that is not in PSPACE.
- There exists a language in PSPACE that is not in L = DPSACE(log n).
Congressman Bob Forehead is the chair of a powerful House
commmittee.
He is preparing the final draft of a bill and must decide exactly
which
provisions, out of a set {p1,..., pn},
he will include in it. He is in contact with a set of m
lobbyists, each of who has a set of one or more requests -- a
request may be to include a particular provision in the bill, or to
not include a particular provision. Bob wants to make all
the lobbyists happy, which he can do by fulfilling at least one
request on each lobbyist's list.
Let BILLCHECK be the set {(B, LL): B is a bill, LL is a list of
lobbyist requests, and every lobbyist is happy with the bill because
B fulfills at least one request on every list in LL}.
Let POSSIBLE be the set {LL: LL is a list of lobbyist requests
such that some bill exists that makes all the lobbyists happy}.
A transposition Turing machine or TransTM has a
state set Q, an input alphabet Σ, and a tape alphabet Γ
like an ordinary TM, except that here Γ = Σ ∪ {$}.
For an input string w, the TransTM's single tape begins with
contents $w$, in the initial state with the read head on the first
$. There are two final states, one accepting and one rejecting, and
the machine halts when it reaches either of these states.
The transition function δ is from Q × Γ to
Q × {TL, TR, I} × {L, R}. When in state p and reading
an a, the machine takes one of three actions on the tape: if the
middle component of δ(p, a) is TL, it switches the current
letter with the one to its left. If it is TR, it switches the
current letter with the one to its right, and if it is I it does not
change the tape. It then moves the read head left or right (from
the new current letter) depending on the last component of
δ(p, a). If it is on the first or last character of the take,
it may not change the tape.
- Question 1 (10):
True or false with justification:
The language {anbn2: n ≥ 0} is not
context-free.
- Question 2 (10):
True or false with justification:
Let M be a one-tape Turing machine with transition function δ,
state set Q containing states p and q along with other states, and
tape alphabet Σ containing letters a and b along with other
letters. (You may assume that neither p nor q is a final state.)
Suppose that δ(p, a) = (q, a, R) and that δ(q, b) = (p,
b, L). Then it is possible that M accepts all strings in
Σ*.
- Question 3 (10):
True or false with justification:
Let X be a set of context-free grammars such that there exists a
grammar G0 ∉ X, there exists a grammar
G1 ∈ X, and for any two grammars G and G', if L(G) =
L(G'), then (G ∈ X) ↔ (G' ∈ X). Then X is not Turing
decidable.
- Question 4 (10):
True or false with justification:
Assume, for this question only, that P ≠ NP. Let Y be a set of
pairs of strings and let Z be the set {v: ∃u: (u, v) ∈
Y}. Then is is possible that Y is in the class P and that Z is not.
- Question 5 (10):
True or false with justification:
For this problem, assume that there is a language D that is in
DSPACE(n2) but not in LBA = DSPACE(n). (This is in fact
true, though we did not prove it in class.) Then it is possible
that L1 is in the class LBA, that L2
≤p L1, and that L2 is not in the
class LBA.
- Question 6 (30):
These questions use the definition of the languages BILLCHECK and
POSSIBLE given above.
- (a, 10) Prove that the language BILLCHECK is in the class L =
DSPACE(log n).
- (b, 15) Prove that the language POSSIBLE is NP-complete.
- (c, 5) Suppose we modified the definitions of BILLCHECK
and POSSIBLE to limit each lobbyist to no more than three
requests.
Would the statements proved in parts (a) and (b) necessarily
remain true?
- Question 7 (20+10):
These questions all involve the model of transposition Turing machines
(or TransTM's) defined above.
- (a, 10): Prove that every regular language is the language of
some TransTM.
- (b, 10): Prove that the language ATransTM is
Turing decidable.
- (c, 10XC): Prove that there exists a TransTM whose language
is not regular.
- Question 8 (20):
These questions both deal with size complexity of Boolean circuits.
Assume that your circuits have AND, OR, and NOT gates of fan-in 2,
and ignore issues of circuit uniformity.
- (a, 10):
Prove that every regular language is the language of some
circuit family of size O(n).
- (b, 10):
Prove that every context-free language is the language of some
circuit family of size O(nk) for some constant k.
Last modified 17 May 2014