ArticleslgStudy

science

Read-only Turing machine

Read-only Turing machine is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Read-only Turing machine rather than just read about it. In short: 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.

Key takeaways

  • Read-only Turing machine belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Read-only Turing machine to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Read-only Turing machine from memory before moving on to harder problems.

Reference excerpt

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.

Theory We define a standard Turing machine by the 9-tuple

M = ( Q , Σ , Γ , ⊢ , _ , δ , s , t , r ) {\displaystyle M=(Q,\Sigma ,\Gamma ,\vdash ,\_,\delta ,s,t,r)} where

Q {\displaystyle Q} is a finite set of states;

Σ {\displaystyle \Sigma } is the finite set of the input alphabet;

Γ {\displaystyle \Gamma } is the finite tape alphabet;

⊢∈ Γ − Σ {\displaystyle \vdash \in \Gamma -\Sigma } is the left endmarker;

_ ∈ Γ − Σ {\displaystyle \_\in \Gamma -\Sigma } is the blank symbol;

δ : Q × Γ → Q × Γ × { L , R } {\displaystyle \delta :Q\times \Gamma \rightarrow Q\times \Gamma \times \{L,R\}} is the transition function;

s ∈ Q {\displaystyle s\in Q} is the start state;

t ∈ Q {\displaystyle t\in Q} is the accept state;

r ∈ Q , r ≠ t {\displaystyle r\in Q,~r\neq t} is the reject state. So given initial state q {\displaystyle q} reading symbol a {\displaystyle a} , we have a transition defined by δ ( q , a ) = ( q 2 , a 2 , d ) {\displaystyle \delta (q,a)=(q_{2},a_{2},d)} which replaces a {\displaystyle a} with a 2 {\displaystyle a_{2}} , transitions to state q 2 {\displaystyle q_{2}} , and moves the "read head" in direction d {\displaystyle d} (left or right) to read the next input. In our 2DFA read-only machine, however, a = a 2 {\displaystyle 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.

See also Computability Turing machine equivalents Stack machine Queue automaton Quantum computer

References

External links Lecture on finite-state automata by Adam Webber

Worked examples

Example 1 — a first encounter with Read-only Turing machine

Start with the simplest possible case. Write down what Read-only Turing machine claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Read-only Turing machine before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Read-only Turing machine ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Read-only Turing machine

In research
Read-only Turing machine appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Read-only Turing machine in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Read-only Turing machine is common in secondary-school and first-year university syllabi. It links to neighbouring topics Turing machine, so understanding it makes those chapters shorter.
In everyday life
Look for Read-only Turing machine outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Read-only Turing machine in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Read-only Turing machine means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Read-only Turing machine out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Read-only Turing machine in simple terms?

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 deter…

Why does Read-only Turing machine matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Read-only Turing machine?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Read-only Turing machine.

Tags

  • Turing machine

Keep exploring