Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Tutorial 1b

a) Use a trace table to record the results of each instruction as the algorithm above is applied
to the following data and state the final output:

b) Explain what the algorithm achieves for any set of data x1 to xn

2
Tutorial 1b
a) Use a trace table to record the results of each instruction as the algorithm above is applied
and state the final output.
b) Explain what the algorithm achieves.
c) Attempt to apply the algorithm again, with the initial value of a, as specified in Box 2,
changed to 5. Explain what happens.
d) Find the set of positive initial values of a for which the algorithm will work.

You might also like