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 · 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 go on, be honest about what you think 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 very 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.

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

1Decomposition: break a big problem into smaller subproblems.
2Still too big? Decompose that part again, and repeat until every piece is 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. 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?
A structured, logical approach to solving problems.
Decomposition is used alongside which two 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 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.