CMPSCI 501: Theory of Computation

Solutions to Second Midterm Exam, Spring 2017

David Mix Barrington

Exam given 11 April 2017, solutions posted 19 April

Directions:

Exam text is in black, solutions in blue.

  Q1: 10 points
  Q2: 10 points
  Q3: 10 points
  Q4: 10 points
  Q5: 10 points
  Q6: 10 points
  Q7: 30 points
  Q8: 35 points
 Total: 125 points

The set N of natural numbers is {0, 1, 2, 3,...}, not quite as defined in Sipser.

For this exam, the input alphabet of all machines will be Σ = {0, 1}.

A palindrome is a string that is equal to its own reversal. Let PAL = {w: w is a palindrome}.

If C is any class of things that have languages, such as DFA's, CFG's, TM's, strange variant TM's, etc., remember that (M) is the canonical string representing the thing M in C. We define the following languages:

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. (Similarly for co-NP, etc.)

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. It is poly-time computable if in addition, M always computes f(w) using time polynomial in the length of w.

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. A is poly-time reducible to B, written A ≤p B, if in addition the function f is poly-time computable.

The language BPCP, for Bounded Post Correspondence Problem, is the set of pairs (P, m) were P is a sest of dominoes (as in the ordinary PCP), m is a number written in binary, and P has a match that uses at most m total dominoes. (Recall that a match can use the same domino multiple times, and we are counting them with multiplicity. For example, the same domino used 100 times counts as 100 dominoes.)

The following languages were proved to be NP-complete either in the text of Sipser or in the exercises. You may assume without proof that they are NP-complete.

The following two languages are to be proved NP-complete on this exam: