D1 June 2016 Q5
5.

An algorithm is described by the flow chart shown in Figure 4.
Given that \(x = 27\) and \(y = 5\),
The numbers 122 and \(\dfrac{1}{2}\) are to be used as inputs for the algorithm described by the flow chart.
| Scheme | Marks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| M1 (3 rows + 1st correct) A1 (2nd and 3rd rows correct) A1 (4th, 5th and 6th rows correct) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Output = 135 | A1 (CSO) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (4) |
Notes
Candidates may write each changed value/statement in a new row which is fine. Assume that each row begins and ends when a value in \(x\) is changed. For example, the values in row 1 in the table above consists of the \(x\) values going from the 26 to the 13a1M1: At least three rows of cells in columns \(x\), \(y\) and \(t\) completed with a correct first row (so 26 for \(x\) and 5 for \(t\))
a1A1: CAO – second and third rows correct (for just the columns in \(x\), \(y\) and \(t\))
a2A1: CAO – fourth, fifth and sixth rows correct (for just the columns in \(x\), \(y\) and \(t\))
a3A1: CSO – including the output of 135 either on the given line in the answer book or clearly stated in the table but it must be absolutely clear that the output is the final \(t\) value (no bod). Furthermore, all ‘yes’ and ‘no’ comments must be present in the 4th and 5th columns with no additional/incorrect ‘yes’ or ‘no’
| Scheme | Marks |
|---|---|
| (i) \(x\) must be a (positive) integer and therefore \(x = 122\) | B1 DB1 |
| (ii) 61 | B1 |
| (3) | |
| (7 marks) |
Notes
bi1B1: \(x\) must be 122 and any attempt at a reason
bi2DB1: Dependent on previous B mark (so B0B1 is not possible) – 122 and a correct valid reason – e.g. \(x\) must be an integer/whole number or ½ is not odd or even or if you input ½ then you can never get to \(x = 0\) when halving, etc. Just saying that the algorithm ‘won’t work’ or that the algorithm ‘will get stuck in a loop’ or ‘not terminate’ is not sufficient for this second mark neither is the argument of subtracting 1 from a ½. It must be clear why the algorithm won’t output a value for \(t\) with \(x = \frac{1}{2}\) - so essentially there needs to be some indication of why \(x\) will never become 0. Furthermore, just saying that \(x\) will never reach 0 is insufficient – we need an indication of why \(x = 0\) is not possible with a starting value of \(x = \frac{1}{2}\)
bii3B1: CAO