期刊文献+

树非递归遍历统一的新解法及其形式证明 被引量:1

United Solution and Its Formal Proof about Non-Recursive Algorithms of Tree Traversal
下载PDF
导出
摘要 提出树遍历统一的新解法,使其非递归算法像递归算法一样简单.首先以后序遍历为例,基于结点状态标记和遍历规则提取,从遍历定义导出遍历的递推公式,由此机械获得非递归算法和循环不变式,并用形式化方法证明其正确性.之后按不同遍历定义变换公式参数,获得二叉树前序、中序和K叉树前序、后序的递推公式,所得算法比传统算法更简洁直观,表明本解法的有效性和通用性. A united solution of tree traversal is presented.It makes its non-recursive algorithms are same easy as its recursive algorithms.From the definition of postorder,by marking node states and extracting rules,the recurrence formula of postorder is derived.Then,non-recursive algorithm and its loop invariant are obtained mechanically according to the formula,their correctness are proved formally.Furthermore,some recurrence formulas of other kinds of traversals,including preorder/inorder of binary tree,and preorder/postorder of K-ary tree,are obtained by changing formula's parameters according to their traversal definitions,and the algorithms are more simple than the traditional.Results show that our solution is valid and united.
出处 《江西师范大学学报(自然科学版)》 CAS 北大核心 2010年第2期123-127,共5页 Journal of Jiangxi Normal University(Natural Science Edition)
基金 国家"973"前期预研项目(2003CCA02800) 国家自然科学基金(60273092) 江西省自然基金(2008GQS0056) 江西省教育厅科技项目(GJJ09142)资助
关键词 树遍历 非递归算法 循环不变式 tree traversal non-recursive algorithm loop invariant
  • 相关文献

参考文献12

  • 1Aho A V,Ullman J D,Hopcroft J E.Data structures and algorithms[M].New York:Addison-Wesley,1983.
  • 2严蔚敏,吴伟民.数据结构:C语言版[M].北京:清华大学出版社,2007.
  • 3Knuth D E.The art of computer programming:Fundaméntal algorithms[M].3rd ed.Vol 1.New York:Addison-Wesley,1997.
  • 4Gries 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.
  • 5Xue Jin-yun.Two new strategies for developing loop invariant and their applications[J].Journal of Computer Science and Technology,1993,8(2):51-58.
  • 6左正康,游珍,薛锦云.后序遍历二叉树非递归算法的推导及形式化证明[J].计算机工程与科学,2010,32(3):119-123. 被引量:9
  • 7Loginov A,Reps T,Sagiv M.Automated verification of the deutsch-schorr-waite tree-traversal algorithm[C] //Proc of SAS.Seoul:Springer,2006:261-279.
  • 8黄明和.树遍历算法的演绎综合[J].计算机工程与科学,1997,19(1):5-9. 被引量:1
  • 9化志章,揭安全,李云清,薛锦云.形式推导支持的递归程序向非递归程序的转换[J].计算机工程与科学,2007,29(10):145-147. 被引量:5
  • 10Xue Jin-yun.PAR method and its supporting platform[C] //Proc of the First International Workshop on Asian Working Conference on Verified Software.Macao:UNU-ⅡST,2006:11-20.

二级参考文献21

  • 1石海鹤,肖正兴,薛锦云.循环不变式开发新策略及其应用[J].计算机工程与应用,2006,42(4):105-107. 被引量:8
  • 2石海鹤,石海鹏,薛锦云.形式化开发Hanoi塔问题非递归算法[J].计算机工程与应用,2007,43(11):96-99. 被引量:3
  • 3Gries D. The Science of Programming[M].Springer Verlag,1981.
  • 4Xue Jinyun. PAR Method and Its Supporting Platform[C]// Proc of the 1st Int'l Workshop on Asian Working Conf on Verified Software, 2006:29 -31.
  • 5Dijkstra E W. A Discipline of Programming [M]. Englewood Cliffs: Prentice Hall, 1976.
  • 6Loginov A,Reps T, Sagiv M. Automated Verification of the Deutsch-Schorr-Waite Tree-Traversal Algorithm[C]//Proc of SAS'06, 2006:261 -279.
  • 7Xue Jinyun, Yang Q. Formal Development of Graph and Tree Algorithmic Programs Using PAR Method[C]//Proc of the Int'l Symp on Future Software Technology, 2000.
  • 8Xue Jinyun. A Practicable Approach for Formal Development of Algorithmic Programs[C]//Proc of the Int' l Symp on Future Software Technology, 1999 : 158-160.
  • 9陈永川.信息时代的组合数学[EQ/OL].[2006-05-18].www.yongchuan.org/kepu/newscom.htm.
  • 10Xue Jinyun,Davis R.A derivation and proof of knuth' binary to decimal program[J].Software-Concepts and Tools,1997 (18):149-156.

共引文献22

同被引文献11

  • 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.
  • 7Arora 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.
  • 8Gries D. The science of programming [ M ]. New York: Springer-Verlag, 1981.
  • 9Dijkstra E W, Scholten C S. Predicate calculus and pro- gram semantics [ M ]. New York : Springer-Verlag, 1990.
  • 10唐自立.基于遍历序列的构造严格二叉树的算法[J].苏州大学学报(自然科学版),2010,26(3):40-43. 被引量:5

引证文献1

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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