2 The following algorithm operates on the equations of 3 straight lines, each in the form \(y = m _ { i } x + c _ { i }\).
| Step 1 | Set \(i = 1\) |
| Step 2 | Input \(m _ { i }\) and \(c _ { i }\) |
| Step 3 | If \(i = 3\) then go to Step 6 |
| Step 4 | Set \(i = i + 1\) |
| Step 5 | Go to Step 2 |
| Step 6 | Set \(j = 1\) |
| Step 7 | Set \(a = j + 1\) |
| Step 8 | If \(a > 3\) then set \(a = a - 3\) |
| Step 9 | Set \(b = j + 2\) |
| Step 10 | If \(b > 3\) then set \(b = b - 3\) |
| Step 11 | Set \(d _ { j } = m _ { b } - m _ { a }\) |
| Step 12 | If \(d _ { j } = 0\) then go to Step 20 |
| Step 13 | Set \(x _ { j } = \frac { c _ { a } - c _ { b } } { d _ { j } }\) |
| Step 14 | Set \(y _ { j } = m _ { a } \times x _ { j } + c _ { a }\) |
| Step 15 | Record \(\left( x _ { j } , y _ { j } \right)\) in the print area |
| Step 16 | If \(j = 3\) then go to Step 19 |
| Step 17 | Set \(j = j + 1\) |
| Step 18 | Go to Step 7 |
| Step 19 | Stop |
| Step 20 | Record "parallel" in the print area |
| Step 21 | Go to Step 16 |
- 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]
- Describe what the algorithm achieves.