📚 Knowledge Library — Topic 7.4 — Algorithm Design & Problem Solving

Structure Diagrams Explained Simply

Learn how a large system and its smaller sub-systems are arranged in a clear visual hierarchy before individual algorithms are designed.

1. Invitation

Decomposition explains the parts. A structure diagram shows them.

A structure diagram is a hierarchical diagram that shows how a system has been divided into smaller sub-systems.

The complete system appears at the top. Its main parts appear underneath, followed by any smaller parts.

💡 Key idea: a structure diagram shows the organisation of a system from the whole down to its parts.
Figure 1.1
Top-Down Structure
Whole system

Main sub-systems

Smaller sub-systems
2. Big Idea

The diagram is a hierarchy, not a sequence.

The boxes show which parts belong inside larger parts. They do not show the order in which instructions run.

A structure diagram answers: “What is the system made from?” A flowchart answers: “What happens next?”

💡 Structure = organisation. Flowchart = sequence.
Figure 2.1
Do Not Confuse Them
Structure diagram
= parts

Flowchart
= steps
3. FutureLogic Bridge

Think of a school organisation chart.

The school appears at the top. Departments sit underneath it, and individual teams appear below each department.

The chart does not show who enters the building first. It shows how the organisation is divided.

💡 Bridge: a structure diagram is an organisation chart for a computer system.
Figure 3.1
School Organisation
School
Teaching
Administration
Support
4. Reading the Levels

Each level gives more detail.

The top box names the complete system. The next level contains its main sub-systems.

Lower levels decompose those sub-systems further until the parts are clear enough to design as separate algorithms.

💡 Moving downward means moving from general to specific.
Figure 4.1
Levels of Detail
Level 0: whole system
Level 1: main parts
Level 2: smaller tasks
5. Visual Example

A calculator can be decomposed into input, process and output.

The calculator is the complete system. Its three main sub-systems are input, process and output.

Calculator
Input
Number 1
Operator
Number 2
Process
Calculate
Choose operation
Output
Display result

A structure diagram shows how the calculator is divided. It does not show the order in which these actions occur.

6. Building a Structure Diagram

Begin with the whole system and work downward.

First, write the name of the complete system at the top.

Next, identify its main functions and place them underneath. Split any function again when it still contains several separate tasks.

💡 Build method: whole system → main functions → smaller tasks.
Figure 6.1
Three-Step Method
1. Name the system
2. Add main parts
3. Add more detail
7. Computational Thinking

The diagram makes decomposition visible.

SkillHow it appears
DecompositionThe system is divided into smaller parts.
Pattern recognitionSimilar tasks can be grouped together.
AbstractionOnly important functions are shown.
Algorithmic thinkingEach final box can become an algorithm.
💡 A structure diagram connects analysis to algorithm design.
Figure 7.1
From Problem to Algorithm
Analyse

Decompose

Draw structure

Design algorithms
8. Choosing the Right Detail

Include what the scenario tells you—nothing more.

A structure diagram should represent the stated system accurately. It should not become a wish list of extra features.

✓ Useful

Food order, payment, pictures and list—because the scenario mentions them.

✗ Invented

Delivery tracking, loyalty points and live chat—unless the scenario includes them.

Figure 8.1
Stay Grounded
Read scenario

Select functions

Do not invent
9. Worked Example

Build a structure diagram for a food-ordering system.

The system allows users to enter food orders and payment details. It displays available food using pictures or a list.

Food-ordering system
User input
Food order
Payment
Display options
Pictures
List

Why this works

The system is at the top. Related functions are grouped under suitable parent boxes. Every box comes directly from the scenario.

Model answer: “The food-ordering system is decomposed into user input and display options. User input is divided into food order and payment, while display options is divided into pictures and list.”
10. Exam Tip

Use the hierarchy in the question.

Look for phrases that naturally group together. For example, food order and payment are both user inputs; pictures and list are both display options.

🎯 Exam Tip: marks are often awarded for the hierarchy, suitable parent names and correct child sub-systems.
Figure 10.1
Find the Groups
Related tasks

Suitable parent

Clear hierarchy
11. Common Mistake

Do not draw arrows to show execution order.

The connecting lines show ownership and grouping. They do not mean that one box runs before another.

⚠️ Common Mistake: treating a structure diagram like a flowchart. Correct answer: it shows the system hierarchy, not the sequence of instructions.
Figure 11.1
Hierarchy, Not Sequence
Parent

Children

Not:
step 1 → step 2
12. Summary

Structure diagrams in one screen.

A structure diagram is a hierarchical representation of a decomposed system.

The complete system is shown at the top, with sub-systems and smaller tasks beneath it.

It shows how parts are organised—not the order in which instructions run.

💡 Final thought: decomposition finds the parts; a structure diagram arranges them.
Figure 12.1
Final Model
System

Sub-systems

Individual tasks