| Exam Board | AQA |
|---|---|
| Module | D1 (Decision Mathematics 1) |
| Year | 2005 |
| Session | January |
| Marks | 7 |
| Paper | Download PDF ↗ |
| Mark scheme | Download PDF ↗ |
| Topic | Sorting Algorithms |
| Type | Bubble Sort Execution |
| Difficulty | Easy -1.8 This is a purely procedural question requiring mechanical application of the bubble sort algorithm with no problem-solving or insight needed. Students simply follow the algorithm step-by-step and count operations—significantly easier than typical A-level questions that require mathematical reasoning or technique selection. |
| Spec | 7.03j Sorting: bubble sort and shuttle sort |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| \(19\ 3\ 7\ 20\ 2\ 6\ 5\ 15 \to 3\ 7\ 19\ 2\ 6\ 5\ 15\ 20\) | M1, A1, A1 | Bubble sort; First pass for 19; First pass for 20 |
| Second pass rows shown correctly | A1 | \(2^{nd}\) pass |
| Final sorted list \((2\ 3\ 5\ 6\ 7\ 15\ 19\ 20)\) | A1 | 5 All correct |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| 7 comparisons | B1 | |
| 6 swaps | B1 | 2 |
| Total: 7 |
## Question 2(a):
| Answer | Marks | Guidance |
|--------|-------|----------|
| $19\ 3\ 7\ 20\ 2\ 6\ 5\ 15 \to 3\ 7\ 19\ 2\ 6\ 5\ 15\ 20$ | M1, A1, A1 | Bubble sort; First pass for 19; First pass for 20 |
| Second pass rows shown correctly | A1 | $2^{nd}$ pass |
| Final sorted list $(2\ 3\ 5\ 6\ 7\ 15\ 19\ 20)$ | A1 | **5** All correct |
## Question 2(b):
| Answer | Marks | Guidance |
|--------|-------|----------|
| 7 comparisons | B1 | |
| 6 swaps | B1 | **2** |
| **Total: 7** | | |
---
2
\begin{enumerate}[label=(\alph*)]
\item Use a bubble sort algorithm to rearrange the following numbers into ascending order, showing the new arrangement after each pass.
$$\begin{array} { l l l l l l l l }
19 & 3 & 7 & 20 & 2 & 6 & 5 & 15
\end{array}$$
\item Write down the number of comparisons and the number of swaps during the first pass.\\
(2 marks)
\end{enumerate}
\hfill \mbox{\textit{AQA D1 2005 Q2 [7]}}