# CMPSCI 601: Theory of Computation

### Solutions also posted here 3 June 2003.

Directions: Question 1 consists of five statements to be marked "true", "false", or "unknown", with no justification needed. Here "unknown" means "not resolvable by the results in this course". No justification is needed or wanted, and there is no penalty for a wrong guess.

Questions 2 and 3 each consist of a true statement that you are to prove. As these statements were proved in lecture, you may not simply quote their proofs -- give an explanation in your own words of why they are true that demonstrates your understanding.

Questions 4 through 8 are similar to those on the midterm. There is a statement which is either true or false. You will get five points for a correct boolean answer, and there is no penalty for guessing. Then JUSTIFY YOUR ANSWER -- the five remaining points will be awarded based on the degree to which your answer is correct and convincing.

Altogether there are eight questions for 100 points.

Crib sheet: I will state some useful definitions after the questions.

• Question 1 (15): For each statement, indicate (no justification needed) whether it is true, false, or unknown given the results presented in the course.

• (a,3) The language REACH is in both the classes NP and co-NP.
• (b,3) (on-campus) The class co-NP is contained in P.

(off-campus) Due to my error, off-campus students got a question repeated from the practice exam:

Every context-free language is recursively enumerable (r.e.).

• (c,3) The class ATIME(log n) is contained in DSPACE(log n).
• (d,3) The class DSPACE(log n) is contained in ATIME(log n).
• (e,3) The class NC3 is contained in the class AC1.

• Question 2 (15): Prove that the problem REACH is the language of an alternating Turing machine that uses O(log n) space, O(log2 n) time, and O(log n) alternations. (You may describe the machine either in terms of existential and universal states, or in terms of the game semantics.)

• Question 3 (20): Prove that L-uniform NC1 is contained in L. Recall that "L-uniform" means that there is a logspace Turing machine that can input the string 1n and output a description of the circuit Cn.

• Question 4 (10): (true/false with justification)

If M is any one-tape Turing machine, the language VALCOMPM is in L. Here VALCOMPM is the set of strings that denote accepting computations of M on some input.

• Question 5 (10): (true/false with justification)

If a language A is in NP, then A ≤ QSAT, where "≤" denotes L-reducibility.

• Question 6 (10): (true/false with justification)

Every language in L is context-free.

• Question 7 (10): (true/false with justification)

Unless P = NP, there is no poly-time algorithm that approximates that optimal solution to BIN-PACKING within a factor of three (i.e., uses at most three times the optimal number of bins).

• Question 8 (10): (true/false with justification) If a predicate R(x,y) is recursive, where x and y are strings, then the predicate ∃y:R(x,y) must also be recursive.

### Crib Sheet:

• The following classes are defined as the languages of the following kinds of Turing machines:
• P: poly-time deterministic TM's
• NP: polytime nondetermistic TM's
• L: space O(log n) deterministic TM's
• NL: space O(log n) nondeterministic TM's
• PSPACE: poly-space deterministic TM's
• If A and B are languages, then A ≤ B (A is L-reducible to B) means that there exists a logspace-computable function f such that for any x, x is in A iff f(x) is in B.
• The following classes are defined as the languages decidable by the following kinds of circuits:
• NCi: circuits with AND, OR, and NOT gates, fan-in two, polynomial size, and O(logi) depth
• ACi: circuits with AND, OR, and NOT gates, unbounded fan-in, polynomial size, and O(logi) depth
• ThCi: circuits with threshold gates, polynomial size, and O(logi) depth
• NC is the union of NCi for all constant i
• If G is a context-free grammar, L(G) is the set of strings w such that w can be generated from G's start symbol according to G's rules.
• A language is r.e. if it is equal to L(M) for some Turing machine M.
• We refer to some or all of the following specific languages and functions:
• REACH is the set {(G,s,t): G is a directed graph and there is a path from s to t in G}
• VALCOMPM, for a particular Turing machine M, is the set of all strings describing accepting computations of M on some input. That is, VALCOMPM is the set {w: ∃ x: w describes an accepting computation of M on input x}.
• K = {n: n is in L(Mn)}. This language is r.e.-complete.
• QSAT is the set of true quantified boolean sentences, with quantifiers binding boolean variables and the quantifier-free part a combination of those variables with boolean operators.
• The optimization problem BIN-PACKING inputs a sequence of item sizes, each between 0 and 1, and attempts to group the items into a minimum number of bins of size 1.