OCR MEI D1 2015 June — Question 2 7 marks

Exam BoardOCR MEI
ModuleD1 (Decision Mathematics 1)
Year2015
SessionJune
Marks7
TopicFixed Point Iteration

2 The following algorithm operates on the equations of 3 straight lines, each in the form \(y = m _ { i } x + c _ { i }\).
Step 1Set \(i = 1\)
Step 2Input \(m _ { i }\) and \(c _ { i }\)
Step 3If \(i = 3\) then go to Step 6
Step 4Set \(i = i + 1\)
Step 5Go to Step 2
Step 6Set \(j = 1\)
Step 7Set \(a = j + 1\)
Step 8If \(a > 3\) then set \(a = a - 3\)
Step 9Set \(b = j + 2\)
Step 10If \(b > 3\) then set \(b = b - 3\)
Step 11Set \(d _ { j } = m _ { b } - m _ { a }\)
Step 12If \(d _ { j } = 0\) then go to Step 20
Step 13Set \(x _ { j } = \frac { c _ { a } - c _ { b } } { d _ { j } }\)
Step 14Set \(y _ { j } = m _ { a } \times x _ { j } + c _ { a }\)
Step 15Record \(\left( x _ { j } , y _ { j } \right)\) in the print area
Step 16If \(j = 3\) then go to Step 19
Step 17Set \(j = j + 1\)
Step 18Go to Step 7
Step 19Stop
Step 20Record "parallel" in the print area
Step 21Go to Step 16
  1. Run the algorithm for the straight lines \(y = 2 x + 8 , y = 2 x + 5\) and \(y = 4 x + 3\) using the table given in your answer book. The first five steps have been completed, so you should continue from Step 6. [7]
  2. Describe what the algorithm achieves.