Skip to content

Theory of Computation

This topic explores fundamental concepts that shape our understanding of the world.

The theory of computation studies what can be computed and what cannot. It provides the mathematical foundations that explain why some problems are solvable by algorithms and others are not, and classifies problems by their inherent difficulty.

  • Deterministic finite automata (DFA) — states, transitions, accept/reject; modelling simple pattern recognisers
  • State transition diagrams — drawing and interpreting FSMs
  • State transition tables — tabular representation of FSMs
  • Mealy and Moore machines — output-producing FSMs and their differences
  • Syntax and semantics — concatenation, alternation (|), Kleene star (*), grouping
  • Relationship to FSMs — every regular expression has an equivalent FSM and vice versa
  • Pattern matching — using regular expressions for validation and searching
  • Definition — infinite tape, read/write head, finite state controller, transition function
  • Universal Turing machine — a TM that can simulate any other TM
  • Church-Turing thesis — any effectively computable function can be computed by a Turing machine
  • Decidable problems — problems for which an algorithm always produces a yes/no answer
  • Undecidable problems — the Halting Problem; proof by contradiction that no algorithm can determine whether an arbitrary program halts
  • Implications — why undecidability matters for real-world software engineering
  • P and NP classes — problems solvable in polynomial time vs. verifiable in polynomial time
  • NP-completeness — the hardest problems in NP; no known polynomial-time solution
  • Why this matters — practical implications for cryptography, optimisation, and algorithm design
  1. Draw FSM state diagrams for every problem. Start with the initial state, identify accepting states, and fill in transitions systematically.
  2. Convert between representations. Practise converting state diagrams to state tables and vice versa.
  3. Understand the Halting Problem proof. It is a classic proof by contradiction that appears on many exam papers. Be able to reproduce the argument.
  4. Distinguish between FSMs and Turing machines. FSMs have finite memory (states only); Turing machines have infinite memory (tape). This is the key difference in computational power.
  5. Practise regular expressions. Write patterns for phone numbers, email addresses, and other validation tasks.

Follow the sidebar order. Each page provides formal definitions, worked examples with state diagrams, and exam-style problems. Start with FSMs, as they are the most frequently examined topic in this section.

This section provides comprehensive A-Level Computer Science content for Theory Of Computation, covering all specification points with detailed explanations, worked examples, and practice questions.

Each page in this section includes:

  • Definitions: Clear, precise explanations of key concepts
  • Worked Examples: Step-by-step solutions with annotations
  • Practice Questions: Multiple-choice and structured questions with mark schemes
  • Common Pitfalls: Errors to avoid and how to fix them
  • Exam Tips: Strategies for maximising marks in this topic
  1. Read the introductory page to understand the topic overview
  2. Work through each sub-topic in order
  3. Attempt the practice questions before checking solutions
  4. Use the flashcards to revise key terminology
  5. Complete the diagnostic test to identify remaining gaps
  • Core definitions and principles
  • Application to examination-style questions
  • Links to related topics across the specification
  • Assessment objective alignment (AO1, AO2, AO3)
  • Active Recall: Test yourself regularly rather than re-reading notes
  • Spaced Practice: Revisit this topic at increasing intervals
  • Interleaving: Mix with other topics during revision sessions
  • Elaboration: Explain concepts in your own words

Focus on command word interpretation and mark scheme analysis. Practice timing yourself on questions to build speed and accuracy. Review examiner reports for this topic to understand common student errors.

This landing page provides comprehensive coverage of Computer Science content for the Alevel qualification, with detailed explanations, worked examples, and practice questions aligned to the specification.

This page includes:

  • Key Definitions: Precise explanations of essential concepts
  • Core Concepts: Detailed treatment of fundamental principles
  • Worked Examples: Step-by-step solutions demonstrating application
  • Practice Questions: Examination-style questions with mark schemes
  • Common Pitfalls: Frequent errors and how to avoid them
  • Exam Tips: Strategies for maximising marks
  1. Read through the introductory material to establish context
  2. Study the definitions and core concepts carefully
  3. Work through the worked examples, following each step
  4. Attempt the practice questions independently
  5. Review your answers against the provided solutions
  6. Note any areas requiring further revision
  • Foundational definitions and terminology
  • Application of principles to examination contexts
  • Connections to related topics within the specification
  • Assessment objective alignment
  • Active Recall: Test yourself on the material rather than passively re-reading
  • Spaced Repetition: Review this content at increasing intervals
  • Interleaving: Mix this topic with others during study sessions
  • Elaborative Interrogation: Ask yourself why each concept works

Practise applying these concepts under timed conditions. Focus on understanding what each question is asking and how marks are allocated. Review examiner reports to learn from common mistakes made by other students.