期刊文献+

记录式Hanoi塔非递归算法及快速仿真 被引量:1

A Non-recursive Algorithm and Simulation Based on Record Method for Hanoi Tower
下载PDF
导出
摘要 Hanoi塔问题的递归算法虽然代码量小,但时间复杂度是指数级的且难以理解。本文分析了递归函数的调用参数和语句执行时盘子移动的顺序,提出一种新的自底向上非递归算法。该算法将求取盘子移动轨迹转化为单纯的字符替代,并利用开发环境中的基本控件即可快速实现该算法的仿真运行。 The code of the recursion algorithm for Hanoi tower problem is simple, but the time complexity is expo- nential and the code is difficult to understand. Based on the analysis of the reeursive function's parameters and statement exection the plates' moving track is geted. A new down-up non-recursive algorithm is put forward, this algorithm makes use of simple character replacement function instead of plate's moving track, and it also makes the program simulation easy and fast to be implemented by using some basic controls in a common development environ- ment.
出处 《电气电子教学学报》 2015年第6期112-116,共5页 Journal of Electrical and Electronic Education
基金 江西省高校教改课题项目(JXJG-14-2-20)
关键词 HANOI塔问题 自底向上记录式 非递归算法 仿真实现 Hanoi tower problem down-up record non-recursive algorithm simulation implementation
  • 相关文献

参考文献3

共引文献19

同被引文献13

引证文献1

二级引证文献5

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部