低调整率的广义AVL树及其统一重平衡方法.pdfVIP

  • 9
  • 0
  • 约2.1万字
  • 约 5页
  • 2017-08-15 发布于湖北
  • 举报

低调整率的广义AVL树及其统一重平衡方法.pdf

低调整率的广义AVL树及其统一重平衡方法.pdf

JournalofComputerApplications ISSN 1001.908l 2015—03一l0 计算机应用,2015,35(3):654—658 C0DEN JYIIDU http://www.joca.cn 文章编号:1001.9081(2015)03—654—05 doi:10.11772/j.issn.1001—9081.2015.03.654 低调整率的广义 AVL树及其统一重平衡方法 江顺亮,胡世鸿,唐神玲 ,葛 芸,叶发茂,徐少平 (南昌大学信息工程学院,南昌330031) ( 通信作者电子邮箱 tangyiling@ncu.edu.cn) 摘 要 :针对传统AVL(Adelson—VelskiiandLandis)树重平衡算法代码量大、流程复杂、调整率过高的问题,提 出 一 种统一重平衡算法,并提出广义AVL树的概念。统一重平衡算法能对AVL树的失衡节点进行 自动分类、调整,取 消了传统重平衡方法中的四种旋转操作。广义AVL树放松 了AVL树的平衡约束,允许左右子树树高相差不超过 Ⅳ (Ⅳ≥1),当更新操作 (插入/删除)执行后 ,广义AVL树只在平衡约束条件不满足时采用统一重平衡算法进行调整。 理论分析与实验结果表明,广义AVL树的调整率随着Ⅳ的增大而显著降低:Ⅳ为5时,调整率低于4%;N为 l3时调 整率低于千分之一。广义AVL树的调整率远低于红黑树等经典数据结构,适合并发应用。 关键词 :广义AVL树;放松平衡约束;重平衡;调整率 中图分类号:TP311.12 文献标志码:A GeneralizedAVLtreewithlowadjustingratioanditsunifiedrebalancingmethod JIANG Shunliang,HU Shihong,TANG Yiling’,GEYun,YEFamao,XUShaoping (SchoolofInJbrmationEngineering,NanehangUniversity,Nanchangfiangxi330031,China) Abstract:ThetraditionalAVL(Adelson—VelskiiandLandis)treeprogrmmninghasbeenfacedwiththeproblemoftoo muchcode,complexprocessandhighadjustingratio.Tosolvetheseproblems,aunifiedrebalancingmethodwasdeveloped andageneralizedAVL(AVL—N)treewasdefined.Theunifiedrebalancingmethodautomaticallyclassifiesthetypeofthe unbalancednodeinAVLtreeandusesanewwaytoadjustthetreeshapewithoutusingstandardrotations.AVL—N treewith relaxedbalanceallowstheheightdiffereneebetweentherightsub—treeandleftsub—treedoesn’texceedN(N≥ 1).When insertionsanddeletionshavebeenperformedinAVL—N tree,theheightdifferencebetweentherightsub—treeandleftsub—tree ofsomenodesmaybehigherthanN.Atthattimetheunifiedrebalancingwouldbeappliedtorearrangetheunbalancednode’S descendants.Thesimulationresultsindicateth

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档