Self-adjusting binary trees

We use the idea of self-adjusting trees to create new, simple data structures for priority queues (which we call heaps) and search trees. Unlike other efficient implementations of these data structures, self-adjusting trees have no balance condition. Instead, whenever the tree is accessed, certain adjustments take place. (In the case of heaps, the adjustment is a sequence of exchanges of children, in the case of search trees the adjustment is a sequence of rotations.) Self-adjusting trees are efficient in an amortized sense: any particular operation may be slow but any sequence of operations must be fast. Self-adjusting trees have two advantages over the corresponding balanced trees in both applications. First, they are simpler to implement because there are fewer cases in the algorithms. Second, they are more storage-efficient because no balance information needs to be stored. Furthermore, a self-adjusting search tree has the remarkable property that its running time (for any sufficiently long sequence of search operations) is within a constant factor of the running time for the same set of searches on any fixed binary tree. It follows that a self-adjusting tree is (up to a constant factor) as fast as the optimal fixed tree for a particular probability distribution of search requests, even though the distribution is unknown.

[1]  Ronald L. Rivest,et al.  On self-organizing sequential search heuristics , 1976, CACM.

[2]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[3]  Clark A. Crane,et al.  Linear Lists and Prorty Queues as Balanced Binary Trees , 1972, Outstanding Dissertations in the Computer Sciences.

[4]  Robert E. Tarjan,et al.  Data structures and network algorithms , 1983, CBMS-NSF regional conference series in applied mathematics.

[5]  Donald E. Knuth,et al.  The Art of Computer Programming, Volume I: Fundamental Algorithms, 2nd Edition , 1997 .

[6]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[7]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[8]  D. Sleator An 0 (nm log n) algorithm for maximum network flow , 1980 .

[9]  James R. Bitner,et al.  Heuristics That Dynamically Organize Data Structures , 1979, SIAM J. Comput..

[10]  M. AdelsonVelskii,et al.  AN ALGORITHM FOR THE ORGANIZATION OF INFORMATION , 1963 .

[11]  M. V. Wilkes,et al.  The Art of Computer Programming, Volume 3, Sorting and Searching , 1974 .

[12]  Robert E. Tarjan,et al.  A data structure for dynamic trees , 1981, STOC '81.

[13]  Edward M. Reingold,et al.  Binary search trees of bounded balance , 1972, SIAM J. Comput..

[14]  J. Ian Munro,et al.  Self-organizing binary search trees , 1976, 17th Annual Symposium on Foundations of Computer Science (sfcs 1976).

[15]  Samuel Watkins Bent Dynamic weighted data structures , 1982 .

[16]  Mark R. Brown The Analysis of a Practical and Nearly Optimal Priorty Queue , 1977, Outstanding Dissertations in the Computer Sciences.

[17]  Robert E. Tarjan,et al.  Biased 2-3 trees , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[18]  Robert E. Tarjan,et al.  Biased Search Trees , 1985, SIAM J. Comput..

[19]  Jan van Leeuwen,et al.  Worst-case Analysis of Set Union Algorithms , 1984, JACM.