期刊文献+

基于遍历序列恢复二叉树的新解法及其证明 被引量:2

A New Solution with Proof for Reconstructing a Binary Tree from Its Traversals
下载PDF
导出
摘要 提出了一种基于前序和中序遍历序列恢复二叉树的解法,算法以数学公式形式呈现,反映了建树过程中相关数据变化的一般规律,具备数学上的引用透明性,由此能机械获得非递归程序和循环不变式,并进行了正确性证明.通过简单变换,获得了后序+中序、前序+后序恢复二叉树的可信算法.实验效果表明了该解法的有效性. A new solution for reconstructing a binary tree based on the pre-order and in-order traversal is proposed.Its algorithm is mathematical formula,which reflecting the data change rule about the reconstructing binary tree process,and with referential transparency on the mathematical.Then,non-recursive Abstract program and its loop invariant are obtained mechanically according to the formula,and their correctness are proved formally.And through a simple transformation,the trusted algorithms using post-order + in-order traversal,and pre-order + post-order traversal,are obtained.Experimental results show the effectiveness of this solution.
作者 化志章
出处 《江西师范大学学报(自然科学版)》 CAS 北大核心 2013年第3期268-272,共5页 Journal of Jiangxi Normal University(Natural Science Edition)
基金 江西省教育厅科技课题(GJJ09142)资助项目
关键词 状态变迁 二叉树遍历 恢复二叉树 循环不变式 state transformation binary tree traversal reconstructing tree loop invariant
  • 相关文献

参考文献12

  • 1Knuth D E. The art of volume 1 fundamental algorithms [ M ]. 3rd Edition. New York : Ad- dison Wesley, 1997.
  • 2Mu S C, Bird R S. Rebuilding a tree from its traversals:a case study of program inversion [ EB/OL ]. [ 2012-10-11 ]. http: //citeseerx, ist. psu. edu/viewdoc/summary? doi = 10.1.1.6. 1166.
  • 3Burgdorff H A,Jojodia S,Springsteel F N,et al. Alternative methods for the reconstruction of tree from their traversals [j]. BIT,1987,27(2) :134-140.
  • 4Gen-Huey Chen, Yu M S, Liu L T. Two algorithms for con- structing a binary tree From its traversals [ J ]. Information Processing Letters, 1988,28 (6) :297-299.
  • 5Andersson A, Carlsson S. Construction of a tree from its traversals in optimal time and space [ J ]. Information Pro- cessing Letters, 1990,34( 1 ) :21-25.
  • 6Makinen E. Constructing a binary tree efficiently from its traversals [ J ]. International Journal of Computer Mathe- matics ,2000 ( 1 ) :75.
  • 7唐自立.基于遍历序列的唯一确定树或二叉树的方法[J].小型微型计算机系统,2001,22(8):985-988. 被引量:11
  • 8唐自立.基于遍历序列的构造严格二叉树的算法[J].苏州大学学报(自然科学版),2010,26(3):40-43. 被引量:5
  • 9Arora N ,Tamta V K, Kumar S. Modified non-recursive al- gorithm for reconstructing a binary tree [ J ]. International Journal of Computer Applications, 2012,43 ( 10 ) : 25-28.
  • 10化志章,杨庆红,揭安全.树非递归遍历统一的新解法及其形式证明[J].江西师范大学学报(自然科学版),2010,34(2):123-127. 被引量:1

二级参考文献17

  • 1石海鹤,石海鹏,薛锦云.形式化开发若干组合数学问题的算法[J].江西师范大学学报(自然科学版),2006,30(5):423-427. 被引量:7
  • 2黄明和.树遍历算法的演绎综合[J].计算机工程与科学,1997,19(1):5-9. 被引量:1
  • 3Makinen E. Constructing a binary tree efficiently from its traversals [ J ]. International Journal of Computer Mathematics, 2000, 75 (2) : 143 - 147.
  • 4Knuth D E. The Art of Computer Programming :vol. 1, Fundamental Algorithms [ M ]. 3rd ed. Reading, MA : Addison-Wesley, 1997.
  • 5Aho A V,Ullman J D,Hopcroft J E.Data structures and algorithms[M].New York:Addison-Wesley,1983.
  • 6严蔚敏,吴伟民.数据结构:C语言版[M].北京:清华大学出版社,2007.
  • 7Knuth D E.The art of computer programming:Fundaméntal algorithms[M].3rd ed.Vol 1.New York:Addison-Wesley,1997.
  • 8Gries D,Snepscheut J L A.Inorder traversal of a binary tree and its inversion[C] //Dijkstra E W.Formal development of programs and proofs.New York:Addison Wesley,1990:37-42.
  • 9Xue Jin-yun.Two new strategies for developing loop invariant and their applications[J].Journal of Computer Science and Technology,1993,8(2):51-58.
  • 10Loginov A,Reps T,Sagiv M.Automated verification of the deutsch-schorr-waite tree-traversal algorithm[C] //Proc of SAS.Seoul:Springer,2006:261-279.

共引文献10

同被引文献10

引证文献2

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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