AQA D1 2015 June — Question 8 6 marks

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2015
SessionJune
Marks6
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeAlgorithm Tracing
DifficultyEasy -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.
Spec7.03c Working with algorithms: trace, interpret, adapt

8 A student is tracing the following algorithm. \includegraphics[max width=\textwidth, alt={}, center]{f5890e58-38c3-413c-8762-6f80ce6dcec7-18_1431_955_372_539}
  1. Trace the algorithm illustrated in the flowchart for the case where the input value of \(N\) is 5 .
  2. Explain the role of \(N\) in the algorithm.

Question 8:
(a) Trace with N = 5
AnswerMarks Guidance
AB C
11 0
11 1
22 3
33 6
55 11
88 19
Print \(C = 19\)B1 for correct table values Award marks for correct rows
AnswerMark Guidance
Correct values of \(A\): 1, 2, 3, 5, 8 printedB1 One mark for correct printed sequence
\(C = 19\) printed at endB1
Correct intermediate working shownB1
All variable values correct throughoutB1
Correct termination when \(N=0\)B1 5 marks total
(b)
AnswerMarks Guidance
\(N\) controls the number of iterations/times the loop executesB1 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]}}