OCR D1 2013 June — Question 3 10 marks

Exam BoardOCR
ModuleD1 (Decision Mathematics 1)
Year2013
SessionJune
Marks10
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicFixed Point Iteration
TypeApply iteration to find root (pure fixed point)
DifficultyEasy -1.2 This is an algorithm trace question requiring careful step-by-step execution but no mathematical insight or problem-solving. Students follow explicit instructions to fill a table, then recognize the pattern (Euclidean algorithm finding GCD and LCM). The mechanics are tedious but straightforward, making it easier than average A-level questions that require conceptual understanding or novel approaches.
Spec7.03a Algorithm definition: input, output, deterministic, finite7.03c Working with algorithms: trace, interpret, adapt

3 Holly has written an algorithm.
Step 1Input two positive integers \(A\) and \(B\)
Step 2Let \(C = A - B\)
Step 3If \(C < 0\), let \(D = B\) then let \(E = B + C\)
Step 4If \(C = 0\), jump to Step 10
Step 5If \(C > 0\), let \(D = A\) and let \(E = B\)
Step 6Let \(F = D - E\)
Step 7If \(F < 0\), let \(D = E\) then let \(E = F + D\) and go back to Step 6
Step 8If \(F = 0\), let \(F = D\) then jump to Step 11
Step 9If \(F > 0\), let \(D = F\) then go back to Step 6
Step 10Let \(F = A\)
Step 11Let \(G = A \div F\)
Step 12Let \(M = G \times B\)
Step 13Print the values \(F\) and \(M\)
  1. Work through Holly's algorithm using the input values \(A = 30\) and \(B = 18\). Set out your working using the table in the answer book. Use one row for each step where any values change and only write down values when they change. Write down the values that are printed.
  2. Describe what happens when \(A = 18\) and \(B = 30\). You need only record enough rows of the table to be able to show what happens.
  3. Without doing further working, state the output values of \(F\) and \(M\) when \(A = 12\) and \(B = 8\).

Question 3:
Part (i)
AnswerMarks Guidance
AnswerMarks Guidance
\(D = 30, E = 18, F = 12\)B1 Initial values of \(D\), \(E\), \(F\)
\(D = 18, E = 12, F = 6\)B1 At (third) use of step 6
\(D = 12, E = 6, F = 6\)B1 At some later update
\(D = 6, E = 6, F = 0\)B1 When \(F\) changes to 0. Condone steps merged together or errors in Step column
Output: 6, 90B1 6 written as output (print) or (if not) as final \(F\) in table
B190 written as output (print) or (if not) as final \(M\) in table
Part (ii)
AnswerMarks Guidance
AnswerMarks Guidance
Initial values of \(D\) and \(E\) are same as in (i), then as in (i) to give output 6, 90M1 Initial values \(D = 30\), \(E = 18\) (in table or stated)
A1Same output (\(F\) and \(M\)) as in (i) or 'then as before' (stated or shown in table). A misread (MR) will lose the A mark
Part (iii)
AnswerMarks Guidance
AnswerMarks Guidance
\(F = 4\)B1 Answers need to be seen here (may see working in spare table, ignore unless labelled as being (iii))
\(M = 24\)B1
# Question 3:

## Part (i)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $D = 30, E = 18, F = 12$ | B1 | Initial values of $D$, $E$, $F$ |
| $D = 18, E = 12, F = 6$ | B1 | At (third) use of step 6 |
| $D = 12, E = 6, F = 6$ | B1 | At some later update |
| $D = 6, E = 6, F = 0$ | B1 | When $F$ changes to 0. Condone steps merged together or errors in Step column |
| Output: 6, 90 | B1 | 6 written as output (print) or (if not) as final $F$ in table |
| | B1 | 90 written as output (print) or (if not) as final $M$ in table |

## Part (ii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| Initial values of $D$ and $E$ are same as in (i), then as in (i) to give output 6, 90 | M1 | Initial values $D = 30$, $E = 18$ (in table or stated) |
| | A1 | Same output ($F$ and $M$) as in (i) or 'then as before' (stated or shown in table). A misread (MR) will lose the A mark |

## Part (iii)
| Answer | Marks | Guidance |
|--------|-------|----------|
| $F = 4$ | B1 | Answers need to be seen here (may see working in spare table, ignore unless labelled as being (iii)) |
| $M = 24$ | B1 | |

---
3 Holly has written an algorithm.

\begin{center}
\begin{tabular}{|l|l|}
\hline
Step 1 & Input two positive integers $A$ and $B$ \\
\hline
Step 2 & Let $C = A - B$ \\
\hline
Step 3 & If $C < 0$, let $D = B$ then let $E = B + C$ \\
\hline
Step 4 & If $C = 0$, jump to Step 10 \\
\hline
Step 5 & If $C > 0$, let $D = A$ and let $E = B$ \\
\hline
Step 6 & Let $F = D - E$ \\
\hline
Step 7 & If $F < 0$, let $D = E$ then let $E = F + D$ and go back to Step 6 \\
\hline
Step 8 & If $F = 0$, let $F = D$ then jump to Step 11 \\
\hline
Step 9 & If $F > 0$, let $D = F$ then go back to Step 6 \\
\hline
Step 10 & Let $F = A$ \\
\hline
Step 11 & Let $G = A \div F$ \\
\hline
Step 12 & Let $M = G \times B$ \\
\hline
Step 13 & Print the values $F$ and $M$ \\
\hline
\end{tabular}
\end{center}

(i) Work through Holly's algorithm using the input values $A = 30$ and $B = 18$. Set out your working using the table in the answer book. Use one row for each step where any values change and only write down values when they change. Write down the values that are printed.\\
(ii) Describe what happens when $A = 18$ and $B = 30$. You need only record enough rows of the table to be able to show what happens.\\
(iii) Without doing further working, state the output values of $F$ and $M$ when $A = 12$ and $B = 8$.

\hfill \mbox{\textit{OCR D1 2013 Q3 [10]}}