Skip Navigation

The Computer Journal 1991 34(5):444-449; doi:10.1093/comjnl/34.5.444
© 1991 by British Computer Society
This Article
Right arrow Full Text (PDF)
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Email this article to a friend
Right arrow Similar articles in this journal
Right arrow Similar articles in ISI Web of Science
Right arrow Alert me to new issues of the journal
Right arrow Add to My Personal Archive
Right arrow Download to citation manager
Right arrowRequest Permissions
Google Scholar
Right arrow Articles by Argo, G.
Right arrow Search for Related Content
Social Bookmarking
 Add to CiteULike   Add to Connotea   Add to Del.icio.us  
What's this?

Weighting Without Waiting: the Weighted Path Length Tree

G. Argo *

Computing Science Department, Glasgow University, Glasgow, G12 8QQ, UK

Over the years, much attention has been focused on algorithms to construct efficient binary search trees. There are three general philosophies: use the ordinary binary tree algorithm; devise a balance criterion to guarantee an upper of bound of {Theta}(log n) on the time per operation; use a restructuring heuristic which guarantees an amortised complexity over a sequence of operations. If the access distribution of the keys is not equiprobable then the solutions in these categories are to date, respectively, naive, misguided and impractical. Instead we derive a solution to this problem by careful examination of the properties of a common transformation on trees, the rotation. Our algorithm is more general than Gonnet's balanced tree4 based on internal path length reduction as it can cope with weighted data. The resulting algorithm performs a rotation only when it is guaranteed to improve the weighted path length of the tree and thus the search time. Consequently we call the resulting data structure the Weighted Path Length (wpl) tree. The algorithm is as simple as that for any balanced binary tree whilst the tree structure produced appears to be very close to optimal. We substantiate these claims by presenting a simple derivation of the algorithm, a proof of the upper bound on the number of rotations performed, and the results of several simulations. By analogy with a result of Gonnet for the path length tree, we hypothesise that the weighted path length of our tree is always within a constant factor of the optimal.


Received November 1990. revised April 1991.

* Computing Science Department, Glasgow University, Glasgow, G12 8QQ, United Kingdom.


Add to CiteULike CiteULike   Add to Connotea Connotea   Add to Del.icio.us Del.icio.us    What's this?




Disclaimer:
Please note that abstracts for content published before 1996 were created through digital scanning and may therefore not exactly replicate the text of the original print issues. All efforts have been made to ensure accuracy, but the Publisher will not be held responsible for any remaining inaccuracies. If you require any further clarification, please contact our Customer Services Department.