引用本文:吴向军,陈国良.关于迷宫排序问题的研究.软件学报,1994,5(3):12-21
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 4449次   下载 5459 本文二维码信息
码上扫一扫!
分享到: 微信 更多
关于迷宫排序问题的研究
吴向军1, 陈国良2
1.中山大学计算机系,广州 510275;2.中国科学技术大学计算机科学系,合肥 230026
摘要:
本文首先把迷宫排序问题推广为m×n迷宫(m>1,n>1)的排序问题,证明了m×n迷宫的任一初始状态能经过有限步移动转变成目标状态的充要条件,然后给出了一个m×n迷宫排序的算法,该算法的时间复杂度是O(mn(m+n)),空间复杂度是O(mn).最后还指出了它的时间复杂度的一个下界.这样,关于迷宫排序问题就基本上得到了圆满地解决.
关键词:  m×n迷宫(m>1,n>1),迷宫状态序列,数字i的逆序数1(i),迷宫状态的逆序数r(m,n),迷宫状态的特征值f(m,n).
DOI:
分类号:
基金项目:
ON SORTING OF M×N MAZE
Wu Xiangjun,Chen Guoliang
Abstract:
his paper considers the problem of sorting m×n maze (m>1, n>1 ) and proves an sufficient and necessary condition that anoriginal state can be changed into specified-target state in finite step for m×u maze, then presents a sorting algorithm for m×n maze, its time complexity is O(mn (m+n)), its space complexity is O (mn), finaly, this paper gives a lower bound and shows that the algorithm is optimal where m=n.
Key words:  m×n maze (m>1,n>1)  state sequence  reverse order number l(i) of i  reverse order number r (m,n) of state  eigenvalue f(m, n) of state.