Computer Science
04782026–2028 syllabus

COMPUTER SCIENCE · CHAPTER 6

Algorithm design

Develop, represent, test and improve precise solutions to computational problems.

Full syllabus4 connected sectionsSyllabus-aligned guide

LEARNING OBJECTIVES

What you will be able to do

  • decompose problems into inputs, processes and outputs
  • write and trace pseudocode and flowcharts
  • apply validation, verification and test data
  • use standard searching, sorting, counting and totalling algorithms

AT A GLANCE

Syllabus0478Coverage2026–2028Sections4LevelFull syllabus

INTRODUCTION · THE BIG IDEA

Develop, represent, test and improve precise solutions to computational problems.

An algorithm is a finite, ordered solution independent of a particular programming language. Good design begins by understanding the problem and decomposing it into manageable modules.

Tracing and systematic test data expose faults before implementation becomes expensive.

01

SECTION 01

Problem analysis and decomposition

Core concept

State inputs, required outputs, processing, constraints and success criteria. Abstraction removes irrelevant detail, while decomposition creates modules with clear responsibilities and interfaces.

A structure diagram shows module hierarchy. Each module should have a clear purpose, parameters and result so teams can develop and test parts independently.

ORIGINAL STUDY DIAGRAMFrom problem to modules
1Define inputs and outputs
2Identify rules and constraints
3Split into cohesive tasks
4Specify interfaces
5Review against requirements
02

SECTION 02

Pseudocode, flowcharts and tracing

Core concept

Pseudocode expresses sequence, selection and iteration using consistent keywords and indentation. Flowcharts use standard start/end, process, input/output and decision symbols with directed flow lines.

A trace table records variable values and outputs after each relevant statement or loop pass. Dry-running checks logic without execution and helps reveal off-by-one errors, wrong conditions and uninitialised totals.

ORIGINAL STUDY DIAGRAMTrace a loop
1Write initial variable values
2Evaluate condition
3Execute body in order
4Record every change
5Repeat until condition fails
03

SECTION 03

Validation, verification and test data

Core concept

Validation checks may include range, length, type, format, presence and check digit. Verification checks copying accuracy through double entry or visual comparison.

Normal test data lies within expected range, abnormal or erroneous data should be rejected, boundary data lies at accepted limits and extreme data is the largest or smallest valid value. A test plan states data, type, expected result, actual result and pass/fail outcome.

Test design
Data typePurpose
Normalconfirm ordinary valid input
Boundarytest exact limits and just outside
Abnormalconfirm invalid input is rejected
Extremetest largest or smallest valid value
04

SECTION 04

Standard algorithms

Core concept

Linear search examines items until a match or the end. Bubble sort repeatedly compares adjacent items and swaps those out of order until a pass makes no swaps.

Counting increases a counter when a condition is met; totalling adds values to an accumulator; finding maximum or minimum starts from the first item and updates when a more extreme value appears. These patterns can be combined with arrays and loops.

Original worked example

Trace one bubble-sort pass

  1. Start [7, 3, 5, 2].
  2. Compare 7 and 3: swap → [3, 7, 5, 2].
  3. Compare 7 and 5: swap → [3, 5, 7, 2].
  4. Compare 7 and 2: swap → [3, 5, 2, 7].

Answer: After the first pass, the largest value 7 is in its final position.

QUICK CHAPTER SUMMARY

The ideas to carry forward

  • Analyse before representing or coding a solution.
  • Pseudocode and flowcharts must be unambiguous.
  • Test plans cover valid limits and invalid cases.
  • Standard patterns reduce algorithm errors.

QUICK REVISION CHECKLIST

Can you do each of these without your notes?

  • decompose problems into inputs, processes and outputs
  • write and trace pseudocode and flowcharts
  • apply validation, verification and test data
  • use standard searching, sorting, counting and totalling algorithms