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

A Non-recursive Algorithm and Simulation Based on Record Method for Hanoi Tower

在线阅读下载全文

作  者:戴莉萍[1] 黄龙军[1] 刘清华[1] 

机构地区:[1]江西师范大学软件学院,江西南昌330022

出  处:《电气电子教学学报》2015年第6期112-116,共5页Journal of Electrical and Electronic Education

基  金:江西省高校教改课题项目(JXJG-14-2-20)

摘  要: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.

关 键 词:HANOI塔问题 自底向上记录式 非递归算法 仿真实现 

分 类 号:TP301.6[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象