期刊文献+

完全二叉树相邻结点最近共同祖先的一种快速算法 被引量:1

Fast algorithm for finding the lowest common ancestor of two neighboring nodes in a complete binary tree
下载PDF
导出
摘要 寻找二叉树中两结点的最近共同祖先问题一直是图论与计算机科学关注的问题。首先,证明了完全求解二叉树相邻结点最近共同祖先的一个定理,该定理的求解方法主要涉及到位运算,无需递归搜索,既易于软件编程实现又易于通过硬件实现,然后给出了一个具有对数时间复杂度O(lnn)的快速算法及C++示例。 Finding the lowest common ancestor (LCA) of two nodes in a binary tree has been focused both in graph theory and computer science. The paper first proves a theorem for finding the LCA of two neighboring nodes in a complete binary tree. The method in the theorem mainly concerns bitwise operations, needs no recursive searching procedures and thus is easy to be realized by software programming as well as firmware mode. In the end of the paper, an algorithm that has logarithmic time complexity is also presented with C++ implementation.
作者 王珏
出处 《佛山科学技术学院学报(自然科学版)》 CAS 2013年第6期55-58,共4页 Journal of Foshan University(Natural Science Edition)
基金 广东省工业攻关项目(2012B010600018) 佛山市科技发展专项资金项目(2011AA100021 2011GY006 2011B1023) 佛山市产学研专项资助课题(2010C012)
关键词 二叉树 最近共同祖先 计算 binary tree lowest common ancestor computation
  • 相关文献

参考文献10

  • 1WIK1PED1A. Lowest Common Ancestor[EB/OL]. [2013-09-06]. http..//en, wikipedia, org/wiki/Lowest _com- mon ancestor.
  • 2BENDER M A, FARACH-COLTON M. The LCA problem revisited[C]//Proceedings of the 4th Latin American Symposium on Theoretical Informatics, Lecture Notes in Computer Science. Berlin :Springer-Verlag, 2000:88-94.
  • 3ALSTRUP S, GAVOILLE C, KAPLAN H, et al. Nearest common ancestors :a survey and a new distributed al- gorithm[J]. Theory of Computing Systems, 2004,37(3) .-441-456.
  • 4FISCHER J, HEUN V. Theoretical and Practical Improvements on the RMQ-Problem, with Applications to LCA and LCE[C]// Proceedings of the 17th Annual Symposium on Combinatorial Pattern Matching, Lecture Notes in Computer Science. Berlin :Springer-Verlag, 2006 : 36-48.
  • 5CZUMAJ A, KOWALUK M, LINGAS A. Faster algorithms for finding lowest common ancestors in directed ac- yclic graphs[J]. Theoretical Computer Science, 2007,380(1-2) : 37-46.
  • 6EL MOUFATICH F. Lowest Common Ancestor[EB/OL]. [2008-03-19]. http ://wwwl4. informatik, t- muench- en. de/konferenzen/Jass08/eourses/1/moufatich/E1 _ Moufatich _ Paper. pdf.
  • 7GRAHAMRL.KNUTHDE.PATASHNIKO.具体数学--计算机科学基础[M].2版.北京:机械工业出版社,2009.
  • 8徐士良.葛兵.实用数据结构(C++描述)[M].2版.北京:清华大学出版社,2006.
  • 9王兴波.位运算运算律的解析及一个同余恒等式的证明[J].佛山科学技术学院学报(自然科学版),2011,29(3):53-57. 被引量:1
  • 10王兴波.刘波.周燕,等.C语言基础教程[M].天津:天津大学出版社,2011.

二级参考文献6

同被引文献11

引证文献1

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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