Supriya Ghosh (Editor)

Read only Turing machine

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

A read-only Turing machine or Two-way deterministic finite-state automaton (2DFA) is class of models of computability that behave like a standard Turing machine and can move in both directions across input, except cannot write to its input tape. The machine in its bare form is equivalent to a Deterministic finite automaton in computational power, and therefore can only parse a regular language.

Contents

Theory

We define a standard Turing machine by the 9-tuple

M = ( Q , Σ , Γ , , _ , δ , s , t , r ) where

  • Q is a finite set of states;
  • Σ is the finite set of the input alphabet;
  • Γ is the finite tape alphabet;
  • ⊢∈ Γ Σ is the left endmarker;
  • _ Γ Σ is the blank symbol;
  • δ : Q × Γ Q × Γ × { L , R } is the transition function;
  • s Q is the start state;
  • t Q is the accept state;
  • r Q ,   r t is the reject state.
  • So given initial state q reading symbol a , we have a transition defined by δ ( q , a ) = ( q 2 , a 2 , d ) which replaces a with a 2 , transitions to state q 2 , and moves the "read head" in direction d (left or right) to read the next input. In our 2DFA read-only machine, however, a = a 2 always.

    This model is now equivalent to a DFA. The proof involves building a table which lists the result of backtracking with the control in any given state; at the start of the computation, this is simply the result of trying to move past the left endmarker in that state. On each rightward move, the table can be updated using the old table values and the character that was in the previous cell. Since the original head-control had some fixed number of states, and there is a fixed number of states in the tape alphabet, the table has fixed size, and can therefore be computed by another finite state machine. This machine, however, will never need to backtrack, and hence is a DFA.

    Variants

    Several variants of this model are also equivalent to DFAs. In particular, the nondeterministic case (in which the transition from one state can be to multiple states given the same input) is reducible to a DFA.

    Other variants of this model allow more computational complexity. With a single infinite stack the model can parse (at least) any language that is computable by a Turing machine in linear time. In particular, the language {anbncn} can be parsed by an algorithm which verifies first that there are the same number of a's and b's, then rewinds and verifies that there are the same number of b's and c's. With the further aid of nondeterminism the machine can parse any context-free language. With two infinite stacks the machine is Turing equivalent and can parse any recursive formal language.

    If the machine is allowed to have multiple tape heads, it can parse any language in L or NL, according to whether nondeterminism is allowed.

    Applications

    A read-only Turing machine is used in the definition of a Universal Turing machine to accept the definition of the Turing machine that is to be modelled, after which computation continues with a standard Turing machine.

    In modern research, the model has become important in describing a new complexity class of Quantum finite automata or deterministic probabilistic automata.

    References

    Read-only Turing machine Wikipedia