Problem Decomposition (Cambridge (CIE) O Level Computer Science): Revision Note
Exam code: 2210
Problem Decomposition
What is decomposition?
- Decomposition is the process of breaking down a large problem into a set of smaller problems 
- Benefits of decomposition are: - Smaller problems are easier to solve 
- Each smaller problem can be solved independently of the others 
- Smaller problems can be tested independently 
- Smaller problems can be combined to produce a solution to the full problem 
 
- Modern computer games are a good example of using decomposition to break down the complexity of the problem into more manageable 'chunks' 
- Creating an entire game at once would be challenging and inefficient, so it could be decomposed into: - Levels - Levels can be designed/created/tested/ independently of other levels 
- Characters - The mechanics of characters in the game can be designed and created by a separate team 
- Landscape - The art team can work on the visual aspects of the game without needing to understand how the game is programmed 
 
- Once all of the smaller problems are completed, joined together a complex game has been created 
Inputs, processes, outputs and storage
- Decomposing a problem requires developers to think about four component parts: - Inputs: data entered into the system 
- Processes: subroutines and algorithms that turn inputs and stored data into outputs 
- Outputs: data that is produced by the system, such as information on a screen or printed information 
- Storage: data that is stored on a physical device, such as on a hard drive or in memory whilst the program is running 
 
Example - Area of a rectangle program
| Inputs | Width of the rectangle Height of the rectangle | 
|---|---|
| Processes | Width x height | 
| Outputs | Calculated area of the rectangle | 
| Storage | Memory: width, height and area stored temporarily | 
Unlock more, it's free!
Did this page help you?

