**Directions:** The first question 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".

The second and third questions 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, you must explain them in your own words from memory.

The last five questions are true/false questions with justification, like the questions on the midterm. Altogether there are eight questions for 100 points. The actual final will have exactly the same format.

**Crib sheet:** I will state some useful definitions after the
questions -- these will also be available during the in-class exam.

**Question 1 (15):**For each statement, indicate (no justification needed) whether it is true, false, or unknown:- (a,3) The problem CVP is L-reducible to the problem REACH.
- (b,3) The problem REACH is L-reducible to the problem CVP.
- (c,3) Every context-free language is recursively enumerable (r.e.).
- (d,3) The problem FACTORING is in P.
- (e,3) The class NL is contained in the class TC
^{3}.

**Question 2 (15):**Prove that every language in FO (every language definable by a first-order formula) is in L.**Question 3 (20):**Prove that ASPACE(log n) is contained in P. That is, prove that if M is an alternating Turing machine that uses space O(log n), then L(M) is in P.**Question 4 (10):**(true/false with justification)If A is L-reducible to B (A ≤ B), and B is NP-complete, then A must be NP-complete.

**Question 5 (10):**(true/false with justification)If B is L-reducible to A (B ≤ A), and B is NP-complete, then A must be NP-complete.

**Question 6 (10):**(true/false with justification)Assuming P is different from NP, there is no poly-time algorithm that can input an undirected graph G and approximate, within 10%, the minimum number of colors needed to color G.

**Question 7 (10):**(true/false with justification)The Solovay-Strassen randomized algorithm for PRIME (presented in lecture) never indicates that its input number may be prime if it is not prime.

**Question 8 (10):**(true/false with justification) If Φ is any 3-CNF formula (an OR of size-3 ANDs of literals), and x denotes a string defining a setting of all the variables occurring in Φ, then the language {x: Φ(x) is true} is in the class P.

- 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:
- NC
^{i}: circuits with AND, OR, and NOT gates, fan-in two, polynomial size, and O(log^{i}) depth - AC
^{i}: circuits with AND, OR, and NOT gates, unbounded fan-in, polynomial size, and O(log^{i}) depth - ThC
^{i}: circuits with threshold gates, polynomial size, and O(log^{i}) depth - NC is the union of NC
^{i}for all constant i

- NC
- 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 a CFL iff it is equal to L(G) for some context-free grammar G.
- 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 = {(G,s,t): G is a directed graph and there is a path from s to t in G}
- CVP = {(C,x): C is a circuit, x is an input setting for C, and C outputs 1 on input x}
- PRIME = {w: w is the binary representation of a prime number}
- FACTORING is a function: the input is a positive integer n given in binary and the output is a list of n's prime factors

Last modified 13 May 2003