GCSE · Computer Science · Edexcel · Spec 1CP2
Decomposition
Job too big to know where to start? Stop staring at all of it. Break it into smaller pieces, then break down any piece that's still too big.
Computer Science · Structure
Run a school bake sale, decomposed
This is a structure diagram. Tap each box and ask it one question: is this manageable yet?
Tap any part of the diagram to see what it does.
Computational thinking · Decomposing a program
Input, processing or output?
A cinema ticket program works out what a customer has to pay. Sort each task into the subproblem it belongs to.
Still to sort
Input (0)
Getting input from the user.
Processing (0)
Working with the input, including any decision making.
Where the line is: If the program is deciding something or working something out, it's processing, even when it uses what was typed in or leads to what's shown.
Output (0)
Giving output back to the user.
A problem can be decomposed in more than one way. When you're designing a program, one really useful way is into three subproblems: getting input from the user, processing that input, and giving output back to the user.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Too big to tackle? Break it down. Still too big? Break it down again.
What you need to know
- Computational thinking is a structured, logical approach to solving problems. Decomposition is one of its techniques.
- Decomposition is used alongside abstraction and algorithmic thinking. Teammates, not three names for the same thing.
- Decomposition means breaking a large problem down into smaller, more manageable subproblems.
- A subproblem is simply a smaller part of the main problem.
Have a goYour little brother insists 'Put the socks away' can't be a subproblem of 'Tidy my bedroom', because socks are far too small to count. Is he right?
No. It's a smaller part of the main problem, so it's a subproblem.
A subproblem is defined by being part of the main problem, not by being big. Being small is the whole point.
- Still not manageable? Decompose that subproblem again, as many times as needed, until each problem is manageable and easy to solve.
Have a goYou've split 'Revise for my exams' into Maths, English and Science. Maths and English feel fine, but Science still feels huge. What now?
Decompose Science again, for example into Biology, Chemistry and Physics.
Breaking down isn't a one-go rule: only the part that's still not manageable gets another layer, and Maths and English stay as they are.
- Decomposing doesn't solve anything on its own. It swaps one big problem for smaller, easier-to-solve ones, so the whole thing gets more manageable.
- A structure diagram shows it: main problem at the top, branches down to subproblems, a further layer whenever one is decomposed again.
- That diagram gives you a clear overview of the main problem and every subproblem that needs solving.
- There's more than one way to decompose a problem. For a program, one way is: get user input, process it (decisions included), give output.
Have a goA program asks the user for a temperature and converts it to a different scale. Try naming its input, its processing and its output.
Input: get the temperature. Processing: convert it. Output: show the converted temperature.
Converting is the program working with what was typed in, so it's processing, not output, even though the converted value is what gets shown next.
- Understand the problem first. Only then do you start applying decomposition to it.
The big picture
Decomposition means breaking a large problem down into smaller, more manageable subproblems. If a subproblem still isn't manageable, you decompose it again, as many times as it takes, until every piece is manageable and easy to solve. A structure diagram shows the result: the main problem at the top, its subproblems branching out below, and an extra layer each time a part gets broken down again. Designing a program? One useful way to decompose it is into input, processing and output.
Key points
Worked example
Problem
A school canteen needs a payment program. The user types in the cost of their food and how much money they are paying with. The program decides whether they have paid enough, then shows either their change or a message asking for more money. Decompose the problem and describe the structure diagram.
⚠ Watch out
Treating decomposition as a single split. It looks finished once you've got a few boxes, but if a subproblem is still too big to solve easily, it isn't done: break it down again, and keep going until every box is manageable.
Memory hook
Too big? Break it. Still too big? Break it again. Keep going until every box is bite-sized.
Check yourself
Picture a structure diagram for 'Plan a family holiday'. What goes at the very top, what goes on the layer below, and when does a third layer appear?
Flashcards
(15)What is computational thinking?
Decomposition is used alongside which other computational thinking techniques?
What is decomposition?
What is a subproblem?
A subproblem is still too big to solve easily. What do you do?
When does decomposing stop?
How does decomposition help?
Does decomposing a problem solve it?
Where does the main problem go in a structure diagram?
What does an extra layer in a structure diagram show?
What does a structure diagram give you?
When designing a program, what three subproblems can a problem be decomposed into?
In an input, processing and output decomposition, where does decision making go?
Is there only one way to decompose a problem?
What should you do before applying decomposition to a problem?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Edexcel GCSE Computer Science topics
How this lesson was checked. This Edexcel GCSE Computer Science (specification 1CP2)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 26 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.