📄 Paper 1 · 4.4 Theory of Computation
4.4.5 Turing Machines
AQA 7517 · A-Level Computer Science · ~20 min read

What is a Turing Machine?

A Turing Machine (TM) is a theoretical model of computation devised by Alan Turing in 1936. It defines what can and cannot be computed. Though abstract, it captures the essence of any algorithm.

Components

  • Infinite tape — divided into cells, each holding one symbol (or blank). Extends infinitely in both directions.
  • Read/write head — reads the symbol in the current cell, writes a new symbol, and moves left or right.
  • State register — stores the current state of the machine.
  • Transition function (δ) — given the current state and current symbol, specifies: new state to enter, symbol to write, direction to move (L/R/S).

Formal Definition

A Turing Machine is formally defined as a 7-tuple:

(Q, Γ, b, Σ, δ, q₀, F)

Q  = finite set of states
Γ  = tape alphabet (all symbols that can appear on tape)
b  = blank symbol (b ∈ Γ, b ∉ Σ)
Σ  = input alphabet (Σ ⊆ Γ \ {b})
δ  = transition function: Q×Γ → Q×Γ×{L,R,S}
q₀ = start state (q₀ ∈ Q)
F  = set of accepting/halting states (F ⊆ Q)

How a Turing Machine Works

At each step:

  1. Read the symbol under the head
  2. Look up (current state, current symbol) in the transition function
  3. Write the new symbol to the tape
  4. Move the head left (L) or right (R), or stay (S)
  5. Transition to the new state
  6. If new state ∈ F → accept/halt. If no valid transition → reject.

Transition Table Example

Simple TM to replace all 0s with 1s on the tape:

Current StateRead SymbolWrite SymbolMoveNext State
q₀01Rq₀
q₀11Rq₀
q₀b (blank)bSqₐ (accept)

State Transition Diagram

Turing machines can also be represented as state diagrams. Each arrow is labelled: read / write, direction. Accepting states are shown with double circles (same convention as FSMs).

Universal Turing Machine (UTM)

A Universal Turing Machine takes as input a description of any Turing machine M and an input I, and simulates M running on I.

  • The UTM reads the description of M from its tape
  • This is the theoretical foundation of the stored-program computer — a machine that can run any program encoded as data
  • Modern computers are implementations of the UTM concept

Church-Turing Thesis

The Church-Turing Thesis states: "Any function that can be computed by an algorithm can be computed by a Turing machine."

  • This is a thesis (philosophical claim), not a mathematical proof — it cannot be proved or disproved
  • It defines the limits of what is computable
  • Accepted universally — every known algorithm can be implemented as a TM

Turing Completeness

A system is Turing complete if it can simulate any Turing machine. All modern general-purpose programming languages (Python, Java, C++, etc.) are Turing complete — they can compute anything a TM can compute.

What Turing Machines Can and Cannot Do

Can compute (decidable)Cannot compute (undecidable)
Any algorithm that always halts with an answerThe Halting Problem
Arithmetic, sorting, searching"Does this program ever output 'hello'?"
Recognising regular and context-free languagesEquivalence of two arbitrary programs
Exam tip: AQA expects you to describe the components of a Turing machine (tape, head, state register, transition function), read/complete a transition table, and explain the Universal Turing Machine as the foundation of modern computers. Know the Church-Turing Thesis (any computable function can be computed by a TM — it's a thesis, not a proof). Turing completeness means a system can simulate any TM. The Halting Problem shows TMs have limits.
Click through the slides at your own pace. Use arrow keys or click to advance.
Click slide or press arrow keys to navigate

Worksheet — 4.4.5 Turing Machines

8 questions · instantly marked · AQA 7517 standard

Q1List the four main components of a Turing Machine.[4]
✅ Mark scheme
Mark scheme
One mark each for: infinite tape (divided into cells holding symbols or blanks) [1]; read/write head (reads current symbol, writes new symbol, moves L or R) [1]; state register (stores the current state) [1]; transition function δ (given state and symbol → new state, write symbol, direction) [1].
Q2What does the transition function of a Turing Machine take as input, and what does it produce as output?[2]
✅ Mark scheme
Mark scheme
Input: the current state and the symbol currently under the read/write head [1]; Output: the new state to enter, the symbol to write to the tape, and the direction to move the head (L/R/S) [1].
Q3Describe, in order, the steps a Turing Machine performs at each computation step.[3]
✅ Mark scheme
Mark scheme
Read the symbol under the head [1]; write the new symbol (as specified by δ) and move the head left or right [1]; transition to the new state — halt/accept if in an accepting state, otherwise repeat [1].
Q4What is a Universal Turing Machine (UTM)?[2]
✅ Mark scheme
Mark scheme
A Universal Turing Machine takes as input a description (encoding) of any Turing machine M and an input I, and simulates M running on I [1]; it underpins the concept of the stored-program computer — a machine that can run any program encoded as data [1].
Q5State the Church-Turing Thesis. Is it a theorem or a thesis? What is the difference?[3]
✅ Mark scheme
Mark scheme
"Any function that can be computed by an algorithm can be computed by a Turing machine" [1]; it is a thesis (philosophical claim) not a theorem [1]; a theorem has a mathematical proof, but a thesis cannot be formally proved or disproved — it is an accepted belief based on evidence [1].
Q6What does it mean for a programming language to be Turing complete?[2]
✅ Mark scheme
Mark scheme
A system is Turing complete if it can simulate any Turing machine [1]; this means it can compute anything that is computable — all general-purpose programming languages (Python, Java, C++) are Turing complete [1].
Q7In a Turing Machine transition table, what does the entry δ(q₀, 0) = (q₁, 1, R) mean?[3]
✅ Mark scheme
Mark scheme
When in state q₀ and reading symbol 0 [1]; write symbol 1 to the tape [1]; move the head one cell to the right and transition to state q₁ [1].
Q8How does the Universal Turing Machine relate to modern computers?[2]
✅ Mark scheme
Mark scheme
The UTM is the theoretical model for the stored-program computer — a machine that reads program instructions as data and executes them [1]; modern computers are physical implementations of this concept, capable of running any program (they are Turing complete) [1].
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 9
Click to reveal definition
🎉
All cards reviewed!
TermDefinition
🎯

Mini Test — Turing Machines

10 questions · 10 minutes

← 4.4.4b Tractable & Halting Problem
32 of 70 · AQA 7517
4.13.1 Analysis & Design →