CMPSCI 501: Theory of Computation

First Midterm Exam, Spring 2017

David Mix Barrington

23 February 2017

Directions:

  Q1: 10 points
  Q2: 10 points
  Q3: 10 points
  Q4: 10 points
  Q5: 10 points
  Q6: 10 points
  Q7: 20 points
  Q8: 15 points
  Q9: 30 points
Total: 125 points

The language X over the alphabet {a, b, c} is defined by the grammar with start symbol S and rules S → aS, S → T, T → bbT, T → bc, T → Tcc, and T → ε.

The language Y over the alphabet {a, b, c} is the set {aibjck: (j = k) ∨ (|j - k| = 2)}.

The language Z over the alphabet {a, b, c} is the set {aibjck: i > j > k ≥ 0}.

A language is called Turing recognizable if and only if it is equal to the language L(M) for some (standard, deterministic, one-tape) Turing machine M. It is called Turing decidable if it is the language L(M) for some Turing machine that halts (accepts or rejects) on every input.

A string-cell Turing machine (SCTM) has a state set Q, including start state q0, accepting state qa, and rejecting state qr, an input alphabet Σ, a tape alphabet Γ with Σ ⊆ Γ, and a tape that is a sequence of cells c1, c2, c3,... At any time, the content of a tape cell is a string in Γ*. (The empty string ε plays the role of the blank symbol.) The transition function δ takes input in Q × (Γ ∪ {ε}) and has output in Q × (Γ ∪ {d, ε}) × {L, R, S}. Depending on the the current state and the leftmost character in the string in the current cell (or ε if the current cell has the empty string), the machine can either append an new character to the left of that string, delete the leftmost character (d), or leave the string unchanged (ε), and then either move left, move right, or stay put. The machien runs on an input string w ∈ Σ* by starting in state q0, looking at cell c1 which contains w, with all other cells containing ε. As with Sipser's TM's, if it is supposed to move left from c1 it stays put instead.

A restricted string-cell Turing machine (RSCTM) is a string-cell Turing machine that has only two cells (any attempt to move right from c2 results in staying put) and can only delete characters from c1, not add them.

Last modified 18 March 2017