, Volume 72, Issue 2, pp 369–378 | Cite as

Worst-Case Optimal Tree Layout in External Memory

  • Erik D. Demaine
  • John Iacono
  • Stefan Langerman


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}$$


Data structures Trees External-memory 



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.


  1. 1.
    Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. Commun. ACM 31(9), 1116–1127 (1988) CrossRefMathSciNetGoogle Scholar
  2. 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. 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) CrossRefzbMATHMathSciNetGoogle Scholar
  4. 4.
    Gil, J., Itai, A.: How to pack trees. J. Algorithms 32(2), 108–132 (1999) CrossRefzbMATHMathSciNetGoogle Scholar
  5. 5.
    Nodine, M.H., Goodrich, M.T., Vitter, J.S.: Blocking for external graph searching. Algorithmica 16(2), 181–214 (1996) CrossRefzbMATHMathSciNetGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Erik D. Demaine
    • 1
  • John Iacono
    • 2
    • 3
  • Stefan Langerman
    • 4
  1. 1.MIT Computer Science and Artificial Intelligence LaboratoryCambridgeUSA
  2. 2.Polytechnic Institute of New York University (Formerly Polytechnic University)BrooklynUSA
  3. 3.MADALGO—Center for Massive Data Algorithmics, a Center of the Danish National Research FoundationAarhus UniversityAarhus NDenmark
  4. 4.Département d’informatique, Université Libre de BruxellesF.R.S.-FNRSBrusselsBelgium

Personalised recommendations