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 · What do you think?

What does decomposition actually involve?

You've just watched one big job turn into a diagram of small ones. Before you read on, be honest: what do you reckon decomposition involves?

Which of these is closest to what you think right now?
How sure are you?

Computational thinking · Put it in order

Tackling a big problem: what comes first?

The order you work through a big problem when you use decomposition

1 · Do this first4 · Do this last
  1. Break it into smaller subproblems

  2. Break down again any part that's still too big

  3. Solve the small problems

  4. Make sure you understand the problem

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.

5 of 5 still to sort.

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.

Computational thinking · Your turn

Decompose a new program problem

A program is needed that asks the user to enter a password, checks whether it matches the saved password, and then tells the user whether they can log in. Decompose this problem into input, processing and output. Then explain how decomposing it makes the problem more manageable. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1Decomposition: break a big problem into smaller subproblems.
2Still too big? Decompose that part again, and repeat until every piece is manageable and easy to solve.
3Decomposing doesn't solve the problem; it makes it more manageable to solve.
4Structure diagram: main problem on top, subproblems below, an extra layer for any part broken down again.
5Program problems can be split into input, processing (including decisions) and output.
6Understand the problem before you decompose it.

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?
A structured, logical approach to solving problems.
Decomposition is used alongside which other computational thinking techniques?
Abstraction and algorithmic thinking.
What is decomposition?
Breaking a large problem down into smaller, more manageable subproblems.
What is a subproblem?
A smaller part of the main problem.
A subproblem is still too big to solve easily. What do you do?
Decompose it again into further, smaller subproblems.
When does decomposing stop?
When every problem is manageable and easy to solve, however many rounds that takes.
How does decomposition help?
The main problem becomes smaller, easier-to-solve problems, so the whole problem is more manageable to solve.
Does decomposing a problem solve it?
No. It breaks the problem into smaller problems, and those still need solving.
Where does the main problem go in a structure diagram?
At the top, with branches below leading to its subproblems.
What does an extra layer in a structure diagram show?
A subproblem above it was decomposed again.
What does a structure diagram give you?
A clear overview of the main problem and the subproblems that need to be solved.
When designing a program, what three subproblems can a problem be decomposed into?
Getting user input, processing the input, and giving output back to the user.
In an input, processing and output decomposition, where does decision making go?
Processing.
Is there only one way to decompose a problem?
No. A problem can be decomposed in more than one way.
What should you do before applying decomposition to a problem?
Make sure you understand the 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 posted

More Edexcel GCSE Computer Science topics

See the full Edexcel Computer Science curriculum →

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.