- Answer the problems on the exam pages.
- There are seven problems, for 120 total points. Probable scale is somewhere around A=105, C=70.
- If you need extra space use the back of a page.
- No books, notes, calculators, or collaboration.
- The first four problems are true/false, with five points for the correct boolean answer and up to five for a convincing justification (proof, counterexample, quotation of result from lecture, etc.)

Q1: 10 points Q2: 10 points Q3: 10 points Q4: 10 points Q5: 20 points Q6: 20 points Q7: 40 points Total: 120 points

**Question 1 (10):***(True/false with justification)*Every language in the class L (or DSPACE(log n)) is context-free.**Question 2 (10):***(True/false with justification)*The language PATH = {(G,s,t): G is a directed graph and G has a path from s to t} has polynomial-size circuits.**Question 3 (10):***(True/false with justification)*If A and B are two languages where A ≤_{m}B and B is NP-complete, then A is Turing decidable.**Question 4 (10):***(True/false with justification)*If X is a language that has polynomial-size circuits, i.e., for every n there is a circuit C_{n}that decides membership in X for inputs of size n, and size(C_{n}) = n^{O(1)}, then X must be decidable.**Question 5 (20):**Let E_{LOGSPACE}be the language {M: M is a Turing machine that uses O(log n) space on inputs of size n such that L(M) is not empty. Prove that E_{LOGSPACE}is not Turing decidable.**Question 6 (20):**Recall that E_{CFG}is the language {G: G is a context-free grammar and L(G) is not empty}. Prove that E_{CFG}is Turing decidable. (Note: This is a result proved in Sipser.)**Question 7 (40):**We define an instance of the**box problem**to be a natural number n (with n ≥ 3), a finite alphabet Σ, an assignment of letters in Σ to all the border cells of an n by n box of cells, and a set of rules indicating exactly which 3 by 3 subboxes are allowed. (Thus a set of rules is a subset of the set Σ^{9}indicating the legal 3 by 3 boxes.) A box problem instance is called**feasible**if there exists an assignment of letters in Σ to all the n^{2}cells such that border cells are assigned as indicated and all the 3 by 3 subboxes are legal. The language BOX is {b: b is a feasible box problem instance}.- (a,10) Prove that for any fixed n, the set of (strings denoting) feasible n by n boxes is a regular language.
- (b,10) Prove that given a set of rules and an assignment of letters to all the cells of an n by n box, we can check whether the assignment follows the rules using O(log n) space.
- (c,20) Either prove that BOX is in P or prove that BOX is NP-complete. (Extra credit for proving both.)

Last modified 9 May 2008