OCR D1 Specimen — Question 4 9 marks

Exam BoardOCR
ModuleD1 (Decision Mathematics 1)
SessionSpecimen
Marks9
PaperDownload PDF ↗
Mark schemeDownload PDF ↗
TopicFixed Point Iteration
TypeApply iteration to find root (pure fixed point)
DifficultyEasy -1.2 This is a straightforward algorithm trace question from D1, requiring only careful step-by-step execution with no conceptual insight. Part (i) is pure mechanical following of instructions, and part (ii) requires recognizing a simple pattern (multiplication). Significantly easier than average A-level questions which typically require applying mathematical techniques or problem-solving.
Spec7.03a Algorithm definition: input, output, deterministic, finite7.03c Working with algorithms: trace, interpret, adapt

4 [Answer this question on the insert provided.]
An algorithm involves the following steps.
Step 1: Input two positive integers, \(A\) and \(B\).
Let \(C = 0\) Step 2: If \(B\) is odd, replace \(C\) by \(C + A\).
Step 3: If \(B = 1\), go to step 6.
Step 4: Replace \(A\) by \(2 A\).
If \(B\) is even, replace \(B\) by \(B \div 2\), otherwise replace \(B\) by ( \(B - 1\) ) ÷ 2 .
Step 5: Go back to step 2.
Step 6: Output the value of \(C\).
  1. Demonstrate the use of the algorithm for the inputs \(A = 6\) and \(B = 13\).
  2. When \(B = 8\), what is the output in terms of \(A\) ? What is the relationship between the output and the original inputs?

Question 4:
(i) A=6, B=13, C=0
AnswerMarks
Step 1: A=6, B=13, C=0B1
Step 2: B odd, C=0+6=6M1
Step 3: B≠1, continue
Step 4: A=12, B=(13-1)÷2=6A1
Step 2: B even, C stays 6
Step 4: A=24, B=3A1
Step 2: B odd, C=6+24=30
Step 4: A=48, B=1
Step 2: B odd, C=30+48=78A1
Step 3: B=1, go to step 6
Step 6: Output C=78
Output is 78 = 6×13 ✓
AnswerMarks Guidance
(ii)Working through with B=8: only even values of B occur until B=1, C only gets A added when B is odd. Output = \(8A\). The output equals \(A \times B\) (the product of the two original inputs). B1 (output = 8A), B1 (relationship C=AB), M1 (correct working), A1
# Question 4:

**(i)** A=6, B=13, C=0

| Step 1: A=6, B=13, C=0 | B1 | |
| Step 2: B odd, C=0+6=6 | M1 | |
| Step 3: B≠1, continue | | |
| Step 4: A=12, B=(13-1)÷2=6 | A1 | |
| Step 2: B even, C stays 6 | | |
| Step 4: A=24, B=3 | A1 | |
| Step 2: B odd, C=6+24=30 | | |
| Step 4: A=48, B=1 | | |
| Step 2: B odd, C=30+48=78 | A1 | |
| Step 3: B=1, go to step 6 | | |
| Step 6: Output C=78 | | |

Output is 78 = 6×13 ✓

**(ii)** | Working through with B=8: only even values of B occur until B=1, C only gets A added when B is odd. Output = $8A$. The output equals $A \times B$ (the product of the two original inputs). | B1 (output = 8A), B1 (relationship C=AB), M1 (correct working), A1 | Must state relationship is multiplication

---
4 [Answer this question on the insert provided.]\\
An algorithm involves the following steps.\\
Step 1: Input two positive integers, $A$ and $B$.\\
Let $C = 0$\\
Step 2: If $B$ is odd, replace $C$ by $C + A$.\\
Step 3: If $B = 1$, go to step 6.\\
Step 4: Replace $A$ by $2 A$.\\
If $B$ is even, replace $B$ by $B \div 2$, otherwise replace $B$ by ( $B - 1$ ) ÷ 2 .\\
Step 5: Go back to step 2.\\
Step 6: Output the value of $C$.\\
(i) Demonstrate the use of the algorithm for the inputs $A = 6$ and $B = 13$.\\
(ii) When $B = 8$, what is the output in terms of $A$ ? What is the relationship between the output and the original inputs?

\hfill \mbox{\textit{OCR D1  Q4 [9]}}