AQA D1 2005 January — Question 1 4 marks

Exam BoardAQA
ModuleD1 (Decision Mathematics 1)
Year2005
SessionJanuary
Marks4
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicSorting Algorithms
TypeAlgorithm Tracing
DifficultyEasy -2.0 This is a straightforward algorithm tracing exercise requiring only arithmetic substitution through given steps with no problem-solving, insight, or understanding of algorithms needed—purely mechanical execution of simple operations.
Spec7.03c Working with algorithms: trace, interpret, adapt

1 A student is using the algorithm below.
LINE 10INPUT \(A , B\)
LINE 20LET \(C = A - B\)
LINE 30LET \(D = A + B\)
LINE 40LET \(E = ( D * D ) - ( C * C )\)
LINE 50LET \(F = E / 4\)
LINE 60PRINT \(F\)
LINE 70END
Trace the algorithm in the case where \(A = 5\) and \(B = 3\).

Question 1:
AnswerMarks Guidance
AnswerMarks Guidance
Sorting network diagram with \(A=5\), \(B=3\)M1 SCA
Value \(2\) in position \(C\)A1 For 2 or 8
Value \(60\) in position \(E\)A1 For 60
Value \(15\) in position \(F\)A1F For 15
Total: 4
## Question 1:

| Answer | Marks | Guidance |
|--------|-------|----------|
| Sorting network diagram with $A=5$, $B=3$ | M1 | SCA |
| Value $2$ in position $C$ | A1 | For 2 or 8 |
| Value $60$ in position $E$ | A1 | For 60 |
| Value $15$ in position $F$ | A1F | For 15 |
| **Total: 4** | | |

---
1 A student is using the algorithm below.

\begin{center}
\begin{tabular}{|l|l|}
\hline
LINE 10 & INPUT $A , B$ \\
\hline
LINE 20 & LET $C = A - B$ \\
\hline
LINE 30 & LET $D = A + B$ \\
\hline
LINE 40 & LET $E = ( D * D ) - ( C * C )$ \\
\hline
LINE 50 & LET $F = E / 4$ \\
\hline
LINE 60 & PRINT $F$ \\
\hline
LINE 70 & END \\
\hline
\end{tabular}
\end{center}

Trace the algorithm in the case where $A = 5$ and $B = 3$.

\hfill \mbox{\textit{AQA D1 2005 Q1 [4]}}