时间复杂度为O(lg n)的Lucas数算法
Middle and Ripple, fast simple O(lg n) algorithms for Lucas Numbers
摘要:
给出了求解单个Lucas数的一个快速简单的O(\log n)迭代算法.这比使用基于斐波那契的方法更快,因为卢卡斯数的结构。在Lucus数上使用sqrt 5转换因子可以提供更快的Fibonacci算法。此外,还给出了求单个Lucas数的一个快速简单的递归算法,其时间复杂度为O(logn).
英文摘要:
A fast simple O(\log n) iteration algorithm for individual Lucas numbers is given. This is faster than using Fibonacci based methods because of the structure of Lucas numbers. Using a sqrt 5 conversion factor on Lucus numbers gives a faster Fibonacci algorithm. In addition, a fast simple recursive algorithm for individual Lucas numbers is given that is O(log n).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。