摘要
首先分析了常系数线性递推方程的一般解法。接着根据幂级数与生成函数的关系,将生成函数用于递推方程的求解。最后通过对经典问题——Hanoi塔的例子,利用MATLAB仿真,对递归和非递归程序的执行效率进行了比较,验证了求解递推方程的必要性。
First of all, the general solution of linear recurrence equation with constant coefficients is analyzed. Then, according to the relation between power series and generating function, the generating function is applied to solve the recursive equation. Finally, the implementation efficiency of recursive and non-recursive programs for classical problem-Hanoi is compared. The MATLAB simulation results indicate that it is necessary to solve the recurrence equation.
作者
金渊智
JIN Yuanzhi(Department of Computer Technology and Information Engineering,Sanmenxia Polytechnic,Sanmenxia 472000,China)
出处
《安阳工学院学报》
2019年第2期84-86,共3页
Journal of Anyang Institute of Technology
基金
国家自然科学基金(71502021)
关键词
递归
递推方程
程序设计
算法分析
recursion
recursive equation
programming
algorithm analysis