§ OL — Computational Thinking Basics
What is computational thinking?
The process of analysing a problem and formulating a solution that can be implemented by a computer. It involves breaking problems down into steps that a computer can follow.
What is an algorithm?
A precise, step-by-step, unambiguous set of instructions for solving a problem. A good algorithm must be correct, finite (terminates), and clear.
What is abstraction in computational thinking?
Identifying and keeping only the ESSENTIAL details needed to solve a problem, while ignoring irrelevant details. The goal is a simplified model that still works for the purpose.
Give a real-world example of abstraction.
A map. A road map keeps roads, towns, and distances but removes irrelevant details like individual buildings or tree positions. A tube/underground map keeps stations and lines but removes accurate geography — because passengers only need to know how to get from one station to another.
What is decomposition?
Breaking down a large, complex problem into smaller, more manageable sub-problems. Each sub-problem is simpler to understand and solve. This process continues until each part is straightforward enough to implement directly.
Why is decomposition useful in programming?
What is pattern recognition?
Identifying similarities or recurring patterns within or between problems. When two sub-problems follow the same logic, one solution (a subroutine) can handle both — reducing code duplication.
How do abstraction, decomposition, and pattern recognition work together?
What is a flowchart and when is it used?
A visual diagram that shows the step-by-step logic of an algorithm using standard symbols:
- Oval: Start/End
- Rectangle: Process/action
- Diamond: Decision (yes/no)
- Parallelogram: Input/output
Used at the design stage to plan logic before coding.
What is pseudocode?
A way of writing algorithm steps in plain English using a programming-like structure. It is language-independent — not tied to any specific programming language. Used to plan logic before writing actual code.
§ AS Only — Computational Thinking (Advanced)
What are the FOUR techniques of computational thinking?
Describe the THREE stages of applying abstraction to a model.
What are the THREE advantages of abstraction in software modelling?
A road map and a rail map both show the same city. How do they demonstrate abstraction differently?
Road map: Includes roads, town names, route numbers. Abstracts away buildings and terrain. Designed for drivers planning journeys.
Rail map: Shows only rail lines and stations, often not geographically accurate. Abstracts away roads entirely. Designed for train passengers navigating between stations.
How does decomposition lead to modular programming?
Each sub-problem from decomposition becomes a separate program module (function or procedure). Modules are:
- Written and tested independently.
- Reusable across different programs.
- Easier to maintain and debug than monolithic code.
Explain how pattern recognition reduces code duplication.
When decomposition reveals that two or more sub-problems follow the same logic, one subroutine can be written to handle all of them. The subroutine is called multiple times with different arguments, avoiding repeated code.
Why is algorithm design a core part of computational thinking?
An algorithm is the precise logical solution to a problem. Without a clear algorithm, coding is guesswork. Designing the algorithm first (in pseudocode or a flowchart) ensures the logic is correct before committing to a programming language.