Abstract
Splay trees have emerged as an efficient method for representing ordered sets of items, allowing fast implementation of the usual range of set operations, including insert, access, and delete. Here we consider the more dramatic set operation meld, which produces an ordered set that is the union of two input sets. Starting with a collection of n singleton sets, we show that any sequence of n - 1 meld operations can be carried out in O(n log n) time to produce a single ordered set of at most n items. The splay tree melding algorithm presented is optimal to within a constant factor, as production of the final tree is tantamount to sorting the original list of items.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
Sleator D.D. & R.E. Tarjan, Self-adjusting binary search trees, J. ACM, 32 (1985), 652–686.
Tarjan R.E., Amortised computational complexity, SIAM J. Alg. Disc. Meth., 6 (1985), 306–318.
Port G. & A. Moffat, Efficient algorithms for implementing set operations using splay trees, Technical Report 89/8, Department of Computer Science, University of Melbourne, Australia, February 1989.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Port, G., Moffat, A. (1989). A fast algorithm for melding splay trees. In: Dehne, F., Sack, J.R., Santoro, N. (eds) Algorithms and Data Structures. WADS 1989. Lecture Notes in Computer Science, vol 382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51542-9_37
Download citation
DOI: https://doi.org/10.1007/3-540-51542-9_37
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-51542-5
Online ISBN: 978-3-540-48237-6
eBook Packages: Springer Book Archive