CMPSCI 501: Theory of Computation

Final Exam, Spring 2016

David Mix Barrington

5 May 2016

Directions:

  Q1: 10 points
  Q2: 10 points
  Q3: 10 points
  Q4: 10 points
  Q5: 10 points
  Q6: 25 points
  Q7: 35 points
  Q8: 10+10 points
 Total: 120+10 points

If C is any class of computers, such as DFA's, CFG's, TM's, strange variant TM's, etc.:

In particular, if C = P, then M must have a clock restricting it to some polynomial time bound, and if C = L, then M must have a marker restricting it to c log n worktape space for some constant c.

A language is Turing recognizable (TR) if it is equal to L(M) for some Turing machine M.

A language is Turing decidable (TD) if it is equal to L(M) for some Turing machine M that halts on every input.

A language is co-TR if and only if its complement is TR.

A function f from strings to strings 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 Turing computable 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.

The following languages are proved to be NP-complete in the text or in Exercises, and you may assume without proof that each of them is NP-complete.

Recall that a quantified boolean formula is a statement of the form ∃x1: ∀x2: ∃x3;:... ∀xn: φ(x1,..., xn) where each xi is a boolean variable and φ is a boolean formula in conjunctive normal form. It was proved in the text and in lecture that the language TQBF of true quantified boolean formulas is PSPACE-complete, and you may assume this fact without proof.

A DogShow object consists of a set D of dogs, a set E of events, and a relation C ⊆ D × E such that C(d, e) means "dog d competes in event e".

A Schedule object for a DogShow (D, E, C) is a positive integer t and a function S from E to {1,..., t}. (Assume that t ≤ |E|.) A Schedule is valid if there do not exist a dog d and two distinct events e and e' such that C(d, e), C(d, e'), and S(e) = S(e') are all true. (Thus a schedule is valid if no dog competes in two different events that are scheduled at the same time.

The language DS-SCHED-OK is the set {(D, E, C, S): S is a valid schedule for (D, E, C)}.

The language DS-POSSIBLE is the set {(D, E, C, t): ∃S: (D, E, C, S) ∈ SCHED-OK and S has parameter t}.

Let M be any machine that takes an input string in {0, 1}*. We define a number of games for M. The solitaire word game for M has White write down a string w and win the game if and only if w ∈ L(M). The bounded solitaire word game for M and n further requires that |w| = n. The bounded alternating word game for M and n is similar, except that now w is formed alternately by White and Black naming letters in {0, 1} until n letters have been named. White still wins if and only if w is in L(M).

We define a number of languages based on these games. If C is any class of computers, SWGC is the set of computers M in C such that White wins the solitaire word game on M. Similarly BSWGC is the set {(M, 1t): M is a computer in C and White wins the bounded solitaire word game for M and n}, and BAWGG is the similar language for the bounded alternating word game. (We make the second input component 1n rather than the binary for n so that the input size will be O(n).)

We define two particular context-free languages called the Dyck languages, which are essentially strings of balanced parentheses. The language D1 has the context-free grammar with rules S → aSb, S → SS, and S → ε. The language D2 has these three rules plus the additional rule S → cSd.

Last modified 25 July 2016