Skip to main content
Log in

Optimal multiway search trees for variable size keys

  • Published:
Acta Informatica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bayer, R., McCreight, E.: Organization and maintenance of large ordered indexes. Acta Informat. 1, 173–189 (1971)

    Google Scholar 

  2. Garey, M.R.: Optimal binary search trees with restricted maximal depth. SIAM J. Comput. 2, 101–110 (1974)

    Google Scholar 

  3. Gilbert, E.N., Moore, E.F.: Variable-length binary encodings. Bell System Tech. J. 38, 933–968 (1959)

    Google Scholar 

  4. Gotlieb, L.: Optimal multiway search trees. SIAM J. Comput. 10, 422–433 (1981)

    Google Scholar 

  5. Gotlieb, L., Wood, D.: The construction of optimal multiway search trees and the monotonicity principles. Internat. J. Comput. Math. Sc. A9, 17–24 (1981)

    Google Scholar 

  6. Huddleston, S., Mehlhorn, K.: A new data structure for representing sorted lists: Acta Informat. 17, 157–184 (1982)

    Google Scholar 

  7. Itai, A.: Optimal alphabetic trees. SIAM J. Comput. 5, 9–18 (1976)

    Google Scholar 

  8. Karp, R.M.: Reducibility among combinatorial problems. In: Complexity of Computer Computations. Miller, R.E., Thatcher, J.W. (eds.) New York: Plenum Press 1972

    Google Scholar 

  9. Knuth, D.E.: Optimum binary search trees. Acta Informat. 1, 14–25 (1971)

    Google Scholar 

  10. Knuth, D.E.: The Art of Computer Programming, Vol. 3: Sorting and searching. Reading (Mass.): Addison-Wesley 1973

    Google Scholar 

  11. McCreight, E.M.: Pagination of B*-trees with variable length records. Comm. ACM 20, 670–674 (1977)

    Google Scholar 

  12. Vaishnavi, V.K., Kriegel, H.P., Wood, D.: Optimum multiway search trees. Acta Informat. 14, 119–133 (1980)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00289139

Keywords

Navigation