| Exam Board | AQA |
|---|---|
| Module | D1 (Decision Mathematics 1) |
| Year | 2015 |
| Session | June |
| Marks | 6 |
| Paper | Download PDF ↗ |
| Mark scheme | Download PDF ↗ |
| Topic | Sorting Algorithms |
| Type | Algorithm Tracing |
| Difficulty | Easy -1.2 This is a straightforward algorithm tracing exercise requiring students to follow a flowchart step-by-step with N=5 and identify that N controls loop iterations. It tests basic procedural skills (following instructions, updating variables) rather than problem-solving or mathematical insight, making it easier than average A-level content. |
| Spec | 7.03c Working with algorithms: trace, interpret, adapt |
| Answer | Marks | Guidance |
|---|---|---|
| A | B | C |
| 1 | 1 | 0 |
| 1 | 1 | 1 |
| 2 | 2 | 3 |
| 3 | 3 | 6 |
| 5 | 5 | 11 |
| 8 | 8 | 19 |
| Print \(C = 19\) | B1 for correct table values | Award marks for correct rows |
| Answer | Mark | Guidance |
| Correct values of \(A\): 1, 2, 3, 5, 8 printed | B1 | One mark for correct printed sequence |
| \(C = 19\) printed at end | B1 | |
| Correct intermediate working shown | B1 | |
| All variable values correct throughout | B1 | |
| Correct termination when \(N=0\) | B1 | 5 marks total |
| Answer | Marks | Guidance |
|---|---|---|
| \(N\) controls the number of iterations/times the loop executes | B1 | Must indicate \(N\) determines how many terms are produced/printed |
## Question 8:
**(a) Trace with N = 5**
| A | B | C | D | N | Print A |
|---|---|---|---|---|---------|
| 1 | 1 | 0 | - | 5 | |
| 1 | 1 | 1 | 2 | 4 | 1 |
| 2 | 2 | 3 | 3 | 3 | 2 |
| 3 | 3 | 6 | 5 | 2 | 3 |
| 5 | 5 | 11 | 8 | 1 | 5 |
| 8 | 8 | 19 | 13 | 0 | 8 |
Print $C = 19$ | B1 for correct table values | Award marks for correct rows
| Answer | Mark | Guidance |
|--------|------|----------|
| Correct values of $A$: 1, 2, 3, 5, 8 printed | B1 | One mark for correct printed sequence |
| $C = 19$ printed at end | B1 | |
| Correct intermediate working shown | B1 | |
| All variable values correct throughout | B1 | |
| Correct termination when $N=0$ | B1 | 5 marks total |
**(b)**
| $N$ controls the number of iterations/times the loop executes | B1 | Must indicate $N$ determines how many terms are produced/printed |
---
8 A student is tracing the following algorithm.\\
\includegraphics[max width=\textwidth, alt={}, center]{f5890e58-38c3-413c-8762-6f80ce6dcec7-18_1431_955_372_539}
\begin{enumerate}[label=(\alph*)]
\item Trace the algorithm illustrated in the flowchart for the case where the input value of $N$ is 5 .
\item Explain the role of $N$ in the algorithm.
\end{enumerate}
\hfill \mbox{\textit{AQA D1 2015 Q8 [6]}}