期刊文献+

一种新的删除AA-树结点的算法

New algorithm for deleting node from AA-tree
下载PDF
导出
摘要 Andersson的删除AA-树结点的算法的主要思想是先删除结点再自下而上处理某些子树,涉及自下而上的后退。提出一种新的删除AA-树结点的算法,其主要思想是先自上而下处理某些子树再删除结点,不涉及自下而上的后退。举例说明新算法的执行过程。证明新算法是正确的。与Andersson的算法相比,新算法不涉及辅助栈的使用。设n是AA-树的内部结点的个数,执行新算法时进行O(lbn)次旋转,新算法的时间复杂性是O(lbn),与Andersson的算法的时间复杂性相同。实验结果表明新算法的平均执行时间比Andersson的算法的平均执行时间短。新算法的空间复杂性是O(1),比Andersson的算法的空间复杂性低。 The main idea of Andersson’s algorithm for deleting a node from an AA-tree is to delete the node first and then to process certain subtrees from below to above,relating to the backtracking from below to above.A new algorithm for deleting a node from an AA-tree is presented,whose main idea is to process certain subtrees from above to below first and then to delete the node,instead of relating to the backtracking from below to above.The execution of the new algorithm is illustrated by an example.The new algorithm is proved correct.Compared with Andersson’s algorithm,the new algorithm does not relate to the use of an auxiliary stack.Let n be the number of internal nodes of an AA-tree.O(lbn) rotations are performed during the execution of the new algorithm.The time complexity of the new algorithm is O(lbn),and it is the same as that of Andersson’s algorithm.Experimental results show that the average execution time of the new algorithm is shorter than that of Andersson’s algorithm.The space complexity of the new algorithm is O(1),and it is lower than that of Andersson’s algorithm.
作者 唐自立
出处 《计算机工程与应用》 CSCD 北大核心 2008年第12期34-37,共4页 Computer Engineering and Applications
基金 江苏省自然科学基金(the Natural Science Foundation of Jiangsu Province of China under Grant No.BK2005027)
关键词 AA-树 准AA-树 黑高度 结点 删除 旋转 AA-tree almost AA-tree black-height node deletion rotation
  • 相关文献

参考文献5

二级参考文献12

  • 1唐自立.一种新的删除AVL树的结点的算法[J].计算机应用与软件,2005,22(4):107-109. 被引量:4
  • 2唐自立.一种新的删除红黑树的结点的算法[J].计算机应用与软件,2006,23(1):139-141. 被引量:6
  • 3Cormen T. H. Leiserson C. E. Rivest R L, Stein C, Introduction to Algorithms[ M ] ,2nd ed, Cambridge, MA : MIT Press ,2001.
  • 4Weiss M. A, Data Structures and Algorithm Analysis in C ++ [ M] ,2nd ed, Reading, MA : Addlson-Wesley Longman, 1999.
  • 5CORMEN T H,LEISERSON C E,RIVEST R L,et al.Introduction to Algorithms[M].Cambridge,MA:MIT Press,2001.
  • 6BAASE S,GELDER A V.Computer Algorithms:Introduction to Design and Analysis[M].Reading,MA:Addison-Wesley Longman,2000.
  • 7SAHNI S.Data Structures,Algorithms,and Applications in C++[M].Boston:McGraw-Hill,1998.
  • 8COLLINS W J.Data Structures and the Standard Template Library[M].Boston:McGraw-Hill,2003.
  • 9Foster C C.A generalization of AVL trees[J].Communications of the ACM,1973,16(8):513-517.
  • 10Karlton P L,Fuller S H,Scroggs R E,et al.Performance of heightbalanced trees[J].Communications of the ACM,1976,19(1):23-28.

共引文献9

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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