| Exam Board | AQA |
|---|---|
| Module | D1 (Decision Mathematics 1) |
| Year | 2006 |
| Session | January |
| Marks | 7 |
| Paper | Download PDF ↗ |
| Mark scheme | Download PDF ↗ |
| Topic | Sorting Algorithms |
| Type | Algorithm Tracing |
| Difficulty | Easy -1.8 This is a straightforward algorithm tracing exercise requiring only careful arithmetic and following simple sequential/loop instructions. No problem-solving, insight, or understanding of sorting algorithms is needed—just mechanical execution of given steps with small numbers. |
| Spec | 7.03c Working with algorithms: trace, interpret, adapt |
| Line 10 | Input \(P\) |
| Line 20 | Input \(R\) |
| Line 30 | Input \(T\) |
| Line 40 | Let \(I = ( P * R * T ) / 100\) |
| Line 50 | Let \(A = P + I\) |
| Line 60 | Let \(M = A / ( 12 * T )\) |
| Line 70 | Print \(M\) |
| Line 80 | Stop |
| Line 10 | Input \(P\) |
| Line 20 | Input \(R\) |
| Line 30 | Input \(T\) |
| Line 40 | Let \(A = P\) |
| Line 50 | \(K = 0\) |
| Line 60 | Let \(K = K + 1\) |
| Line 70 | Let \(I = ( A * R ) / 100\) |
| Line 80 | Let \(A = A + I\) |
| Line 90 | If \(K < T\) then goto Line 60 |
| Line 100 | Let \(M = A / ( 12 * T )\) |
| Line 110 | Print \(M\) |
| Line 120 | Stop |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| \(\begin{pmatrix} P & R & T \\ 400 & 5 & 3 \end{pmatrix}\ I\quad A\quad M\) set up | M1 | SCA |
| \(60\) pivot identified | ||
| \(460\) | A1 | |
| \(12.8\) | A1 | AWRT |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| \(\begin{pmatrix} P & R & T \\ 400 & 5 & 3 \end{pmatrix}\ A\quad K\quad I\quad M\) with \(400\) | M1 | variables |
| \(0, 1\) shown | ||
| \(20\) | A1 | \(1^{\text{st}}\) pass |
| \(420\), pivot \(2\) | ||
| \(21\) | A1F | \(2^{\text{nd}}\) pass |
| \(441\), pivot \(3\) | ||
| \(22.05\) | ||
| \(463.05\) | ||
| \(12.9\) | A1 | All correct AWRT |
## Question 6:
### Part (a)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $\begin{pmatrix} P & R & T \\ 400 & 5 & 3 \end{pmatrix}\ I\quad A\quad M$ set up | M1 | SCA |
| $60$ pivot identified | | |
| $460$ | A1 | |
| $12.8$ | A1 | AWRT |
**Total: 3 marks**
### Part (b)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $\begin{pmatrix} P & R & T \\ 400 & 5 & 3 \end{pmatrix}\ A\quad K\quad I\quad M$ with $400$ | M1 | variables |
| $0, 1$ shown | | |
| $20$ | A1 | $1^{\text{st}}$ pass |
| $420$, pivot $2$ | | |
| $21$ | A1F | $2^{\text{nd}}$ pass |
| $441$, pivot $3$ | | |
| $22.05$ | | |
| $463.05$ | | |
| $12.9$ | A1 | All correct AWRT |
**Total: 4 marks**
---
6 Two algorithms are shown.
\section*{Algorithm 1}
\begin{center}
\begin{tabular}{ l l }
Line 10 & Input $P$ \\
Line 20 & Input $R$ \\
Line 30 & Input $T$ \\
Line 40 & Let $I = ( P * R * T ) / 100$ \\
Line 50 & Let $A = P + I$ \\
Line 60 & Let $M = A / ( 12 * T )$ \\
Line 70 & Print $M$ \\
Line 80 & Stop \\
\end{tabular}
\end{center}
\section*{Algorithm 2}
\begin{center}
\begin{tabular}{|l|l|}
\hline
Line 10 & Input $P$ \\
\hline
Line 20 & Input $R$ \\
\hline
Line 30 & Input $T$ \\
\hline
Line 40 & Let $A = P$ \\
\hline
Line 50 & $K = 0$ \\
\hline
Line 60 & Let $K = K + 1$ \\
\hline
Line 70 & Let $I = ( A * R ) / 100$ \\
\hline
Line 80 & Let $A = A + I$ \\
\hline
Line 90 & If $K < T$ then goto Line 60 \\
\hline
Line 100 & Let $M = A / ( 12 * T )$ \\
\hline
Line 110 & Print $M$ \\
\hline
Line 120 & Stop \\
\hline
\end{tabular}
\end{center}
In the case where the input values are $P = 400 , R = 5$ and $T = 3$ :
\begin{enumerate}[label=(\alph*)]
\item trace Algorithm 1;
\item trace Algorithm 2.
\end{enumerate}
\hfill \mbox{\textit{AQA D1 2006 Q6 [7]}}