What does decomposition mean?
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.
Breaking down everyday tasks
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.
Time to make a list
- 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
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?
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.
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
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
Activity: Decomposition quiz
Computing - Dance Mat Typing. gameComputing - Dance Mat Typing
Build and test your computing skills with different levels of touch type challenges
More on Computer science
Find out more by working through a topic
- count3 of 24
- count4 of 24
- count5 of 24