矩阵乘法在斐波那契数列计算中的应用

周卫星, 陈思, 张帆

电脑与电信 ›› 2017, Vol. 1 ›› Issue (9) : 71-73.

电脑与电信 ›› 2017, Vol. 1 ›› Issue (9) : 71-73.
经验交流

矩阵乘法在斐波那契数列计算中的应用

  • 周卫星,陈思,张帆
作者信息 +

Application of Matrix Multiplication in Fibonacci Sequence Calculation

  • ZhouWeixing,Chen Si,Zhang Fan
Author information +
文章历史 +

摘要

本文介绍了斐波那契数列的一些算法思路,对递归算法、自底向上、比内公式等算法的时间复杂度进行了分 析,给出了利用矩阵乘法升维计算降低时间复杂度的方法,对比测试了各算法实现在不同计算量下的执行时间。针对数据溢 出,将long数据类型改进为BigInteger的数据类型,给出了大数计算下的执行时间对比。

Abstract

This paper introduces some algorithms of Fibonacci sequence calculation, analyzes the time complexity of recursive, bottom-up and Binet formula algorithms, gives a method to reduce the time complexity by using two dimension matrix multiplication, and compares the execution time of different amount of calculation among these algorithms. It modifies the long data type to BigInteger data type to resolve the data overflow problem, and compares different algorithms’execution time for large number calculation.

关键词

斐波那契 / 递归 / 比内公式 / 矩阵

Key words

Fibonacci / recursive / Binet formula / matrix

引用本文

导出引用
周卫星, 陈思, 张帆. 矩阵乘法在斐波那契数列计算中的应用[J]. 电脑与电信. 2017, 1(9): 71-73
ZhouWeixing, Chen Si, Zhang Fan. Application of Matrix Multiplication in Fibonacci Sequence Calculation[J]. Computer & Telecommunication. 2017, 1(9): 71-73
中图分类号: TP311.1   

Accesses

Citation

Detail

段落导航
相关文章

/