Show HN: Twelve Simple Algorithms to Compute Fibonacci Numbers(arxiv.org)13 points·by adas0693·6 ปีที่แล้ว·4 commentsarxiv.orgShow HN: Twelve Simple Algorithms to Compute Fibonacci Numbershttps://arxiv.org/abs/1803.071992 commentsPost comment[–]Yessing·6 ปีที่แล้วreplyanother 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)<spoiler>this allows you to solve problems like this: https://www.spoj.com/problems/FIBHARD/<\spoiler>[–]adas0693·6 ปีที่แล้วreplyThank you for the comment. Will check it out.[–]hxhxhrra·6 ปีที่แล้วreplyAlgorithm fib1 („Dynamic Programming without Memoization“) is just ordinary recursion and not dynamic programming.[–]adas0693·6 ปีที่แล้วreplyThank 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.
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)
<spoiler>
this allows you to solve problems like this: https://www.spoj.com/problems/FIBHARD/
<\spoiler>