Evaluation of Recurrence Relation:
This is a special case of the two-term linear recurrence
[PAMC],
(1.1) x(i) = a(i)*x(i-1) + b(i)*x(i-2), (i = 1, 2, ..., n)
to be solved for x(2), x(3), ....., x(n),
given the values of x(0) and x(1),
and the coefficient a(i) and b(i). At first sight, the
parallelism in (1.1) is not obvious. But if we reformulate the equation in
matrix-vector notation. Write
| x(1) | | x(i) |
y(1) = | |, ..., y(i) = | |, (i=2, 3, ..., n)
| x(0) | | x(i-1) |
Then (1.1) can be written
| a(i) b(i) |
y(i) = M(i)*y(i-1), M(i) = | |, (i = 2, 3, ....., n)
| 1 0 |
therefore
| x(n) | | x(1) |
| | = y(n) = M(n) M(n-1) ... M(2)*| |
| x(n-1) | | x(0) |
Code the algorithm for data parallel computation (say, by pairwise or
fan-in multiplication) for sufficient large n,
say n=8k (8192).
You need to discuss in detail in your project on the implementation
data structure as well as any optimization techniques.
The coefficients a(i),b(i) can be assumed properly.