检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
出 处:《电气电子教学学报》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[自动化与计算机技术—计算机系统结构]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.124