CMPSCI 401: Theory of Computation
Final Exam, Spring 2013
David Mix Barrington
9 May 2013
Directions:
- Answer the problems on the exam pages.
- There are eight problems
for 125 total points plus 10 extra credit.
Actual scale was A = 105, C = 70.
- 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: 30+10 points
Q8: 20 points
Total: 125+10 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) =
Σ*}
- ALLSTARC = {(M): M is a computer in C and L(M)* =
Σ*}
- INFC = {(M): M is a computer in C and L(M) contains infinitely
many strings}
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.
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).
Define a weighted graph to be an undirected graph where each vertex
has a positive integer weight -- you may assume that each weight is at most
n, the number of vertices. The language WC (weighted clique) is the set
{(G, S, k): S is a clique in the weighted graph G and the sum of the weights of
the vertices in S is at least k}. The language MWC (maximum weighted clique)
is the set {(G, k): there exists a clique in the weighted graph G such that the
sum of the vertex weights in the clique is at least k}.
A directed graph is strongly connected if for every pair of vertices
u and v, there is a (directed) path from u to v. The language STRCONN
is the set
of all strongly connected directed graphs.
- Question 1 (10):
True or false with justification:
The language INFCFG is Turing decidable.
- Question 2 (10):
True or false with justification:
There exist languages X and Y such that X ≤m Y is true but
X ≤p Y is false.
- Question 3 (10):
True or false with justification:
Every language in the class L = DSPACE(log n) is context-free.
- Question 4 (10):
True or false with justification:
For any language X, X is Turing decidable if and only if X* is Turing
decidable.
- Question 5 (10):
True or false with justification:
The language of the grammar with rules S → Ta, T → bU,
T → Ub, U → c, and U → S is regular.
- Question 6 (25):
These questions use the definition of the languages MWC and WC above.
- (a, 10) Prove that the language WC is in the class L =
DSPACE(log n).
- (b, 15) Prove that the language MWC is NP-complete.
- Question 7 (30+10):
These questions all involve the language STRCONN of strongly connected
directed graphs, defined above.
- (a, 10): Prove that STRCONN is in the class P.
- (b, 10): Prove that STRCONN is in the class
DSPACE(log2 n).
- (c, 10): Prove that STRCONN is in the class NL.
- (d, 10XC): Prove that STRCONN is complete for the class NL
under ≤L reductions.
- Question 8 (20):
These questions both use the definition of the language ALLSTARC
from above.
- (a, 10):
Prove that the language ALLSTARDFA is Turing decidable.
- (b, 10):
Prove that the language ALLSTARTM is not Turing decidable.
Last modified 29 May 2013