CSCI 301 L34 Worksheet

Lecture 34 - Exercises

Part A - Turing Machine Design

  1. Design a one-tape Turing machine over alphabet \(\{a, b, c\}\) that accepts the language: \[ \{w: \text{ $w$ does not contain any $c$'s}\} \] Write your transition function as a table with one state per row and one tape input per column.

  2. Give an informal description of a one-tape Turing machine that accepts the language \[ \{w: w \text{ contains twice as many $0$'s as $1$'s}\} \]

  3. Give an informal description of a two-tape Turing machine that accepts the language from #2, and uses only \(\{0, 1, \square\}\) as its tape alphabet.

Part B - Extra

  1. Design a one-tape Turing machine that, instead of accepting or rejecting a string over \(\{0, 1\}\), treats that string as a binary number and adds 1 to it. The computation begins with the tape head at the leftmost (most significant) digit; when the computation completes, the tape head should be back at the leftmost digit, and the machine should switch to the accept state.
  2. Define a 4-tape Turing Machine that accepts the language of balanced, but not nested braces, parentheses, and brackets. This means that for each type of punctuation, they are properly nested if all other types of punctuation characters are ignored.