© 1989 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Explaining the Behaviour of Binary Search Trees Under Prolonged Updates: A Model and Simulations¶

1 Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2E7, 2 Data Structuring Group, Department of Computer Science, University of Waterloo, Waterloo, Ontario, Canada, N2L 3G1
In this paper we present an extensive study into the long-term behaviour of binary search trees subjected to updates using the usual deletion algorithms taught in introductory textbooks. We develop a model of the behaviour of such trees which leads us to conjecture that the asymptotic average search path length is
(N
). We present results of large simulations which strongly support this conjecture. However, introducing a simple modification to ensure symmetry in the algorithms, the model predicts no such long-term deterioration. Simulations in fact indicate that asymptotically the average path length of such trees is less than the 1.386...log2 N average path length of trees generated from random insertion sequences.
Received December 1987. revised May 1988.
¶ This work was done in part while the first author was at the University of Waterloo. This work was supported by an NSERC '67 Science Scholarship, Grant A-8053 and grant A-8237, and by the Information Technology Research Centre of Ontario.
* Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2E7
Data Structuring Group, Department of Computer Science, University of Waterloo, Waterloo, Ontario, Canada N2L 3G1