Summary
This paper considers the construction of optimal search trees for a sequence of n keys of varying sizes, under various cost measures. Constructing optimal search cost multiway trees is NP-hard, although it can be done in pseudo-polynomial time O 3 and space O 2, where L is the page size limit. An optimal space multiway search tree is obtained in O 3 time and O 2 space, while an optimal height tree in O(n 2 log2 n) time and O(n) space both having additionally minimal root sizes. The monotonicity principle does not hold for the above cases. Finding optimal search cost weak B-trees is NP-hard, but a weak B-tree of height 2 and minimal root size can be constructed in O(n log n) time. In addition, if its root is restricted to contain M keys then a different algorithm is applied, having time complexity O(nM log n). The latter solves a problem posed by McCreight.
Similar content being viewed by others
References
Bayer, R., McCreight, E.: Organization and maintenance of large ordered indexes. Acta Informat. 1, 173–189 (1971)
Garey, M.R.: Optimal binary search trees with restricted maximal depth. SIAM J. Comput. 2, 101–110 (1974)
Gilbert, E.N., Moore, E.F.: Variable-length binary encodings. Bell System Tech. J. 38, 933–968 (1959)
Gotlieb, L.: Optimal multiway search trees. SIAM J. Comput. 10, 422–433 (1981)
Gotlieb, L., Wood, D.: The construction of optimal multiway search trees and the monotonicity principles. Internat. J. Comput. Math. Sc. A9, 17–24 (1981)
Huddleston, S., Mehlhorn, K.: A new data structure for representing sorted lists: Acta Informat. 17, 157–184 (1982)
Itai, A.: Optimal alphabetic trees. SIAM J. Comput. 5, 9–18 (1976)
Karp, R.M.: Reducibility among combinatorial problems. In: Complexity of Computer Computations. Miller, R.E., Thatcher, J.W. (eds.) New York: Plenum Press 1972
Knuth, D.E.: Optimum binary search trees. Acta Informat. 1, 14–25 (1971)
Knuth, D.E.: The Art of Computer Programming, Vol. 3: Sorting and searching. Reading (Mass.): Addison-Wesley 1973
McCreight, E.M.: Pagination of B*-trees with variable length records. Comm. ACM 20, 670–674 (1977)
Vaishnavi, V.K., Kriegel, H.P., Wood, D.: Optimum multiway search trees. Acta Informat. 14, 119–133 (1980)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Luiz Szwarcfiter, J. Optimal multiway search trees for variable size keys. Acta Informatica 21, 47–60 (1984). https://doi.org/10.1007/BF00289139
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00289139