Equivalence of NTMs and TMs
What is a Turing Machine? Similar to a finite automaton, but with unlimited and unrestricted memory. It uses an infinitely long tape as its memory which can be read from and written to as necessary. It accomplishes this through the use of a tape head, which moves around on the tape and reads/writes symbols. The tape head can move back and forth on the tape, allowing TMs to recognize classes of languages that are not recognizable by other computational models.
Formal definition for Turing Machine From the textbook:
Idea behind Nondeterministic Turing Machines Nondeterministic Turing Machines are similar to their deterministic counterparts in operation. NTMs still use a tape and tape head to read and write information as required. NTMs, like other nondeterministic computational models, guess as to which path to take next. The NTM may proceed down one of many available paths, and if one of those paths leads to the accepting state, the machine accepts its input.
Recall: Formal definition of NTM The only difference between TMs and NTMs, regarding their formal definition is the transition function, which for NTMs is:
Formal definition of NTM (continued..) Because an NTM has multiple computational options at each stage, its range is the power set shown above. Its range at any given state could be any subset of total moves that the TM can make.
Proof setup We want to prove Theorem 3.16 from the textbook, namely: We will do this by using a deterministic Turing Machine to simulate all possible results of an NTM. If the DTM ever finds an accept state on any branch of computation, then the equivalent NTM would accept the given input.
Proof Setup (Continued..) Imagine the computation of an NTM as a tree. Each tree branch is one way that the NTM could attempt to parse the input. The TM searches this tree, using Breadth First Search so as to avoid getting stuck in any infinite branches of computation. By using BFS, we know that the TM will search every path until an accepting state is found, or it will continue forever if there is no accepting state.
Proof We use a Multitape Turing Machine D with 3 tapes. Tape 1 always has a copy of the input string, and cannot be changed. Tape 2 keeps track of the NTMs tape on some branch of nondeterministic computation. Tape 3 keeps track of D s position in the NTM s computation tree.
Proof Tape 3 is used as a record of where the TM has been. It is represented by a string contained numbers up to b, where b is the largest number of children allowed by the transition function of the NTM. If the tape contained 123, that means it visited the root, the root s 2 nd child, and that child s 3 rd child. Not all of the paths will be valid, in which case we will skip over that path of computation and move to the next one.
Proof Step 1: Make sure tape 1 contains the input string, and tapes 2 and 3 are both empty. Step 2: Copy tape 1 to tape 2. Step 3: Simulate one branch of the NTM s computation using tape 2. While doing this, repeatedly consult tape 3 to determine which choices to make using the transition function. If the DTM rejects or the choice is invalid, go to step 4.
Proof Step 4: Replace the string on tape 3 with the next string in alphabetical order. We continue simulating the NTM by going back to step 2 and continuing computation. If at any point during the process, the TM hits an accepting state, it will accept the string and prove that the NTM is equivalent to that TM.
Corollary 3.18 We know from the concepts of determinism and nondeterminism that a DTM is automatically an NTM, so we have one direction proved. The other direction follows from Theorem 3.16, which proves that NTMs are equivalent to DTMs, and so the other direction is proved as well.
Questions? Thank you all for listening.