Abstract
B-trees have been popular data structures since their definition. Their success is due to the fact that a B-tree containingn keys is “balanced” with a height ofO(logn). However, for a given set of elements and their access frequencies, one can construct many B-trees (possibly with different heights). The average access costs of these trees may vary significantly. An algorithm to construct a weighted time-optimal B-tree is presented. A weighted time-optimal B-tree is one in which the weighted access cost is minimized. A dynamic programming algorithm is used to construct a weighted time-optimal B-tree givenn elements and their weights. The algorithm runs in timeO(mn 3 logn) and has a storage requirement ofO(mn 2 logn) wherem is the order of the B-tree andn is the number of keys.
Similar content being viewed by others
References
J. Bitner and S. Huang,Key comparison optimal 2–3trees with maximum storage utilization, SIAM J. Comput. 10 (3), 1981, 558–570.
L. Gotlieb,Optimal multiway search trees, SIAM J. Comput. 10 (3), 1981, 422–433.
L. Gotlieb and D. Wood,The construction of optimal multiway search trees and the monotonicity principle, Internat. J. Comput. Math. 9, 1981, 17–24.
J. H. Hester, D. S. Hirschberg, S.-H. S. Huang and C. K. Wong,Faster construction of binary split trees, J. Algorithms 7, 1986, 412–424.
D. E. Knuth,Optimal binary search trees, Acta Informatica 1, 1971, 14–25.
D. E. Knuth,The Art of Computer Programming, Vol 3, Addison-Wesley, Reading, Mass., 1973.
S.-H. S. Huang and C. K. Wong,Generalized binary split trees, Acta Informatica 21, 1984, 113–123.
S.-H. S. Huang and V. Viswanathan,On the construction of optimal 2–3trees, Nineteenth Southestern International Conference on Combinatorics, Graph Theory and Computing, Baton Rouge, Louisiana, Feb. 1988.
A. L. Rosenberg and L. Snyder,Minimal-comparison 2–3trees, SIAM J. Comput. 7,(4), 1978, 465–480.
A. L. Rosenberg and L. Snyder,Time- and space-optimality in B-trees, ACM Trans. Database Syst., 6, (1), 1981, 174–193.
F. F. Yao,Efficient dynamic programming using quadrangle inequalities, Proceedings of 12th Annual ACM Symposium on Theory of Computing, 1980, 426–435.
Author information
Authors and Affiliations
Additional information
This research was supported in part by Texas Advanced Research Grant 1080 and NASA Grant NAG 5–739.
Rights and permissions
About this article
Cite this article
Huang, SH.S., Viswanathan, V. On the construction of weighted time-optimal B-trees. BIT 30, 207–215 (1990). https://doi.org/10.1007/BF02017342
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF02017342