Computational Thinking
Decomposition, abstraction and algorithmic thinking are not three techniques but three stages applied in order. What each one is for, in one precise sentence with an example that proves it.
Get the method right under pressure
Free interactive practice on the steps that lose marks under exam pressure.
Start revising freeWhat you'll cover
Three tools, used in order
Computational thinking is how you turn a problem a person understands into something a computer can be told to do. The specification names three parts of it. - **Decomposition** - breaking a problem into smaller sub-problems - **Abstraction** - removing detail that does not matter to the part you are solving - **Algorithmic thinking** - working out the steps, in order, that solve it **They are not three separate techniques. They are three stages, usually applied in that order.** You split the problem up, you strip each piece down to what matters, and then you work out the steps for each piece. Knowing the order is what lets you explain **why** each is used, which is exactly what the exam asks for.
The three, defined
One precise sentence each, plus what it buys you. Vague definitions are the main way marks are lost here.
Match each concept to its definition
- Decomposition
- Abstraction
- Algorithmic thinking
- Breaking a complex problem into smaller sub-problems that can each be solved separately
- Removing or hiding detail that is not relevant, so only what matters to the problem remains
- Identifying the steps needed to solve a problem and the order they must happen in
Which concept is at work?
A map of an underground railway shows which stations connect to which, but nothing about the real distances or the shape of the tunnels. Which concept does that illustrate, and why?
- Abstraction: the detail a traveller does not need - geography, distance, curvature - has been removed, leaving only the connections, which is all the map has to answer
- Decomposition: the network has been broken into separate lines
- Algorithmic thinking: the map gives you steps to follow
- None of them; it is just a diagram
Abstraction and decomposition
Both sound like "making it simpler". They do different jobs, and mixing them up is the commonest error on this topic.
What abstraction actually does
Select the TWO statements that define abstraction precisely enough to earn marks.
- It removes or hides detail that is not relevant to the problem being solved
- It leaves a representation simple enough to reason about and to write a solution for
- It makes something simpler
- It splits a problem into smaller problems
Write the definition
The specification wants one precise sentence per concept, saying what it is AND why it is used. Build one for decomposition.
Thinking like a computer scientist
Breaking a complex problem into smaller sub-problems that can be solved separately is _____. Removing detail that is not relevant to the problem, so that only what matters remains, is _____. Identifying the steps needed and the order they must happen in is _____. Applied in order, you first _____ the problem, then strip each part down, and finally work out the _____ for each part.
One concept, defined and shown
**"Explain what is meant by abstraction and why it is used, with an example. (4 marks)"** "**Abstraction is the removal or hiding of detail that is not relevant to the problem being solved**, leaving only what matters. **It is used because** the remaining representation is simple enough to reason about and to write a solution for, when the full detail would be unmanageable. **For example**, a car in a racing game is represented by its position, its speed and its direction. Its colour, its engine and the material of its seats are all real properties of a car and none of them affects where it will be in the next frame, so they are left out. **The removed detail is specifically the detail the problem does not depend on.**" **Look at the shape, because it is worth copying for all three concepts:** one precise sentence defining it, one sentence saying why it is used, then an example - and a final clause explaining **why that example demonstrates the concept**. An example dropped in without that last clause often shows nothing, because the marker cannot tell whether you understood it or recognised it.
Find all three at work
A developer describes starting work on a weather app. Tap the TWO sentences that describe DECOMPOSITION and ABSTRACTION rather than algorithmic thinking.
- The developer starts by writing down what the app has to do.
- She splits the work into four separate pieces: fetching the forecast data, storing it, drawing the display, and handling the user's location
- She then works on the display on its own.
- For the display she decides a forecast will be held as just a temperature, a symbol and a time, ignoring everything else the weather service sends
- Finally she writes out the order in which the display must redraw when new data arrives.
Solving a problem properly
You are asked to write a program that manages bookings for a small cinema. Work through how to start.
- The problem feels too big to begin. What is the first move?
- You are now working on the seat layout on its own. What does abstraction give you here?
- A classmate says the three concepts are just three names for planning. How would you correct that?
Your turn: define and apply
A school wants a program to organise its lost property. Use all three concepts to explain how you would approach it.
- Define each of the three concepts in one precise sentence, saying what it is AND why it is used
- Decompose the lost-property problem into at least three sub-problems
- For ONE of those sub-problems, say what an abstraction of a lost item would keep and what it would leave out, and explain why the left-out detail does not matter
- Explain the difference between decomposition and abstraction, using your own two examples above