Skip to main content

A fast algorithm for melding splay trees

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 382))

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.

Unable to display preview. Download preview PDF.

References

  1. Sleator D.D. & R.E. Tarjan, Self-adjusting binary search trees, J. ACM, 32 (1985), 652–686.

    Article  Google Scholar 

  2. Tarjan R.E., Amortised computational complexity, SIAM J. Alg. Disc. Meth., 6 (1985), 306–318.

    Google Scholar 

  3. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

F. Dehne J. -R. Sack N. Santoro

Rights and permissions

Reprints 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

Publish with us

Policies and ethics