Theory of Computation · Turing Machines
Introduction to Turing Machines and Tape with Read/Write Head
Overview
A Turing machine is a model of computation built from a tape holding the input, a read/write head, and a finite control that directs the head.
It matters because it differs from finite automata and pushdown automata in two decisive ways: the head moves in both directions, and it can write on the tape as well as read from it.
Key concepts
- Turing machine: a model of computation whose behaviour is best understood through examples before the formal theory.
- Two-way movement: finite automata and pushdown automata move only in one direction, left to right; a Turing machine can move in both directions (left and right).
- Read and write: a Turing machine can both read a symbol from the tape and write a symbol onto it.
- Tape: holds the input on which the machine operates.
- Read/write head: reads the symbol under it and can also write on the tape.
- Finite control: directs the head.
- Language of the example: . It is not regular but is context-free; a context-free grammar and a pushdown automaton for it have already been seen.
The restriction is just the usual form of the example language; a Turing machine can accept epsilon (for example, if the start state is a final state).
How it works
- The input string is written on the tape.
- The finite control positions the read/write head over a tape cell.
- The head reads the symbol in that cell.
- Based on the finite control's state and the symbol read, the machine may write a symbol into that cell.
- The head then moves left or right (unlike FA/PDA, which only move left to right).
- The read–write–move cycle repeats; acceptance or rejection is decided by the finite control.
Formulas
- — the language to be accepted by the Turing machine; is the number of 's, equal to the number of 's (the restriction is just the standard form of the example; a TM can accept epsilon).
Worked examples
Design a Turing machine that accepts
- Goal: design a Turing machine that accepts with .
- Given language: .
- Is regular? No, it is not regular.
- Is context-free? Yes, it is context-free — a context-free grammar for it has already been seen, and a pushdown automaton for it has already been designed.
- Next step: see how a Turing machine works on this language (the construction follows).
Comparison
| Feature | Finite Automata / Pushdown Automata | Turing Machine |
|---|---|---|
| Head movement | One direction only (left to right) | Both directions (left and right) |
| Tape access | Read only | Read and write |
| Storage structure | Finite states / stack | Tape with read/write head |
Revision summary
- A Turing machine moves its head in both directions; FA and PDA move only left to right.
- A Turing machine can read from and write on the tape.
- Components: tape (holds the input), read/write head, finite control.
- is not regular but is context-free.
- The example language uses by convention; a Turing machine can accept epsilon if its start state is a final state.
Previous-year exam insights
- A non-deterministic Turing machine can always be converted to an equivalent deterministic Turing machine (both accept exactly the recursively enumerable languages); non-determinism adds no power to a TM.
Asked inGATE 2008 - The Chomsky hierarchy of recognisers: regular languages — finite automata; context-free languages — pushdown automata; context-sensitive languages — linear bounded automata (LBA); recursively enumerable languages — Turing machines.
Asked inUGC NET 2018 - A PDA behaves like a Turing machine only when it has two or more stacks (auxiliary memory); with one stack it recognises exactly the context-free languages, and with zero stacks only regular languages.
Asked inUGC NET 2018 - A finite state machine is a Turing machine with a finite (read-only) tape, without rewinding capability and with unidirectional tape movement.
Asked inISRO 2016 - To find the language accepted by a given TM: start at the start state on the leftmost input symbol, follow the transition table (state, symbol) → (new state, written symbol, L/R), and collect exactly the strings that reach a final state; a string is rejected if the machine halts in a non-final state or the transition is undefined.
Asked inUGC NET 2016GATE 2003 - A TM configuration is written as u q v (tape contents with the head on the first symbol of v and current state q); the initial configuration is q0 w and acceptance means reaching a final state, so halting in a non-final state or looping means rejection.
Asked inGATE 2003UGC NET 2016