Turing Machine technique

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Oct 6 8:20
Editor
Edited
Edited
2023 Oct 6 8:27
Refs
Refs

Programming Technique for TMs

All by these do not improve computation power but these tricks make easy programming
  • Storage in the state
    • We just think of the state as a tuple—No extension to the TM model
      The machine remembers the first symbol read in its state
  • Multiple tracks just useful structure
  • Multiple tape (n-TM or math: M_n)
    • Can Use States to remember
      notion image
notion image
notion image
notion image
Computation power of Convention TM is not different but number of state Big-O is different
 

Subroutines - Convention TM

Convenient to think of TMs as a collection of interacting components or “subroutines”; M1 calls M2 by passing control to the start state of M2.
General Subroutines
Before returning read the return address into finite control, and transfer back to the right state; may have to erase things on the tape.
 

Simulating M_n with M

Configurations M2
notion image
Simulating Transition M2
notion image

Claim: We can simulate a k-tape TM using a single-tape TM M.
proof :
Deterministic: At each step, there is one possible next state, symbols to be written and direction to move the head, or the TM may halt. Nondeterministic: At each step, there are finitely many possibilities. 1. δ : Q×Γ → 2(Q×Γ×{L,R}). For instance, δ(q,X) = {(p1,Y1,D1),...,(pk,Yk,Dk)} 2. defined like for deterministic TM. X1X2···Xi−1qXi···Xn X1X2···pXi−1Y ···Xn, if (p,Y,L) ∈ δ(q,Xi); case for right moves is analogous 3. Nondeterministic TM accepts w iff there is a sequence of moves leading to an accepting state, i.e., q0w `∗ αqβ, where q is a final state
Claim: If L is accepted by an NTM N, then there is a DTM M such that L = L(M).
proof:
Note: Clearly, the converse of the above result holds since DTMs are “special forms” of NTMs. Rough Idea for proof: M tries to keep track of all possible “configurations” that N could possibly be in at any time.
  1. Works for regular languages because we only need to keep track of the states of the NFA, which is a finite set
  1. Does not work for PDAs, because we need to keep track of the various possible stack contents
  1. Is not convenient for TMs either because each choice leads to various possible tape contents, head positions, etc M simulates each possible sequence of computation steps that N may try!
empty completeness?

Recommendations