An empirical study of insertion and deletion in binary search trees
- 1 September 1983
- journal article
- Published by Association for Computing Machinery (ACM) in Communications of the ACM
- Vol. 26 (9) , 663-669
- https://doi.org/10.1145/358172.358183
Abstract
This paper describes an experiment on the effect of insertions and deletions on the path length of unbalanced binary search trees. Repeatedly inserting and deleting nodes in a random binary tree yields a tree that is no longer random. The expected internal path length differs when different deletion algorithms are used. Previous empirical studies indicated that expected internal path length tends to decrease after repeated insertions and asymmetric deletions. This study shows that performing a larger number of insertions and asymmetric deletions actually increases the expected internal path length, and that for sufficiently large trees, the expected internal path length becomes worse than that of a random tree. With a symmetric deletion algorithm, however, the experiments indicate that performing a large number of insertions and deletions decreases the expected internal path length, and that the expected internal path length remains better than that of a random tree.Keywords
This publication has 4 references indexed in Scilit:
- A trivial algorithm whose analysis isn'tJournal of Computer and System Sciences, 1978
- Deletions That Preserve RandomnessIEEE Transactions on Software Engineering, 1977
- Generalized Feedback Shift Register Pseudorandom Number AlgorithmJournal of the ACM, 1973
- Some Combinatorial Properties of Certain Trees With Applications to Searching and SortingJournal of the ACM, 1962