📄 Paper 1 · 4.4 Theory of Computation
4.4.4b Tractable, Intractable Problems & The Halting Problem
AQA 7517 · A-Level Computer Science · ~18 min read

Tractable Problems

A problem is tractable if it can be solved in polynomial time — i.e. there exists an algorithm with time complexity O(nᵏ) for some constant k. Tractable problems are considered practically solvable for large inputs.

  • O(1), O(log n), O(n), O(n log n), O(n²), O(n³) — all polynomial → tractable
  • Examples: sorting (merge sort O(n log n)), searching (binary search O(log n)), matrix multiplication

Intractable Problems

A problem is intractable if no polynomial-time algorithm is known — the best known algorithms are super-polynomial (e.g. exponential or factorial). Intractable problems are considered practically unsolvable for large inputs.

  • O(2ⁿ), O(n!) — exponential and factorial → intractable
  • Even fast computers cannot solve large intractable instances in any reasonable time

Examples of intractable problems

ProblemComplexityNotes
Travelling Salesman Problem (TSP)O(n!) brute forceFinding shortest route visiting all cities once
Knapsack problemO(2ⁿ) brute forceSelecting items to maximise value within weight limit
Boolean satisfiability (SAT)O(2ⁿ) worst caseCan a set of boolean clauses all be true simultaneously?
Graph colouringExponential (general)Minimum colours to colour a graph so no adjacent same

Approaches for intractable problems

  • Heuristics — find a "good enough" approximate solution quickly (not guaranteed optimal)
  • Limit input size — solve only small instances exactly
  • Approximation algorithms — guaranteed bounds on how far from optimal

The P vs NP Problem

P — the class of problems solvable in polynomial time by a deterministic computer.

NP — the class of problems where a solution can be verified in polynomial time. (NP stands for Non-deterministic Polynomial time.)

  • TSP: given a proposed tour, verifying it visits all cities with total distance ≤ k is O(n) — so TSP is in NP
  • The famous open question: P = NP? — is every problem whose solution can be verified quickly also solvable quickly?
  • Most computer scientists believe P ≠ NP, but it remains unproven

The Halting Problem

The Halting Problem asks: Given any program P and any input I, will P eventually halt (terminate) or loop forever?

Alan Turing proved in 1936 that no general algorithm can solve the Halting Problem — it is undecidable.

Turing's proof by contradiction

// Suppose a program H(P, I) exists that returns:
//   true  → P(I) halts
//   false → P(I) loops forever

// Construct a program D(P) that:
//   if H(P, P) = true  → D loops forever
//   if H(P, P) = false → D halts

// Now run D(D):
//   If H(D, D) = true  → D(D) should halt, but D loops → contradiction!
//   If H(D, D) = false → D(D) should loop, but D halts  → contradiction!

// Therefore H cannot exist.

Why the Halting Problem matters

  • It proves there are problems that are computationally unsolvable — no algorithm can ever solve them
  • It establishes limits on what computers can do
  • Many practical problems (e.g. "does this program have a bug?", "does this program ever output X?") are undecidable for the same reason
Exam tip: AQA expects you to distinguish tractable (polynomial time = practical) from intractable (super-polynomial = impractical). Know the Halting Problem: Turing proved no algorithm can determine for all programs whether they halt — it is undecidable. Know P (solvable fast) vs NP (verifiable fast). TSP and knapsack are classic intractable examples. For intractable problems, heuristics give approximate solutions.
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.4b Tractable, Intractable & The Halting Problem

8 questions · instantly marked · AQA 7517 standard

Q1Define tractable and intractable problems, giving the key characteristic that distinguishes them.[2]
✅ Mark scheme
Mark scheme
Tractable: a problem that can be solved in polynomial time O(nᵏ) — considered practically solvable [1]; Intractable: no polynomial-time algorithm is known — best algorithms are super-polynomial (exponential/factorial), making them practically unsolvable for large n [1].
Q2Give two examples of intractable problems and state their time complexity.[2]
✅ Mark scheme
Mark scheme
Any two from: Travelling Salesman Problem — O(n!) brute force [1]; Knapsack problem — O(2ⁿ) brute force [1]; Boolean satisfiability (SAT) — O(2ⁿ) worst case [1]. Award 1 mark per correctly named problem with complexity.
Q3What is the Halting Problem? Who proved it is undecidable and when?[2]
✅ Mark scheme
Mark scheme
The problem of determining whether any given program with any given input will eventually halt or loop forever [1]; proved undecidable by Alan Turing in 1936 [1].
Q4Describe Turing's proof that the Halting Problem is undecidable. (Proof by contradiction)[4]
✅ Mark scheme
Mark scheme
Assume a program H(P,I) exists that returns true if P(I) halts, false otherwise [1]; construct a program D(P) that loops if H(P,P)=true, and halts if H(P,P)=false [1]; run D(D): if H(D,D)=true then D should halt but D loops — contradiction; if H(D,D)=false then D should loop but D halts — contradiction [1]; therefore H cannot exist — the Halting Problem is undecidable [1].
Q5What is the difference between P and NP problem classes?[2]
✅ Mark scheme
Mark scheme
P = problems that can be SOLVED in polynomial time [1]; NP = problems whose solutions can be VERIFIED in polynomial time (but may not be solvable quickly) [1].
Q6Why is the Travelling Salesman Problem (TSP) considered intractable?[2]
✅ Mark scheme
Mark scheme
The brute-force solution requires checking all possible routes — O(n!) — which becomes astronomically large even for small n [1]; no polynomial-time exact algorithm is known [1].
Q7What is a heuristic approach and why is it used for intractable problems?[2]
✅ Mark scheme
Mark scheme
A heuristic finds an approximate (near-optimal) solution quickly, without guaranteeing the optimal answer [1]; used for intractable problems because finding the exact optimal solution would take impractically long [1].
Q8Explain why the Halting Problem is significant beyond just programs: what general conclusion does it show about computing?[2]
✅ Mark scheme
Mark scheme
The Halting Problem shows there are problems that are computationally unsolvable — no algorithm can ever solve them for all possible inputs [1]; it establishes fundamental limits on what computers can compute, regardless of speed or resources [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 — Tractable & Halting Problem

10 questions · 10 minutes

← 4.4.4a Big-O Notation
31 of 70 · AQA 7517
4.4.5 Turing Machines →