What does decomposition mean?
![Illustrated girl smiling with eyebrow slightly raised](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5sl2.png)
Decomposition is when we break a problem or task down into smaller parts to make it easier to tackle.
Sometimes the problem is so big or so tricky that we don't know where to start.
Breaking it down or decomposing it can make it easier to manage.
![Illustrated girl smiling with eyebrow slightly raised](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5sl2.png)
Breaking down everyday tasks
![Organising books](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5vtw.png)
We can use decomposition for every day problems and tasks.
Imagine you decide to organise all your books, comics and magazines. You start off thinking it will only take half an hour. You'll have the job done by dinner!
Once you start looking at all the books and comics piled up on the bookcase, and remember the box of magazines in the corner, you realise that this is going to be a much bigger job. But where to start?
Let's break down the problem into smaller parts using decomposition.
![Organising books](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5vtw.png)
Time to make a list
![](https://ichef.bbci.co.uk/images/ic/480xn/p0chcm0n.png)
- Collect books, comics and magazines from all rooms and put them on the bed.
- Divide into piles of each type: Books, comics and magazines.
- Divide each pile into subject area.
- You could then sort out each pile again by:
- putting magazines into date order
- putting comics into character order
- putting books into alphabetical order by title
![Illustrated boy smiling after getting a question correct.](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5v2s.png)
Once you can see the problem broken down into small tasks you can start to relax. Each smaller task will still take some time, but at least you know what to do first.
You might even be able to get friends and family to help with some of the jobs.
Time to make a start!
What everyday tasks and problems could you break down using decomposition?
![Illustrated boy smiling after getting a question correct.](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5v2s.png)
Using decomposition to break down a computer programme task
We can use decomposition to help with a computerA device that processes information by following a set of rules called a program. programming problem. We can break the problem down into smaller parts and think about the instructions needed to complete each part.
We can work on the smaller parts individually using logical reasoningUsing agreed rules to think about information and solve problems. by making sure we think sensibly about the problem and possible solutions.
Then we can organise the instructions into a sequence, or algorithmA precise set of ordered rules or instructions that can be followed by a human or a computer to achieve a task. before translating it into codeA language that a computer can understand. for the programA sequence of instructions written in a coding language that a computer can understand..
Collecting power packs with the Bitesize Bot
Look at this example.
We have to write a program to control the Bitesize Bot. She needs to move around the shape maze and collect battery power packs as she goes. Then she can go home.
![Bitesize Bot on a grid with different shaped obstacles.](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5ngb.png)
Time to decompose
The Bitesize Bot will need to travel forward and turn left or right several times on her journey. We can break the problem down into smaller parts:
- Collecting the first battery power pack
- Moving through the shape maze
- Collecting the second battery power pack
- Going home
![Collecting power packs in shape maze broken in to four smaller tasks. One: collect the first power pack. Two: Move through shape maze. Three: collect second power pack. Four: Go to home.](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5r3g.png)
Now we have decomposed the big problem into smaller ones, we can work on each one separately.
- Collecting the first power pack
- The bot needs to move forward three squares
- She then needs to collect the power pack
- Moving through the shape maze
- The bot needs to turn right
- She then needs to move forward three squares
- Then turn left
![Flowchart showing steps for collecting power packs in the shape maze. Collecting the first power pack: Step one - The bot needs to move forward three squares. Step two: She then needs to collect the power pack. Moving through the shape maze. Step one: The bot needs to turn right. Step two: She then needs to move forward three squares. Step three: Turn left.](https://ichef.bbci.co.uk/images/ic/480xn/p0gw5rbh.png)
Activity: Decomposition quiz
Computing - Dance Mat Typing. gameComputing - Dance Mat Typing
Build and test your computing skills with different levels of touch type challenges
![Computing - Dance Mat Typing](https://ichef.bbci.co.uk/images/ic/480xn/p0gkkp7l.jpg)
More on Computer science
Find out more by working through a topic
- count3 of 24
- count4 of 24
- count5 of 24