217 Complexity — Nondeterministic
217.1 Overview
This module defines nondeterministic multi-tape Turing machines in the sense of [AB09, §2.1.2]: machines with two transition functions \(\delta _0\) and \(\delta _1\), one of which is selected by a choice bit at every step, so that a finite run is governed by a choice word with one bit per step. It provides the run semantics under a choice word, the predicate that every branch halts within a given number of steps (monotone in the bound), the bundled layer of machines with a finite state set, and the view of a deterministic machine as a nondeterministic one that ignores its choices.
217.2 Declarations
A nondeterministic Turing machine with a read-only input tape, \(k\) work tapes, and a write-only output tape, over an alphabet of symbols extended by a blank, consists of an initial state \(q_0\) and two transition functions \(\delta _0\) and \(\delta _1\), one for each value of a choice bit. Each \(\delta _b\) maps the current state, the (possibly blank) symbol under the input head, and the \(k\) symbols under the work-tape heads to a one-step action: a movement of the input head, a write-and-move instruction for each work tape, an optional symbol to append to the output, and a successor state or the decision to halt. Neither the alphabet nor the state set is required to be finite.
Let \(M\) be a nondeterministic multi-tape Turing machine with transition functions \(\delta _0, \delta _1\), let \(b \in \{ 0,1\} \) be a choice bit, and let \(c\) be a configuration of \(M\) on a fixed input. The step of \(M\) from \(c\) under \(b\) returns \(c\) unchanged if \(c\) is halted (its state component is empty), whatever the value of \(b\); otherwise it applies to \(c\) the action that \(\delta _b\) prescribes for the current state, the symbol under the input head, and the symbols under the \(k\) work-tape heads.
The starting configuration of a nondeterministic multi-tape Turing machine \(M\) on an input word \(x\): the machine is in its initial state \(q_0\), the input head scans the first symbol of \(x\), all work tapes are blank with their heads at cell \(0\), and the output tape is empty.
Let \(M\) be a nondeterministic multi-tape Turing machine and \(c\) a configuration of \(M\) on a fixed input. For a choice word \(w = b_1 b_2 \cdots b_m \in \{ 0,1\} ^*\), the run of \(M\) from \(c\) under \(w\) is the configuration obtained from \(c\) by performing \(m\) steps of \(M\), the \(i\)-th of them under the choice bit \(b_i\). Recursively, the run under the empty word is \(c\), and the run under \(b w\) is the run under \(w\) from the configuration reached by one step of \(M\) from \(c\) under \(b\).
Let \(M\) be a nondeterministic multi-tape Turing machine and \(c\) a configuration of \(M\) on some input. Running \(M\) from \(c\) under the empty choice word yields \(c\) itself.
Let \(M\) be a nondeterministic multi-tape Turing machine, \(c\) a configuration of \(M\) on some input, \(b \in \{ 0,1\} \) a choice bit, and \(w\) a choice word. Running \(M\) from \(c\) under the word \(b w\) gives the same configuration as running \(M\) under \(w\) from the configuration reached by one step of \(M\) from \(c\) under the choice bit \(b\).
Let \(M\) be a nondeterministic multi-tape Turing machine, \(c\) a configuration of \(M\) on some input, and \(w, w'\) choice words. Running \(M\) from \(c\) under the concatenation \(w w'\) gives the same configuration as first running \(M\) from \(c\) under \(w\) and then running \(M\) under \(w'\) from the configuration so reached.
Let \(M\) be a nondeterministic multi-tape Turing machine, \(b \in \{ 0,1\} \) a choice bit, and \(c\) a configuration of \(M\) on some input whose state component is empty (the machine has halted). Then one step of \(M\) from \(c\) under \(b\) leaves \(c\) unchanged.
Let \(M\) be a nondeterministic multi-tape Turing machine and \(c\) a configuration of \(M\) on some input whose state component is empty (the machine has halted). Then for every choice word \(w\), running \(M\) from \(c\) under \(w\) yields \(c\) itself.
Let \(M\) be a nondeterministic multi-tape Turing machine, \(x\) an input word, and \(t \in \mathbb {N}\). The machine \(M\) halts on \(x\) within \(t\) steps along every branch if, for every choice word \(w \in \{ 0,1\} ^t\) of length exactly \(t\), the configuration reached by running \(M\) under \(w\) from its initial configuration on \(x\) is halted, that is, has an empty state component.
Let \(M\) be a nondeterministic multi-tape Turing machine, \(x\) an input word, and \(t \le t'\) natural numbers. If for every choice word of length \(t\) the run of \(M\) under it from the initial configuration on \(x\) ends in a halted configuration, then the same holds for every choice word of length \(t'\).
For an alphabet \(\Sigma \), a finite nondeterministic Turing machine consists of a number \(k \in \mathbb {N}\) of work tapes, a finite state set with decidable equality, and a nondeterministic multi-tape Turing machine with \(k\) work tapes and those states, whose tape cells hold either a symbol of \(\Sigma \) or a blank.
Let \(M\) be a deterministic multi-tape Turing machine with \(k\) work tapes, initial state \(q_0\), and transition function \(\delta \). The associated nondeterministic machine has the same tapes, states, and initial state \(q_0\), and both of its transition functions \(\delta _0\) and \(\delta _1\) are equal to \(\delta \), so that its behaviour does not depend on the choice bit.
Let \(M\) be a deterministic multi-tape Turing machine with transition function \(\delta \), let \(N\) be the nondeterministic machine with the same initial state whose two transition functions both equal \(\delta \), and let \(x\) be an input word. Then the initial configuration of \(N\) on \(x\) coincides with the initial configuration of \(M\) on \(x\).
Let \(M\) be a deterministic multi-tape Turing machine with transition function \(\delta \), and let \(N\) be the nondeterministic machine with the same initial state whose two transition functions both equal \(\delta \). For every configuration \(c\) on a fixed input and every choice word \(w \in \{ 0,1\} ^*\), the run of \(N\) from \(c\) under \(w\) equals the configuration reached by running \(M\) from \(c\) for \(|w|\) steps.
Let \(\Sigma \) be an alphabet and \(M\) a finite deterministic Turing machine over \(\Sigma \) with \(k\) work tapes, a finite state set, and transition function \(\delta \). The associated finite nondeterministic Turing machine has the same number \(k\) of work tapes and the same state set, and as underlying machine the nondeterministic machine with the same initial state whose two transition functions both equal \(\delta \).