| Exam Board | Edexcel |
|---|---|
| Module | D1 (Decision Mathematics 1) |
| Year | 2002 |
| Session | June |
| Marks | 11 |
| 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 given values (Euclidean algorithm for GCD). It involves only arithmetic operations and table completion with no problem-solving or proof, making it significantly easier than average A-level questions. |
| Spec | 7.03c Working with algorithms: trace, interpret, adapt |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| \(a=645,\ b=255,\ c=2.53,\ d=2,\ e=510,\ f=135\), \(f=0\)? No | M1 A1 | |
| \(a=255,\ b=135,\ c=1.89,\ d=1,\ e=135,\ f=120\), \(f=0\)? No | M1 A1 | |
| \(a=135,\ b=120,\ c=1.13,\ d=1,\ e=120,\ f=15\), \(f=0\)? No | A1 | |
| \(a=120,\ b=15,\ c=8,\ d=8,\ e=120,\ f=0\), \(f=0\)? Yes | A1 | |
| The answer is 15 | A1 | (7) |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| The first row would be: \(255\ \ 645\ \ 0.40\ \ 0\ \ 0\ \ 255\ \ \text{No}\) | M1 A1 | |
| But the second row would then be the same as the first row above, and the solution thereafter would be the same. | A1 | (3) |
| Answer | Marks | Guidance |
|---|---|---|
| Answer | Marks | Guidance |
| Finds the H.C.F of \(a\) and \(b\) | B1 | (1) |
| (11 marks) |
# Question 5:
## Part (a)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $a=645,\ b=255,\ c=2.53,\ d=2,\ e=510,\ f=135$, $f=0$? No | M1 A1 | |
| $a=255,\ b=135,\ c=1.89,\ d=1,\ e=135,\ f=120$, $f=0$? No | M1 A1 | |
| $a=135,\ b=120,\ c=1.13,\ d=1,\ e=120,\ f=15$, $f=0$? No | A1 | |
| $a=120,\ b=15,\ c=8,\ d=8,\ e=120,\ f=0$, $f=0$? Yes | A1 | |
| The answer is 15 | A1 | **(7)** |
## Part (b)
| Answer | Marks | Guidance |
|--------|-------|----------|
| The first row would be: $255\ \ 645\ \ 0.40\ \ 0\ \ 0\ \ 255\ \ \text{No}$ | M1 A1 | |
| But the second row would then be the same as the first row above, and the solution thereafter would be the same. | A1 | **(3)** |
## Part (c)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Finds the H.C.F of $a$ and $b$ | B1 | **(1)** |
| | **(11 marks)** | |
---
5. An algorithm is described by the flow chart below.\\
\includegraphics[max width=\textwidth, alt={}, center]{652477eb-87dc-4a5a-8514-c9be39986142-5_1590_1264_363_539}
\begin{enumerate}[label=(\alph*)]
\item Given that $a = 645$ and $b = 255$, complete the table in the answer booklet to show the results obtained at each step when the algorithm is applied.
\item Explain how your solution to part (a) would be different if you had been given that $a = 255$ and $b = 645$.
\item State what the algorithm achieves.
\end{enumerate}
\hfill \mbox{\textit{Edexcel D1 2002 Q5 [11]}}