Abstract
In this paper we introduce a self-adjusting k-ary search tree scheme to implement the abstract data type DICTIONARY. Sleator and Tarjan introduced splay trees and the splay heuristic in 1983 [ST83]. They proved that the amortized time efficiency of splay trees is within a constant factor of the efficiency of both balanced binary trees (such as AVL trees) and static optimal binary trees. Sleator and Tarjan's splay heuristic is defined only for binary search trees. In this paper, we consider a self-adjustment heuristic for k-ary search trees. We present a heuristic called k-splaying and prove that the amortized number of node READs per operation in k-ary trees maintained using this heuristic is O(log2 n). (Note: All constants in our time bounds are independent of both k and n). This is within a factor of O(log2 k) of the amortized number of node READs required for a B-tree operation. A k-ary tree maintained using the k-splay heuristic can be thought of as a self-adjusting B-tree. It differs from a B-tree in that leaves may be at different depths and the use of space is optimal. We also prove that the time efficiency of k-splay trees is comparable to that of static optimal k-ary trees. If sequence s in a static optimal tree takes time t, then sequence s in any k-splay tree will take time O(tlog2 k+n 2). These two results are k-ary analogues of two of Sleator and Tarjan's results for splay trees. As part of our static optimality proof, we prove that for every static tree (including any static optimal tree) there is a balanced static tree which takes at most twice as much time on any sequence of search operations. This lemma allows us to improve our static optimality bound to O(tlog2 k+nlogk n), and similarly improve Sleator and Tarjan's static optimality result.
Preview
Unable to display preview. Download preview PDF.
References
D. Sleator and R. Tarjan, “Self-adjusting Binary Trees”, STOC 1983.
D. Sleator and R. Tarjan, “Self-adjusting Binary Search Trees”, JACM 32 (July 1985).
R. Tarjan, “Sequential Access in Splay Trees takes Linear Time”, Combinatorica 5 (April 1985).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sherk, M. (1989). Self-adjusting k-ary search 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_32
Download citation
DOI: https://doi.org/10.1007/3-540-51542-9_32
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