Deletion Without Rebalancing in Binary Search Trees

Author:

Sen Siddhartha1,Tarjan Robert E.2,Kim David Hong Kyun3

Affiliation:

1. Microsoft Research, New York, NY

2. Princeton University and Intertrust Technologies, Sunnyvale, CA

3. University of Chicago, Chicago, IL

Abstract

We address the vexing issue of deletions in balanced trees. Rebalancing after a deletion is generally more complicated than rebalancing after an insertion. Textbooks neglect deletion rebalancing, and many B-tree--based database systems do not do it. We describe a relaxation of AVL trees in which rebalancing is done after insertions but not after deletions, yet worst-case access time remains logarithmic in the number of insertions. For any application of balanced trees in which the number of updates is polynomial in the tree size, our structure offers performance competitive with that of classical balanced trees. With the addition of periodic rebuilding, the performance of our structure is theoretically superior to that of many, if not all, classic balanced tree structures. Our structure needs lg lg m + 1 bits of balance information per node, where m is the number of insertions and lg is the base-two logarithm, or lg lg n + O(1) with periodic rebuilding, where n is the number of nodes. An insertion takes up to two rotations and O(1) amortized time, not counting the time to find the insertion position. This is the same as in standard AVL trees. Using an analysis that relies on an exponential potential function, we show that rebalancing steps occur with a frequency that is exponentially small in the height of the affected node. Our techniques apply to other types of balanced trees, notably B-trees, as we show in a companion article, and particularly red-black trees, which can be viewed as a special case of B-trees.

Funder

AFOSR MURI grant

NSF

US-Israel Binational Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Mathematics (miscellaneous)

Reference39 articles.

1. Zipf’s law and the Internet;Adamic Lada A.;Glottometrics,2002

2. An algorithm for the organization of information;Adel’son-Vel’skii G. M.;Soviet Mathematics Doklady,1962

3. Binary B-trees for virtual memory

4. Symmetric binary B-Trees: Data structure and maintenance algorithms

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Exploiting Flat Namespace to Improve File System Metadata Performance on Ultra-Fast, Byte-Addressable NVMs;ACM Transactions on Storage;2024-01-30

2. The Unit Re-Balancing Problem;Mathematics;2021-12-11

3. To-many or to-one? all-in-one! efficient purely functional multi-maps with type-heterogeneous hash-tries;ACM SIGPLAN Notices;2018-12-02

4. To-many or to-one? all-in-one! efficient purely functional multi-maps with type-heterogeneous hash-tries;Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation;2018-06-11

5. Flexible data views: design and implementation;Proceedings of the 4th ACM SIGPLAN International Workshop on Libraries, Languages, and Compilers for Array Programming;2017-06-18

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3