Decomposition and abstraction (Edexcel GCSE Computer Science): Revision Notes
Decomposition and abstraction

Decomposition and abstraction are two essential computational thinking skills that help us tackle complex problems by making them more manageable. These techniques are used throughout the problem-solving process - from analysing what needs to be done, to designing effective solutions, and refining our approaches. Most computational solutions end up as algorithms that can be executed by computers or other devices.
What is decomposition?
Decomposition is the technique of breaking down complex problems into smaller, more manageable parts. Think of it like taking apart a complicated jigsaw puzzle - instead of trying to solve the whole thing at once, you work on smaller sections that are easier to handle.
Both problems and their solutions can be decomposed. When you break down a problem, each smaller part becomes an independent sub-problem that you can focus on separately. This makes the overall challenge much less overwhelming and allows you to tackle each piece systematically.
The key advantage of decomposition is that it transforms one overwhelming problem into several manageable tasks. Each sub-problem can be solved independently, making the entire process less daunting and more systematic.
How decomposition works in practice
When you decompose a solution, you can create or code each part separately, then bring them all back together to form the complete answer.
Worked Example: Snakes and Ladders Game Decomposition
Instead of trying to build everything at once, you could decompose a snakes and ladders game into these smaller tasks:
- Displaying the game board
- Rolling the dice
- Moving the player marker
- Taking a ladder (moving up)
- Taking a slide (moving down)
- Checking for a winner
Each task can be developed and tested independently before combining them into the complete game.
Decomposition in programming
In coding, decomposition appears as subprograms or groupings of code lines. Each subprogram or code grouping tackles one small part of the overall problem, making the code easier to write, understand, and debug.
What is abstraction?
Abstraction is the process of removing or hiding unnecessary details so you can focus purely on the important points. It's like creating a simplified version that captures the essential features while ignoring irrelevant complexity.
Understanding abstraction through examples
Consider the snakes and ladders game again. When playing, it's important to know how many squares are on the board and where the snakes and ladders are positioned. However, it's not necessary to know details like the colours of the board, the design patterns on the ladders, or the specific artwork used for the snakes - these details don't affect how the game actually works.
Abstraction helps us distinguish between what's essential for solving a problem and what's merely decorative or irrelevant. This focus on the core elements makes problem-solving more efficient.
Abstraction in programming
In code, you might see abstraction in the names of variables, data structures, or subprograms. These names represent complex operations or data in simplified ways, allowing programmers to work with concepts rather than getting bogged down in technical details.
Algorithms - the end result
Algorithms provide the precise instructions needed to solve a problem. Every computer programme is essentially an algorithm - it's a step-by-step procedure that tells the computer exactly what to do to solve a problem or complete a task.
The real power of algorithms comes from their reusability. Once you've written an algorithm, you can use it again and again for similar problems with just slight modifications. This saves enormous amounts of time compared to starting from scratch each time.
Remember that algorithms are the practical outcome of applying decomposition and abstraction. They represent the step-by-step solution that emerges when you've broken down a problem and focused on its essential elements.
Worked example: seating simulation
Worked Example: Applying Abstraction to Seating Simulation
Imagine you're creating a computer simulation that involves different types of seating. You have four different seat options: a wooden bench, an orange stool, a black office chair, and a striped deck chair.
Step 1: Identify the abstraction need Before coding this simulation, a programmer would apply abstraction. One obvious feature they might focus on is color - this could be important for the visual appearance of the simulation.
Step 2: Choose essential features When creating a general model for any seat, the programmer would need to think about what other features matter. Here are three key features they might include:
- Number of legs - affects stability and design
- Inside or outside use - determines durability requirements
- Capacity - how many people can use it
Step 3: Ignore non-essential details Other features the programmer could consider include construction materials, number of wheels, design elements like stripes or dots, width, and height. The key is choosing which details are essential for the simulation's purpose and which can be simplified or ignored.
Practice questions
Test Your Understanding
Try these questions to check your comprehension of the key concepts:
-
Define the term abstraction. (1 mark)
-
Give one reason for decomposing problems before trying to solve them. (1 mark)
Key Points to Remember:
- Decomposition means breaking complex problems into smaller, manageable parts that can be solved independently
- Abstraction involves focusing on essential features while ignoring unnecessary details
- Both techniques make problem-solving more efficient by reducing complexity and mental load
- Algorithms are step-by-step solutions that benefit from both decomposition and abstraction
- These skills are fundamental to programming and appear in code as subprograms, variables, and data structures