GCSE · Computer Science · Edexcel · Spec 1CP2
Decomposition
Faced a job so big you didn't know where to start? Stop looking at all of it: break it into smaller pieces, and keep breaking until every piece is easy.
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 very 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.
How to make a problem that feels far too big stop being too big: break it down, then 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, used alongside abstraction and algorithmic thinking.
- Decomposition is breaking a large problem down into smaller, more manageable subproblems. A subproblem is a smaller part of the main problem.
- If a subproblem still isn't manageable, decompose it again, as many times as needed, until every problem is manageable and easy to solve.
- Decomposing makes the whole problem more manageable to solve, because it's now a set of smaller, easier-to-solve problems.
- A structure diagram shows a decomposed problem: the main problem at the top, branches down to its subproblems, and a further layer each time a subproblem is decomposed again. It gives a clear overview of everything that needs solving.
- A problem can be decomposed in more than one way. For a program, one way is into getting user input, processing the input (including any decision making) and giving output back to the user.
- Understand the problem first, before you apply decomposition to it.
The big picture
Decomposition means breaking a large problem down into smaller, more manageable subproblems. Any subproblem that's still too big gets decomposed again, as many times as it takes, until every piece is 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 is broken down again. When you're designing a program, one useful way to decompose a problem 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. If a subproblem is still too big to solve easily, it isn't finished: 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 two 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 29 September 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.