πŸ“š Knowledge Library β€” Topic 7.3 β€” Algorithm Design & Problem Solving

Decomposition Explained Simply

Learn how programmers break a large problem into smaller, manageable parts so each part can be understood, designed and tested more easily.

1. Invitation

Large problems become easier when they are broken into smaller parts.

Decomposition is the process of splitting a problem or system into smaller subproblems or sub-systems.

Each smaller part can then be understood, designed, coded and tested separately.

πŸ’‘ Key idea: decomposition turns one difficult problem into several manageable ones.
Figure 1.1
One Problem, Smaller Parts
Large problem
↓
Part A
Part B
Part C
2. Big Idea

Each sub-system should have a clear purpose.

A good decomposition does not split a system randomly. Related tasks are grouped together so each part has a clear job.

A homework reminder system might be split into adding tasks, storing tasks, showing deadlines and removing completed work.

πŸ’‘ A useful sub-system performs one recognisable part of the whole solution.
Figure 2.1
Clear Responsibilities
Add tasks
Store tasks
Show deadlines
Remove tasks
3. FutureLogic Bridge

Think of organising a school event.

One person would struggle to organise the venue, invitations, food, music and timetable all at once.

Instead, the event is divided into smaller responsibilities. Each team handles one part, and the parts combine to create the complete event.

πŸ’‘ Bridge: one big event, several smaller jobs, one complete result.
Figure 3.1
The School Event Bridge
School event
↓
Venue
Food
Invitations
Timetable
4. Why Decompose?

Smaller parts are easier to manage.

Decomposition makes a problem easier to understand because programmers can focus on one section at a time.

It also makes development easier because separate sub-systems can be designed, coded and tested independently.

πŸ’‘ Benefits: clearer thinking, easier testing, easier teamwork and easier maintenance.
Figure 4.1
Benefits
Understand
Design
Test
Maintain
5. Computational Thinking

Decomposition works with other thinking skills.

SkillHow it helps
DecompositionSplits the problem into smaller parts.
Pattern recognitionFinds similarities between parts.
AbstractionRemoves details that are not needed.
Algorithmic thinkingCreates steps for each part.
πŸ’‘ The skills work together: split, spot, simplify and solve.
Figure 5.1
Computational Thinking
Split
↓
Spot patterns
↓
Simplify
↓
Create steps
6. Identify the Main Parts

Start by finding the major functions of the system.

Read the problem carefully and identify the main jobs the system must perform.

For a food-ordering system, the main parts might include entering an order, processing payment and displaying available food.

🎯 Exam Tip: use only the information given in the scenario. Do not invent extra sub-systems.
Figure 6.1
Find the Functions
Food ordering system
↓
Enter order
Pay
Display food
7. Split Again When Needed

A sub-system can be decomposed further.

Some parts are still too large and need another level of decomposition.

For example, β€œdisplay food” could be divided into showing pictures and showing a list.

πŸ’‘ Keep splitting until each part is clear enough to design as an individual algorithm.
Figure 7.1
Another Level
Display food
↓
Pictures
List
8. Inputs, Processes, Outputs and Storage

IPOS can help identify sensible sub-systems.

One simple way to begin decomposition is to ask what data enters the system, what happens to it, what leaves the system and what must be kept.

This does not force every system into four boxes, but it gives programmers a useful starting point.

πŸ’‘ IPOS is a guide for decomposition, not a rule that every solution must follow exactly.
Figure 8.1
A Starting Checklist
Input
Process
Output
Storage
9. Worked Example

Decompose a homework reminder system.

Main system

Homework reminder system

First-level sub-systems

Add homework, view homework, update homework and remove homework.

Decompose one part further

β€œAdd homework” can be split into entering the task, entering the deadline, checking the data and saving the record.

Model answer: β€œThe system can be decomposed into smaller sub-systems such as adding, viewing, updating and removing homework. Each sub-system can then be designed and tested separately.”
Figure 9.1
Homework Reminder
Homework system
↓
Add
View
Update
Remove
10. Exam Tip

Show a hierarchy, not a flat list.

When decomposition is shown visually, the complete system appears at the top and its sub-systems appear beneath it.

🎯 Strong answer: β€œDecomposition divides a system into smaller sub-systems that can be designed, coded and tested separately.”
Figure 10.1
Top-Down Thinking
Whole system
↓
Main parts
↓
Smaller parts
11. Common Mistake

Do not add features that are not in the problem.

Students sometimes make the system sound more impressive by inventing extra functions.

⚠️ Common Mistake: adding delivery tracking to a food-ordering system when the scenario only mentions ordering, payment and display options.
Figure 11.1
Stay Inside the Scenario
Use given details
↓
Group related tasks
↓
No invented features
12. Summary

Decomposition in one screen.

Decomposition splits a large problem into smaller sub-systems.

Each part should have a clear purpose and may be divided again if it is still too large.

It supports computational thinking by making patterns easier to see, unnecessary detail easier to remove and algorithms easier to design.

πŸ’‘ Final thought: break the problem down before building the solution up.
Figure 12.1
Final Model
Whole
↓
Parts
↓
Smaller parts
↓
Individual algorithms