1. Decomposition: Breaking Down Problems
Decomposition is the first step in computational thinking. It is the process of breaking down a large, complex problem into smaller, more manageable sub-problems. Each sub-problem can be focused on and solved individually, which is much less overwhelming than tackling the entire problem at once. Once all the sub-problems are solved, their solutions are combined to solve the original large problem. For example, creating a new smartphone is a huge task, but it can be decomposed into smaller problems like designing the screen, developing the operating system, creating the battery, and writing the camera software.
Key term
Examiner insight
Common pitfall
Fun fact
Worked example 14 marks
A team is developing a new social media application. Use decomposition to break this large project down into four distinct, manageable sub-problems.
- 1
Sub-problem 1: User Registration and Login. This involves creating a secure system for users to create an account, sign in, and recover their password.
- 2
Sub-problem 2: Profile Management. This system would allow users to create and edit their personal profile, including uploading a profile picture and writing a bio.
- 3
Sub-problem 3: News Feed. This involves developing the core functionality to display posts from friends or followed accounts in a chronological or algorithmically sorted list.
- 4
Sub-problem 4: Posting and Interacting. This system would handle the creation of new posts (text, images, videos) and interactions like 'liking' and 'commenting'.
Recap
- Decomposition simplifies complex problems by breaking them into smaller parts.
- It is the starting point for applying computational thinking.
- Each sub-problem can be solved independently.
- The solutions to the sub-problems are combined to solve the overall problem.
Quick check
- What is the main benefit of using decomposition when faced with a complex problem?1 mark
- Decompose the task of 'hosting a birthday party' into three sub-problems.3 marks