Query costs in HB(1) trees versus 2–3 trees
Query costs in random AVL trees are compared to those in random 2–3 trees. Both data structures are assumed to reside in main storage. Costs are calculated in terms of the number of node visits and key comparisons required to find a match or no match for a given key. The comparison is based upon theoretical concepts and implementation dependent considerations; e.g., data and instruction fetch. It is shown that if the cost of a key comparison is greater than or equal to the cost of a node access, then AVL trees are more advantageous.
Key wordsBinary search trees AVL trees 2–3 trees tree height dense and sparse nodes key comparison node visit
Unable to display preview. Download preview PDF.
- 1.A. V. Aho, J. E. Hopcroft, and J. D. Ullman,The Design and Analysis of Computer Algorithms (Addison-Wesley, Reading, Mass., 1975).Google Scholar
- 2.J. L. Baer and B. Schwab, “A Comparison of Tree-Balancing Algorithms,”Comm. ACM, 20(5):322–330 (May 1977).Google Scholar
- 3.P. L. Karlton, S. H. Fuller, R. E. Scraggs, and E. B. Kaehler, “Performance of Height-Balanced Trees,”Comm. ACM, 19(l):23–28 (Jan. 1976).Google Scholar
- 4.D. E. Knuth,The Art of Computer Programming, Vol. I (Addison-Wesley, Reading, Mass., 1969).Google Scholar
- 5.D. E. Knuth,The Art of Computer Programming, Vol. 3 (Addison-Wesley, Reading, Mass., 1973).Google Scholar
- 6.W. A. Martin and D. N. Ness, “Optimizing Binary Trees Grown with a Sorting Algorithms,”Comm. ACM, 15(2):88–93 (Feb. 1972).Google Scholar
- 7.R. E. Miller, N. Pippenger, A. L. Rosenberg, and L. Snyder, “Optimal 2–3 Trees,”SIAM J. of Computing, 8(1):42–49 (Feb. 1979).Google Scholar
- 8.J. Nievergelt, “Binary Search Trees and File Organization,”Computing Surveys, 6:195–207 (Sept. 1974).Google Scholar
- 9.A. L. Rosenberg and L. Snyder, “Minimal Comparison 2–3 Trees,”SIAM J. of Computing, 7(4):465–480 (Nov. 1978).Google Scholar
- 10.J. R. Van Doren, An Asymptotic Analysis of Minimum Order B-Trees, Dept. of Computing and Information Sciences, Oklahoma State University, Feb. 1976.Google Scholar
- 11.A. C. C. Yao, “Random 2–3 Trees,”Acta Informatica, 9:159–170.Google Scholar
- 12.A. S. Zaki, Insertion and Search in 2–3 Trees Versus HB(1) Trees, Ph.D. Dissertation, University of Washington, Seattle, WA., March 1977.Google Scholar