Skip to main content
Log in

Worst-Case Optimal Tree Layout in External Memory

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Consider laying out a fixed-topology binary tree of N nodes into external memory with block size B so as to minimize the worst-case number of block memory transfers required to traverse a path from the root to a node of depth D. We prove that the optimal number of memory transfers is

$$\begin{aligned} \begin{cases} \varTheta( {D \over\lg(1{+}B)} ) & \mathrm{when}~D = O(\lg N), \\ \varTheta( {\lg N \over\lg(1{+}{B \lg N \over D} )} ) & \mathrm{when}~D = \varOmega(\lg N)~\mathrm{and}~D = O(B \lg N), \\ \varTheta( {D \over B} ) & \mathrm{when}~D = \varOmega(B \lg N). \end{cases} \end{aligned}$$

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.

Fig. 1

Similar content being viewed by others

References

  1. Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. Commun. ACM 31(9), 1116–1127 (1988)

    Article  MathSciNet  Google Scholar 

  2. Clark, D.R., Munro, J.I.: Efficient suffix trees on secondary storage. In: Proceedings of the 7th Annual ACM-SIAM Symposium on Discrete Algorithms, Atlanta, pp. 383–391 (1996)

    Google Scholar 

  3. Ferragina, P., Grossi, R.: The string b-tree: a new data structure for string search in external memory and its applications. J. ACM 46(2), 236–280 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  4. Gil, J., Itai, A.: How to pack trees. J. Algorithms 32(2), 108–132 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  5. Nodine, M.H., Goodrich, M.T., Vitter, J.S.: Blocking for external graph searching. Algorithmica 16(2), 181–214 (1996)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Acknowledgements

This research was initiated during the Seminar on Cache-Oblivious and Cache-Aware Algorithms held at Schloss Dagstuhl in July 2004. We thank Jeff Erickson and J. Ian Munro for many helpful discussions during that seminar. We also thank Paulo Ferragina for early discussions on this problem.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to John Iacono.

Additional information

Work of E.D.D. is supported in part by NSF grants CCF-0430849, OISE-0334653 and MADALGO—Center for Massive Data Algorithmics, a Center of the Danish National Research Foundation.

Research of J.I. is partially supported by NSF grants CCF-0430849, OISE-0334653, CCF-1018370, and an Alfred P. Sloan fellowship.

S.L. is Directeur de recherches du F.R.S.-FNRS.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Demaine, E.D., Iacono, J. & Langerman, S. Worst-Case Optimal Tree Layout in External Memory. Algorithmica 72, 369–378 (2015). https://doi.org/10.1007/s00453-013-9856-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-013-9856-2

Keywords

Navigation