Learning Objectives
By the end of this topic you will be able to:
Define abstraction and explain its role in problem solving
Distinguish between representational, data and procedural abstraction
Explain decomposition and how it is applied to break down problems
Describe patterns and generalisation in problem solving
Levels of Abstraction
Abstraction Layers in Computing
Procedural abstraction: a subroutine (function/procedure) is a named block of code that hides its implementation. The caller knows what the function does (its interface) but not how it does it.
Layers of abstraction in software: high-level language → compiler → assembly → machine code → hardware. Each layer hides the complexity of the layer below it from the layer above.
The OSI network model is another example — each layer provides services to the layer above and hides its implementation. Application layer code doesn't need to know about physical cable standards.
Good abstraction reduces complexity, makes code reusable and maintainable. Poor abstraction (too much or too little detail) leads to inefficient, hard-to-maintain systems.
Decomposition
Decomposition
Decomposition is breaking a complex problem down into smaller, more manageable sub-problems that can be solved independently and then combined. This is fundamental to programming — large programs are decomposed into modules/functions.
Top-down design: start with the main problem, break it into sub-tasks, then break those into smaller sub-tasks until each task is simple enough to implement directly. Each level of the hierarchy adds detail.
Benefits
Easier to understand; can be worked on by different team members in parallel; modules can be tested independently; reusable across projects
Example: Decompose "Bank System"
→ Login, Account Management, Transactions
→ Transactions: Deposit, Withdraw, Transfer, History
Patterns & Generalisation
Pattern Recognition and Generalisation
Pattern recognition: identifying similarities and common features between problems. Recognising that different problems share the same underlying structure — e.g. sorting a list of names uses the same algorithm as sorting a list of numbers.
Generalisation: applying a solution to a broader class of problems. A general sort algorithm works for any data type that can be compared. A general search algorithm works for any ordered list.
Pattern recognition → generalisation → abstraction: spot the pattern, generalise the solution, abstract away irrelevant detail. These three skills together are core to computational thinking and are assessed in OCR H446 Component 2.
Common Mistakes
Don't Lose Marks
!
Saying abstraction means making things simpler without further qualification — abstraction specifically means removing irrelevant detail while retaining the essential features needed for the purpose. "Making things simpler" alone is too vague for OCR mark schemes.
!
Confusing decomposition with abstraction — decomposition breaks a problem into smaller parts; abstraction hides detail. They are different techniques that are often used together. OCR exam questions specifically test whether students can distinguish between them.
!
Not relating abstraction to a specific context in scenario questions — always tie your answer to the given scenario. "The team uses abstraction" scores 0; "The team abstracts patient data by focusing on [specific relevant fields]" scores a mark.