Computational thinking: abstraction, decomposition and algorithmic thinking
Computational thinking is a set of problem-solving skills that underpin all of computer science. OCR J277 Paper 2 includes questions where you must apply these three concepts to real-world problems — not just define them.
The three pillars
1. Abstraction
Abstraction means removing unnecessary detail and focusing only on the information that is relevant to solving the problem.
- It simplifies complex real-world problems.
- The result is a simplified model (e.g. a map, a diagram, a data structure).
Real-world examples
- A London Underground map abstracts away exact geographic positions, surface features and distances. It keeps only: station names, line colours, connections. This is all you need to plan a journey.
- A class in object-oriented programming abstracts a real-world object (e.g. a Car) into only the attributes and methods needed by the program (speed, fuel; accelerate(), brake()).
- A weather forecast abstracts complex atmospheric physics into simple forecasts (rain, 18°C).
Why it matters
Without abstraction, we would be overwhelmed by irrelevant detail. Abstraction makes problems manageable.
2. Decomposition
Decomposition means breaking a complex problem down into smaller, more manageable sub-problems.
- Each sub-problem can be solved independently.
- Solutions to sub-problems are combined to solve the overall problem.
- Sub-problems can be further decomposed (hierarchical decomposition).
Real-world example
Building a school library management system:
- User interface (search, borrow, return)
- Database (storing book records, member records)
- Authentication (student/staff login)
- Reporting (overdue books, popular titles)
- Notifications (email reminders)
Each sub-problem can be assigned to a different developer and solved separately.
Why it matters
Complex problems are easier to solve, manage and test when broken into smaller parts. Teams can work in parallel.
3. Algorithmic thinking
Algorithmic thinking means devising a step-by-step sequence of instructions to solve a problem.
An algorithm must be:
- Unambiguous: each step has exactly one interpretation.
- Finite: it must terminate (not run forever).
- Correct: it produces the right output for all valid inputs.
Expressing algorithms
Algorithms can be expressed as:
- Pseudocode: structured English-like code (used in OCR exams).
- Flowcharts: visual representation using shapes (oval = start/end, rectangle = process, diamond = decision).
- Trace tables: used to manually trace through an algorithm to verify its output.
Example: algorithm to find the largest number in a list
largest = list[0]
FOR i = 1 TO LEN(list) - 1
IF list[i] > largest THEN
largest = list[i]
END IF
END FOR
OUTPUT largest
Applying all three to a problem
Problem: build a route-finding app for a city bus network.
- Decomposition: split into: map data storage; current location detection; route calculation; display directions; fare calculation.
- Abstraction: represent the bus network as a graph (nodes = stops, edges = routes + times). Ignore irrelevant details (bus colours, driver names, exact road geometry).
- Algorithmic thinking: devise a shortest-path algorithm (e.g. Dijkstra's) to find the optimal route between two stops.
Common OCR exam mistakes
- Defining abstraction as "making things simpler" without mentioning removal of unnecessary detail.
- Confusing decomposition with abstraction — decomposition is about splitting into sub-problems; abstraction is about removing detail.
- Thinking algorithmic thinking only means sorting/searching — it means any logical step-by-step approach to problem-solving.
- Forgetting that a flowchart is a valid way to express an algorithm alongside pseudocode.
AI-generated · claude-opus-4-7 · v3-ocr-computer-science