Spec & Goals 3 min
AQA Spec 3.1 · Fundamentals of algorithms (whole unit)
By the end of this lesson you can:
- Revise and self-check the whole of Unit 1, spotting your weak topics.
- Answer exam questions that span all of spec 3.1, for the marks on offer.
- Make a focused revision plan that targets the topics you got wrong.
Warm-Up — command words & the paper 5 min
This is the last lesson of Unit 1. First, know the exam you are sitting.
Command words tell you what to do
Read the command word first — it sets how much to write.
| Command word | What it demands |
|---|---|
| State | A word or short phrase. No explanation. |
| Describe | Say what something is, or the steps, with detail. |
| Explain | Give reasons — the how or the why. |
| Complete | Fill a table or diagram exactly. |
| Calculate | Work out a value; show your working. |
Key Concept — your Unit 1 spec checklist 14 min
Tick each spec point. If you cannot do one, that is a topic to revise tonight.
| Spec point | You should be able to… |
|---|---|
| Representing algorithms | Define an algorithm; use decomposition and abstraction; read and write AQA pseudo-code; draw and read a flowchart with the correct symbols. |
| Trace tables | Follow an algorithm line by line and record every variable and each output, in order. |
| Efficiency | Compare two algorithms by counting the steps they take; say which is more efficient and why. |
| Linear search | Describe checking each item in turn until the target is found or the list ends. |
| Binary search | Describe repeatedly halving a sorted list by checking the middle item. |
| Bubble sort | Describe comparing and swapping adjacent items over repeated passes until none swap. |
| Merge sort | Describe splitting the list until single items, then merging pairs back in order. |
The four flowchart symbols
Using the right shape earns the mark.
Worked Example — a full multi-part question 12 min
Here is one question with three parts. We earn the marks aloud.
AQA pseudo-code
01 total ← 0 02 FOR i ← 1 TO 4 03 total ← total + i 04 ENDFOR 05 OUTPUT total
Part (a) — Complete the trace table. [3 marks]
We follow the loop line by line, writing i and total after each pass.
| i | total | OUTPUT |
|---|---|---|
| — | 0 | |
| 1 | 1 | |
| 2 | 3 | |
| 3 | 6 | |
| 4 | 10 | |
| 10 |
Each correct value of total after the early passes earns a mark.
Part (b) — State the output. [1 mark]
The loop adds 1 + 2 + 3 + 4. The output is 10 (1).
Part (c) — A list has 8 items. Explain which is more efficient to find one value: a linear search or a binary search on the sorted list. [2 marks]
Binary search is more efficient (1). It halves the list each step, so it checks far fewer items than a linear search, which may check all 8 (1).
Try It Yourself — timed mini-paper 12 min
Give yourself 12 minutes. Write full answers; check them with your teacher.
State the two thinking tools used to plan an algorithm. [2 marks]
Complete a trace table for the worked-example code if the loop ran FOR i ← 1 TO 3 instead. [3 marks]
Describe how a linear search looks for a value in a list. [2 marks]
Explain why a binary search cannot be used on an unsorted list. [2 marks]
📝 Exam Practice 10 min
These questions span the whole of Unit 1. Match your answer to the command word and the marks.
Trace this code and complete the missing values.
01 count ← 0 02 WHILE count < 3 03 count ← count + 1 04 ENDWHILE 05 OUTPUT count
State the value of count after the second pass, and the final output.
Mark scheme
- After the second pass
count = 2(1). - Final output
3(1).
State the condition a list must meet before a binary search can be used.
Mark scheme
- The list must be sorted / in order (1).
Describe how a bubble sort puts a list into ascending order.
Mark scheme
- Compare each pair of adjacent items (1).
- Swap them if they are in the wrong order (1).
- Repeat across the list in passes (1).
- Stop when a pass makes no swaps / the list is sorted (1).
A list has 1000 sorted items. Explain why a binary search is more efficient than a linear search.
Mark scheme
- Binary search halves the list at each step (1).
- So it checks far fewer items / a linear search may check all 1000 (1).
State the name of the flowchart symbol drawn as a diamond.
Mark scheme
- Decision (box) (1).
Recap & Key Terms 3 min
Use your mini-paper marks to plan tonight's revision.
- Got pseudo-code or flowcharts wrong? Redo CS-L1-01.
- Tripped on the trace table? Redo CS-L1-02.
- Unsure on efficiency? Redo CS-L1-03 and re-count the steps.
- Mixed up the searches? Redo CS-L1-04 — remember binary needs a sorted list.
- Lost marks on a sort? Redo CS-L1-05 and learn the describe points.
- Algorithm
- A sequence of steps, in order, that solves a problem or carries out a task.
- Decomposition
- Breaking a problem into smaller, easier sub-problems.
- Abstraction
- Removing unnecessary detail to focus only on what matters.
- Pseudo-code
- A structured, code-like way of writing an algorithm (AQA has its own version).
- Flowchart
- A diagram of an algorithm using terminal, process, input/output and decision symbols.
- Trace table
- A table that records each variable and output as an algorithm runs line by line.
- Efficiency
- How few steps an algorithm takes; fewer steps means more efficient.
- Linear search
- Checking each item in turn until the target is found or the list ends.
- Binary search
- Repeatedly halving a sorted list by testing the middle item.
- Bubble sort
- Comparing and swapping adjacent items over repeated passes until none swap.
- Merge sort
- Splitting the list to single items, then merging them back in order.
Homework 1 min
Task (≤ 15 min): Revisit your weakest topic from the mini-paper. Open that lesson and redo its Exam Practice section.
Bring one question you still find hard to the next session, so we can work through it together.