This Article 
 Bibliographic References 
 Add to: 
Adaptive Structuring of Binary Search Trees Using Conditional Rotations
August 1993 (vol. 5 no. 4)
pp. 695-704

Consider a set A=(A_1,A_2,..., A_n) of records, where each record is identified by a unique key. The records are accessed based on a set of access probabilities S=(s_1,s_2,..., s_n) and are to be arranged lexicographically using a binary search tree (BST). If S is known a priori, it is well known that an optimal BST may be constructed using A and S. The case when S is not known a priori is considered. A new restructuring heuristic is introduced that requires three extra integer memory locations per record. In this scheme, the restructuring is performed only if it decreases the weighted path length (WPL) of the overall resultant tree. An optimized version of the latter method, which requires only one extra integer field per record has, is presented. Initial simulation results comparing this algorithm with various other static and dynamic schemes indicates that this scheme asymptotically produces trees which are an order of magnitude closer to the optimal one than those produced by many of the other BST schemes reported in the literature.

[1] G. M. Adel'son-Velski'i and E. M. Landis, "An algorithm for the organization of information,"Sov. Math. Dokl., vol. 3 pp. 1259-1262, 1962.
[2] B. Allen and I. Munro, "Self-organizing binary search trees,"J. ACM, vol. 25, pp. 526-535, 1978.
[3] D. M. Arnow and A. M. Tenenbaum, "An investigation of the moveahead-k rules," inCongressus Numerantium, Proc. Thirteenth Southeastern Conf. Combinatorics, Graph Theory and Computing, pp. 47-65, Feb. 1982.
[4] P. J. Bayer, "Improved bounds on the costs of optimal and balanced binary search trees,"MAC Tech. Memo-69, Nov. 1975.
[5] J. R. Bitner, "Heuristics that dynamically organize data structures,"SIAM J. Comput., vol. 8, pp. 82-110, 1979.
[6] R. P. Cheetham, B. J. Oommen, and D. T. H. Ng,Adaptive Structuring of Binary Search Trees Using Conditional Rotations, Technical Report available as SCS-TR-126 from the School of Computer Science, Carleton University, Ottawa, Canada.
[7] G. H. Gonnet, "Balancing binary trees by internal path reduction,"Commun. ACM, vol. 26, pp. 1074-1081, 1983.
[8] G. H. Gonnet, J. I. Munro, and H. Suwanda, "Exegesis of self-organizing linear search,"SIAM J. Comput., vol. 10, pp. 613-637, 1981.
[9] H. J. Hester and D. S. Hirschberg, "Self-organizing linear search,"ACM Computing Surveys, pp. 295-311, 1976.
[10] D. E. Knuth,The Art of Computer Programming, Vol. 3, Reading, MA: Addison-Wesley, 1973.
[11] T. W. Lai and D. Wood, "A relationship between self organizing lists and binary search trees," inProc. 1991 Int. Conf. Computing and Information, pp. 111-116, May 1991.
[12] J. McCabe "On serial files with relocatable records".Operations Research, vol. 12, pp. 609-618, 1965.
[13] K. Mehlhorn, "Nearly optimal binary search trees,"Acta Informatica, vol. 5, pp. 287-295, 1975.
[14] K. Mehlhorn, "Dynamic binary search,"SIAM J. Comput., vol. 8, pp. 175-198, 1979
[15] K. Mehlhorn,Data Structures and Algorithms 1 : Sorting and Searching. Berlin: Springer Verlag, 1984.
[16] B. J. Oommen and E. R. Hansen, "List organizing strategies using stochastic move-to-front and stochastic move-to-rear operations,"Siam J. Comput., vol. 16, pp. 705-716, 1987.
[17] B. J. Oommen, E. R. Hansen, and J. I. Munro, "Deterministic optimal and expedient move-to-rear list organizing strategies,"Theoretical Computer Science, vol. 74, pp. 183-197, 1990.
[18] R. L. Rivest, "On self organizing sequential search heuristics,"Comm. Ass. Comput. Mach., vol. 19, pp. 63-67, 1976.
[19] D. D. Sleator and R. E. Tarjan, "Self-adjusting binary search trees,J. ACM, vol. 32, pp. 652-686, 1985.
[20] W. A. Walker and C. C. Gotlieb, "A top-down algorithm for constructing nearly optimal lexicographical trees," inGraph Theory and Computing. New York: Academic Press, 1972.

Index Terms:
adaptive structuring; binary search trees; conditional rotations; restructuring heuristic; integer memory locations; weighted path length; simulation; tree data structures
R.P. Cheetham, B.J. Oommen, D.T.H. Ng, "Adaptive Structuring of Binary Search Trees Using Conditional Rotations," IEEE Transactions on Knowledge and Data Engineering, vol. 5, no. 4, pp. 695-704, Aug. 1993, doi:10.1109/69.234780
Usage of this product signifies your acceptance of the Terms of Use.