Lecture Chapter 2 Part 3
Lecture Chapter 2 Part 3
Section 2.5
•
• The efficiency of the algorithm will obviously
be determined by the efficiency of an
exponentiation algorithm used for computing
φn.
• If it is done by simply multiplying φ by itself
n − 1 times
• There are faster algorithms for the exponentiation
problem.
For example, using divide and conquer and transform and
conquer
• Note also that special care should be exercised in
implementing this approach to computing the nth
Fibonacci number.
• Since all its intermediate results are irrational numbers,
we would have to make sure that their approximations
in the computer are accurate enough so that the final
round-off yields a correct result.
• Read Chapter 2.5