Advertisement

A fast algorithm for melding splay trees

  • Graeme Port
  • Alistair Moffat
Conference paper
Part of the Lecture Notes in Computer Science book series (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.

Keywords

Recursive Call Input Tree Usual Range Binary Search Tree Initial Potential 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Sleator D.D. & R.E. Tarjan, Self-adjusting binary search trees, J. ACM, 32 (1985), 652–686.CrossRefGoogle Scholar
  2. 2.
    Tarjan R.E., Amortised computational complexity, SIAM J. Alg. Disc. Meth., 6 (1985), 306–318.Google Scholar
  3. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Graeme Port
    • 1
  • Alistair Moffat
    • 1
  1. 1.Department of Computer ScienceThe University of MelbourneParkvilleAustralia

Personalised recommendations