📘 Paper 2 · Topic 7: Algorithm Design & Problem Solving
7.1 Algorithm Design & Problem Solving
Cambridge IGCSE Computer Science 0478 · ~14 min read · ✓ Free

What is an Algorithm?

An algorithm is a precise, step-by-step set of instructions that solves a problem or completes a task. All algorithms must be:

  • Precise — each step must be unambiguous
  • Finite — the algorithm must eventually stop
  • Correct — it must produce the right result for all valid inputs

Algorithms are the foundation of all computer programs. They are independent of any programming language.

Computational Thinking

Computational thinking is a problem-solving approach that involves four key techniques:

TechniqueDescriptionExample
DecompositionBreaking a complex problem into smaller, more manageable sub-problemsBreaking "make a website" into: design, front-end, back-end, testing
AbstractionRemoving unnecessary detail and focusing only on the relevant aspectsA map shows roads but not every tree — unnecessary detail is hidden
Pattern recognitionIdentifying similarities or patterns that can be used to solve similar problemsRecognising that sorting a list of names uses the same logic as sorting numbers
Algorithm designDeveloping a step-by-step solution to a problemWriting pseudocode to describe a sorting algorithm

Representing Algorithms

Algorithms can be represented in different ways:

1. Pseudocode

Pseudocode is an informal, human-readable way to describe an algorithm using structured language (similar to a programming language but without strict syntax). Cambridge uses its own pseudocode style.

total ← 0
FOR i ← 1 TO 10
    INPUT number
    total ← total + number
NEXT i
OUTPUT total / 10

2. Flowcharts

Flowcharts use standard symbols to visually represent an algorithm:

Symbol (shape)Meaning
Oval/Rounded rectangleStart / End (Terminator)
RectangleProcess (action, calculation)
DiamondDecision (yes/no question)
ParallelogramInput / Output
ArrowFlow of control (direction)

Structure of Algorithms

All algorithms are built from three fundamental structures:

  • Sequence — instructions carried out one after another in order
  • Selection — choosing between paths based on a condition (IF...THEN...ELSE)
  • Iteration — repeating a set of instructions (loops: FOR, WHILE, REPEAT...UNTIL)

Variables and Identifiers

A variable is a named location in memory that stores a value that can change during program execution. A constant is a named value that does not change. In Cambridge pseudocode, assignment uses the ← symbol:

score ← 0
MAX_SCORE ← 100
score ← score + 10
Exam tip: Know all four computational thinking techniques and be able to give a definition and example for each. For flowcharts, know the shapes and their meanings. The distinction between decomposition (breaking down) and abstraction (removing irrelevant detail) is frequently tested.
▶
Video coming soon
Click slide or press arrow keys to navigate
✍️

Worksheet — Algorithm Design

5 questions · 12 marks

Q1State three characteristics that all algorithms must have. [3]
✅ Mark scheme
Precise/unambiguous — each step must be clear [1]; Finite — the algorithm must eventually stop [1]; Correct — it must produce the right output for valid inputs [1]
Q2Explain the difference between decomposition and abstraction. [4]
✅ Mark scheme
Decomposition: breaking a complex problem down into smaller, more manageable sub-problems [1]; e.g., splitting a game project into graphics, game logic, and sound modules [1]; Abstraction: removing unnecessary details and focusing only on what is relevant to the problem [1]; e.g., a map shows roads but hides the texture of the ground [1]
Q3Name the flowchart symbol used for a decision and describe when it is used. [2]
✅ Mark scheme
Diamond shape [1]; used when the algorithm needs to check a condition and take different paths depending on whether the answer is yes or no [1]
Q4Name the three fundamental programming structures used in algorithms. [1]
✅ Mark scheme
Sequence, selection, and iteration [1] (all three required for the mark)
Q5A student wants to create a school timetabling system. Describe how they could use decomposition to plan this problem. [2]
✅ Mark scheme
They could break it into sub-problems [1] such as: managing the list of subjects, allocating rooms, assigning teachers, handling clashes, generating the output timetable [1 — any two valid sub-tasks]
Quiz — Algorithm Design
Q 1 of 8
Score
/ 8
Click to reveal
TermDefinition
🎯

Mini Test — Algorithm Design

10 minutes · mixed marks

← 6.3 Copyright & P2P Topic 7: Algorithm Design Next: 7.2a Pseudocode & Flowcharts →