AQA D1 2006 January — Question 6 7 marks

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

6 Two algorithms are shown. \section*{Algorithm 1}
Line 10Input \(P\)
Line 20Input \(R\)
Line 30Input \(T\)
Line 40Let \(I = ( P * R * T ) / 100\)
Line 50Let \(A = P + I\)
Line 60Let \(M = A / ( 12 * T )\)
Line 70Print \(M\)
Line 80Stop
\section*{Algorithm 2}
Line 10Input \(P\)
Line 20Input \(R\)
Line 30Input \(T\)
Line 40Let \(A = P\)
Line 50\(K = 0\)
Line 60Let \(K = K + 1\)
Line 70Let \(I = ( A * R ) / 100\)
Line 80Let \(A = A + I\)
Line 90If \(K < T\) then goto Line 60
Line 100Let \(M = A / ( 12 * T )\)
Line 110Print \(M\)
Line 120Stop
In the case where the input values are \(P = 400 , R = 5\) and \(T = 3\) :
  1. trace Algorithm 1;
  2. trace Algorithm 2.

Question 6:
Part (a)
AnswerMarks Guidance
AnswerMarks Guidance
\(\begin{pmatrix} P & R & T \\ 400 & 5 & 3 \end{pmatrix}\ I\quad A\quad M\) set upM1 SCA
\(60\) pivot identified
\(460\)A1
\(12.8\)A1 AWRT
Total: 3 marks
Part (b)
AnswerMarks Guidance
AnswerMarks 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
## 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]}}