AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Fundamentals of algorithms

    Master the core of problem-solving with the Fundamentals of Algorithms. This guide covers decomposition, abstraction, flowcharts, pseudocode, and trace tables—the essential tools you need to break down complex problems and secure top marks in your GCSE Computer Science exam.

    • 5 min read
    • 3 worked examples
    • 5 practice questions
    • 6 key terms

    Study Notes

    Overview

    Header image for Fundamentals of AlgorithmsOpen full-size image (opens in a new tab)

    Algorithms are the beating heart of Computer Science. At their core, algorithms are simply precise, step-by-step instructions designed to solve specific problems. But mastering this topic is about more than just writing code; it's about developing a computational mindset. This topic introduces you to powerful problem-solving techniques like decomposition and abstraction, and teaches you how to represent your ideas clearly using flowcharts and pseudocode.

    Why does this matter? Because before you can write a successful computer program, you need a flawless logical plan. Examiners love testing this topic because it reveals whether you truly understand the logic behind the code. You can expect a mix of questions, from defining key terms to tracing the execution of complex algorithms using trace tables. By mastering these fundamentals, you are building the foundation for the entire programming section of your specification.

    Key Concepts

    Concept 1: Decomposition

    Decomposition is the process of breaking down a large, complex problem into smaller, more manageable sub-problems.

    Why does this work? Human brains struggle to hold massive amounts of complexity at once. By dividing a problem, you can tackle each small piece individually. In software development, this allows teams of programmers to work on different parts of a system simultaneously without stepping on each other's toes.

    Example: Imagine designing a school management system. That's a huge task! But if you decompose it, you get sub-problems: a system for attendance, a system for grades, a system for timetables, and a system for parent communication. Each of these is easier to design and code than the whole system at once.

    Concept 2: Abstraction

    Decomposition and Abstraction visualizedOpen full-size image (opens in a new tab)

    Abstraction is the process of removing or hiding unnecessary detail so you can focus on the essential features of a problem.

    Why is this necessary? Because real-world problems are often messy and full of irrelevant data. If you tried to model every single physical property of a car in a racing game (like the exact molecular structure of the tires), the game would be too complex to run. Abstraction lets you say: "For this game, I only care about the car's speed, weight, and colour."

    Example: The classic example is the London Underground map. It doesn't show the exact geographical twists and turns of the tracks, nor the streets above. It abstracts all that away to show you only what you need to know: the stations and the lines connecting them.

    Concept 3: Representing Algorithms (Flowcharts and Pseudocode)

    Algorithms are not computer programs. They are the logical plan. To communicate this plan, we use specific representations.

    Flowcharts use visual symbols to show the flow of logic:

    • Oval/Rounded Rectangle: Start or End (Terminals)
    • Rectangle: Process (e.g., count = count + 1)
    • Diamond: Decision (e.g., is count > 10?). Crucially, this must have two exits: Yes and No.
    • Parallelogram: Input or Output (e.g., OUTPUT count)

    Pseudocode is a text-based representation that looks like a simplified programming language. It ignores the strict syntax rules of languages like Python or Java, focusing instead on the logic.

    Concept 4: Trace Tables

    Step-by-step Trace Table exampleOpen full-size image (opens in a new tab)

    Trace tables are a manual way to test an algorithm. You create a table with a column for each variable, and you track how the values change step-by-step as you mentally execute the algorithm.

    Why do we use them? To find logic errors before we ever write a line of code, or to determine the purpose of an unknown algorithm in an exam.

    Example: If an algorithm loops three times, adding 2 to a variable x (which starts at 0) each time, your trace table would show x changing from 0, to 2, to 4, to 6 on successive rows.

    Practical Applications

    These concepts aren't just for exams; they run the modern world.

    • Sat-Navs: Use abstraction (ignoring scenery to focus on roads) and algorithms (finding the shortest path) to get you home.
    • Search Engines: Use highly complex algorithms to sort billions of web pages in milliseconds.
    • Game Development: Uses decomposition to split work between physics engines, graphics rendering, and AI logic.

    Check what you remember

    Read the wording for your board, then hide it and explain Algorithm in your own words. Rough notes are fine. This is a self-check, with no mark or grade.

    Reference: AQA

    A precise, step-by-step sequence of instructions used to solve a problem or complete a task.
    AQA

    Interactive Diagrams

    2 interactive diagrams to visualise key concepts

    Conceptual Flow Outline

    Start
    ➔Input User Age
    Input User Age
    ➔Is Age >= 18?
    Is Age >= 18?
    ➔"Yes"Output: Access Granted
    ➔"No"Output: Access Denied
    Output: Access Granted
    ➔End
    Output: Access Denied
    ➔End

    A simple flowchart demonstrating a decision process using standard symbols.

    Conceptual Flow Outline

    Complex Problem: Build Video Game
    ➔Sub-problem: Graphics Engine
    ➔Sub-problem: Physics Engine
    ➔Sub-problem: User Input
    ➔Sub-problem: Audio System
    Sub-problem: Graphics Engine
    ➔Render Textures
    ➔Handle Lighting

    A decomposition diagram showing how a complex problem is broken into sub-problems.

    Worked Examples

    3 worked examples — open one to explore the question and available guidance.

    Practice Questions

    Try the question, then reveal an answer plan or example response

    Q1

    State the three essential properties that an algorithm must have. (3 marks)

    3 marks
    foundation

    Hint: Think about whether the steps can be misunderstood, if it ever stops, and if the steps are actually possible.

    Q2

    A student is writing a program to simulate a queue at a theme park ride. Describe how abstraction could be used in this simulation. (3 marks)

    3 marks
    standard

    Hint: What details about the people in the queue do not matter for calculating wait times?

    Q3

    Explain one advantage of using decomposition when designing a complex software system. (2 marks)

    2 marks
    standard

    Hint: Think about how teams of programmers work together.

    Q4

    Look at the following pseudocode:
    1 x <- 5
    2 y <- 10
    3 WHILE x < y DO
    4 x <- x + 2
    5 ENDWHILE
    6 OUTPUT x
    What will be output when this algorithm finishes executing? (2 marks)

    2 marks
    challenging

    Hint: Mentally trace the values of x. Does the loop run when x is 9? What does x become?

    Q5

    Draw the standard flowchart symbol used for a process, and the symbol used for a decision. (2 marks)

    2 marks
    foundation

    Hint: One is a simple box, the other is a jewel shape.

    Ready to test yourself interactively?

    Active recall beats reading alone. Answer questions on Fundamentals of algorithms with instant AI scoring and mark scheme guidance.

    Start interactive practice

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Exam technique

    How to turn what you know into marks

    How to approach the question

    Always identify the command word first. For algorithm questions, determine if you are being asked to write logic (pseudocode), trace logic (trace table), or explain a concept (decomposition/abstraction). Highlight the specific scenario given and ensure your examples relate to it.

    How to structure your answer

    For 'Explain' questions: Point -> Evidence -> Because. For Trace Tables: Go line-by-line, never skip a step mentally, and only write in a cell when a value changes.

    Timing

    Approximately 1 minute per mark, so a 6-mark trace table question should take about 6-7 minutes.

    Common pitfalls

    • Drawing flowchart decision diamonds with only one exit arrow (they must have a 'Yes' and 'No' exit).
    • Failing to record every single variable change in a trace table, or writing values in the wrong row.
    • Writing actual Python code when asked for an algorithm or pseudocode (though examiners often credit correct logic, it's safer to use standard pseudocode).

    What the command words want

    Trace
    Methodically follow the algorithm step-by-step, recording variable states.
    Compare
    Identify similarities AND differences - use comparative language.
    Explain
    Say HOW or WHY - use 'because' to link cause and effect.
    Describe
    Say what happens or what something is like - use correct terminology.
    Calculate
    Show working, use correct formula, include units.
    State/Give
    Brief factual answer - 1-2 words or a short phrase.
    Watch or listen (optional)
    🎙 Podcast Episode
    Fundamentals of algorithms
    0:00-0:00

    Test your understanding of Fundamentals of algorithms

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge