What is computational thinking?
Computational thinking means breaking a problem down so a computer (or a person) can solve it logically. Edexcel expects you to use four key skills: decomposition, abstraction, pattern recognition and algorithmic thinking.
- Decomposition: splitting a big problem into smaller, manageable sub-problems.
- Abstraction: removing unnecessary detail and keeping only what matters for the solution.
- Pattern recognition: spotting similarities between problems or within data so you can reuse a solution.
- Algorithmic thinking: designing a step-by-step set of instructions (an algorithm) to solve the problem.
Representing algorithms
You must be able to read, trace and write algorithms shown as pseudocode and flowcharts. Common flowchart symbols: oval = start/end (terminator), parallelogram = input/output, rectangle = process, diamond = decision. Pseudocode uses keywords like IF, ELSE, WHILE, FOR, INPUT, OUTPUT similar to the exam board's own pseudocode guide.
Searching algorithms
- Linear search: checks every item in turn from the start until found or the list ends. Works on unsorted or sorted lists. Worst case checks all n items.
- Binary search: only works on a SORTED list. Repeatedly checks the middle item and halves the search space. Much faster on large lists (searches roughly log2(n) times rather than n times).
Sorting algorithms
- Bubble sort: repeatedly compares adjacent pairs and swaps them if out of order, passing through the list until no swaps are needed. Simple but slow on large lists.
- Merge sort: splits the list in half repeatedly (down to single items) then merges the halves back together in order. Faster than bubble sort on large data sets because it uses a divide-and-conquer approach.
Trace tables
Exam questions often give you an algorithm and ask you to complete a trace table showing how variable values change on each iteration. Work through the algorithm line by line, updating a row every time a variable changes, and note any OUTPUT produced.
Common mistakes
- Forgetting binary search needs a sorted list first.
- Mixing up decomposition (breaking down the problem) with abstraction (removing detail) — they are different skills.
- Losing marks in trace tables by skipping a step or not showing every variable change.
- Writing pseudocode with real programming language syntax (like Python's colons or semicolons) instead of the general pseudocode style expected.
- Confusing efficiency: bubble sort is easy to write but inefficient; merge sort is efficient but more complex to trace.
What are the four computational thinking skills?
Decomposition, abstraction, pattern recognition, algorithmic thinking.
tap to reveal
Define decomposition.
Breaking a large problem down into smaller, more manageable sub-problems.
tap to reveal
Define abstraction.
Removing unnecessary detail from a problem, keeping only what is relevant to the solution.
tap to reveal
What does pattern recognition involve?
Spotting similarities between problems or data so an existing solution can be reused.
tap to reveal
What is algorithmic thinking?
Designing a clear, step-by-step set of instructions (an algorithm) to solve a problem.
tap to reveal
How does a linear search work?
It checks every item in turn from the start of the list until the target is found or the list ends.
tap to reveal
What condition must be true for binary search to work?
The list must already be sorted.
tap to reveal
How does binary search find an item?
It repeatedly checks the middle item of the remaining list and halves the search space each time.
tap to reveal
Why is binary search usually faster than linear search on large lists?
Because it eliminates half the remaining items at each step instead of checking one at a time.
tap to reveal
How does bubble sort work?
It repeatedly compares adjacent items and swaps them if out of order, repeating passes until no swaps are needed.
tap to reveal
How does merge sort work?
It splits the list in half repeatedly down to single items, then merges the halves back together in sorted order.
tap to reveal
Which sort is generally more efficient on large data sets, bubble sort or merge sort?
Merge sort, because it uses a divide-and-conquer approach.
tap to reveal
What does a diamond symbol represent in a flowchart?
A decision point.
tap to reveal
What does a parallelogram symbol represent in a flowchart?
Input or output.
tap to reveal
What is a trace table used for?
Recording how variable values (and any output) change as an algorithm executes step by step.
tap to reveal