Live data from Hacker News

Show HN: Twelve Simple Algorithms to Compute Fibonacci Numbers

arxiv.org

1–5 of 5 posts

Re: Show HN: Twelve Simple Algorithms to Compute Fibonacci Numbers

#3
another interesting fact:

if you have to compute the fib of very large numbers mod n. you can use the fact that the fibonnaci numbers would repeat.( see: https://en.wikipedia.org/wiki/Pisano_period)

this allows you to solve problems like this: https://www.spoj.com/problems/FIBHARD/

Re: Show HN: Twelve Simple Algorithms to Compute Fibonacci Numbers

#4
post #3

another interesting fact: if you have to compute the fib of very large numbers mod n. you can use the fact that the fibonnaci numbers would repeat.( see: https://en.wikipedia.org/wiki/Pisano_period ) this allows you to solve problems like this: https://www.spoj.com/problems/FIBHARD/

Thank you for the comment. Will check it out.

Re: Show HN: Twelve Simple Algorithms to Compute Fibonacci Numbers

#5
post #2

Algorithm fib1 („Dynamic Programming without Memoization“) is just ordinary recursion and not dynamic programming.

Thank you for the comment. Pls refer to many references on the Web on the use of Fibonacci sequence as a dynamic programming example or illustration.