引用本文
  • 孙凌宇,冷明.分划递推法在Hanoi塔问题上的应用[J].广西科学院学报,2006,22(4):342-345,351.    [点击复制]
  • SUN Ling-yu,LENG Ming.The Application of PAR Method in Solving the Problem of Tower of Hanoi[J].Journal of Guangxi Academy of Sciences,2006,22(4):342-345,351.   [点击复制]
【打印本页】 【在线阅读全文】【下载PDF全文】 查看/发表评论下载PDF阅读器关闭

←前一篇|后一篇→

过刊浏览    高级检索

本文已被:浏览 300次   下载 252 本文二维码信息
码上扫一扫!
分划递推法在Hanoi塔问题上的应用
孙凌宇1, 冷明2
0
(1.井冈山学院计算机科学系, 江西吉安 343009;2.上海大学计算机学院, 上海 200072)
摘要:
采用分划递推法通过功能归约变换,形式化推导和证明Hanoi塔问题中圆盘的移动规律,从而推导出结构清晰、可读性好、效率高、占用存储空间与圆盘个数无关的非递归算法,算法比较分析地显示出形式化推导在获得高效和正确性的算法程序中的作用.相关算法在UNIX平台下用C语言进行实现.
关键词:  分划递推法  Hanoi塔  归约  变换  形式化推导  算法
DOI:
投稿时间:2005-11-30修订日期:2006-04-17
基金项目:
The Application of PAR Method in Solving the Problem of Tower of Hanoi
SUN Ling-yu1, LENG Ming2
(1.Department of Computer Science, Jinggangshan College, Ji'an, Jiangxi, 343009, China;2.School of Computer Engineering and Science, Shanghai University, Shanghai, 200072, China)
Abstract:
The partition-and-recur method is used to derivate and prove the law of disk movement in the problem of Tower of Hanoi by transform of function specification and formalizing deduction.A non-recursive algorithm in which the occupied memory is unrelated with the number of disks is developed.The algorithm is readable,efficient and has clear structure.The comparison of algorithms shows the effect of the formalizing deduction in obtaining efficient and correct algorithm program.The related algorithm is implemented in UNIX platform with C language.
Key words:  partition-and-recur method  Hanoi tower  specification  transformation  formalizing deduction  algorithm

用微信扫一扫

用微信扫一扫