Worst-case efficient external-memory priority queues

  • Gerth Stølting Brodal
  • Jyrki Katajainen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1432)

Abstract

A priority queue Q is a data structure that maintains a collection of elements, each element having an associated priority drawn from a totally ordered universe, under the operations Insert, which inserts an element into Q, and DeleteMin, which deletes an element with the minimum priority from Q. In this paper a priority-queue implementation is given which is efficient with respect to the number of block transfers or I/Os performed between the internal and external memories of a computer. Let B and M denote the respective capacity of a block and the internal memory measured in elements. The developed data structure handles any intermixed sequence of Insert and DeleteMin operations such that in every disjoint interval of B consecutive priorityqueue operations at most clogM/B N/M I/Os are performed, for some positive constant c. These I/Os are divided evenly among the operations: if B ≥ clogM/B N/M, one I/O is necessary for every B/(clogM/B N/M)th operation and if B < clogM/B N/M, c/B log M/B N/M I/Os are performed per every operation. Moreover, every operation requires O(log2 N) comparisons in the worst case. The best earlier solutions can only handle a sequence of S operations with O i=1 S 1/B log M/B Ni/M) I/Os, where N i denotes the number of elements stored in the data structure prior to the ith operation, without giving any guarantee for the performance of the individual operations.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    G. M. Adel'son-Vel'skii and E. M. Landis. An algorithm for the organization of information. Soviet Mathematics, volume 3, pages 1259–1263, 1962.Google Scholar
  2. 2.
    A. Aggarwal and J. S. Vitter. The input/output complexity of sorting and related problems. Communications of the ACM, volume 31, pages 1116–1127, 1988.MathSciNetCrossRefGoogle Scholar
  3. 3.
    A. V. Aho, J. E. Hopcroft, and J. D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley Publishing Company, Reading, 1974.MATHGoogle Scholar
  4. 4.
    T.O. Alanko, H.H. A. Erkiö, and I. J. Haikala. Virtual memory behavior of some sorting algorithms. IEEE Transactions on Software Engineering, volume SE-10, pages 422–431, 1984.CrossRefGoogle Scholar
  5. 5.
    L. Arge. The buffer tree: A new technique for optimal I/O-algorithms. In Proceedings of the 4th Workshop on Algorithms and Data Structures, Lecture Notes in Computer Science 955, Springer, Berlin/Heidelberg, pages 334–345, 1995.Google Scholar
  6. 6.
    L. Arge. Efficient external-memory data structures and applications. BRICS Dissertation DS-96-3, Department of Computer Science, University of Aarhus, århus, 1996.Google Scholar
  7. 7.
    L. Arge, P. Ferragina, R. Grossi, and J. S. Vitter. On sorting strings in external memory. In Proceedings of the 29th Annual ACM Symposium on Theory of Computing, ACM Press, New York, pages 540–548, 1997.Google Scholar
  8. 8.
    R. Bayer and E. M. McCreight. Organization and maintenance of large ordered indexes. Acta Informatica, volume 1, pages 173–189, 1972.CrossRefGoogle Scholar
  9. 9.
    M. R. Brown. Implementation and analysis of binomial queue algorithms. SIAM Journal on Computing, volume 7, pages 298–319, 1978.MATHMathSciNetCrossRefGoogle Scholar
  10. 10.
    S. Carlsson, J.I. Munro, and P.V. Poblete. An implicit binomial queue with constant insertion time. In Proceedings of the 1st Scandinavian Workshop on Algorithm Theory, Lecture Notes in Computer Science 318, Springer-Verlag, Berlin/Heidelberg, pages 1–13, 1988.Google Scholar
  11. 11.
    D. Comer. The ubiquitous B-tree. ACM Computing Surveys, volume 11, pages 121–137, 1979.MATHCrossRefGoogle Scholar
  12. 12.
    C. A. Crane. Linear lists and priority queues as balanced trees. Technical Report STAN-CS-72-259, Computer Science Department, Stanford University, Stanford, 1972.Google Scholar
  13. 13.
    R. Fadel, K.V. Jakobsen, J. Katajainen, and J. Teuhola. Heaps and heapsort on secondary storage. To appear in Theoretical Computer Science.Google Scholar
  14. 14.
    M. J. Fischer and M. S. Paterson. Fishspear: A priority queue algorithm. Journal of the ACM, volume 41, pages 3–30, 1994.CrossRefMATHGoogle Scholar
  15. 15.
    G. A. Gibson, J. S. Vitter, J. Wilkes et al. Strategic directions in storage I/O issues in large-scale computing. ACM Computing Surveys, volume 28, pages 779–793, 1996.CrossRefGoogle Scholar
  16. 16.
    L. J. Guibas and R. Sedgewick. A dichromatic framework for balanced trees. In Proceedings of the 19th Annual Symposium on Foundations of Computer Science, IEEE, New York, pages 8–21, 1978.Google Scholar
  17. 17.
    K. Harty and D.R. Cheriton. Application-controlled physical memory using external page-cache management. In Proceedings of the 5th International Conference on Architectural Support for Programming Languages and Operating Systems, ACM SIGPLAN Notices, volume 27, number 9, pages 187–197, 1992.CrossRefGoogle Scholar
  18. 18.
    J. JáJá. An Introduction to Parallel Algorithms. Addison-Wesley Publishing Company, Reading, 1992.MATHGoogle Scholar
  19. 19.
    B.H.H. Juurlink and H. A. G. Wijshoff. The parallel hierarchical memory model. In Proceedings of the 4th Scandinavian Workshop on Algorithm Theory, Lecture Notes in Computer Science 824, Springer-Verlag, Berlin/Heidelberg, pages 240–251, 1994.Google Scholar
  20. 20.
    D. E. Knuth. The Art of Computer Programming, volume 3/ Sorting and Searching. Addison-Wesley Publishing Company, Reading, 1973.Google Scholar
  21. 21.
    K. Krueger, D. Loftesness, A. Vahdat, and T. Anderson. Tools for the development of application-specific virtual memory management. In Proceedings of the 8th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, ACM SIGPLAN Notices, volume 28, number 10, pages 48–64, 1993.CrossRefGoogle Scholar
  22. 22.
    A. LaMarca and R. E. Ladner. The influence of caches on the performance of heaps. The ACM Journal of Experimental Algorithmics, volume 1, article 4, 1996.Google Scholar
  23. 23.
    D. McNamee and K. Amstrong. Extending the Mach external pager interface to accommodate user-level block replacement policies. Technical Report 90-09-05, Department of Computer Science and Engineering, University of Washington, Seattle, 1990.Google Scholar
  24. 24.
    D. Naor, C. U. Martel, and N. S. Matloff. Performance of priority queue structures in a virtual memory environment. The Computer Journal, volume 34, pages 428–437, 1991.CrossRefGoogle Scholar
  25. 25.
    M. H. Nodine and J. S. Vitter. Large-scale sorting in parallel memories. In Proceedings of the 3rd ACM Symposium on Parallel Algorithms and Architectures, ACM Press, New York, pages 29–39, 1991.Google Scholar
  26. 26.
    Y. N. Patt. Guest editor's introduction: The I/O subsystem — A candidate for improvement. IEEE Computer, volume 27, number 3, pages 15–16, 1994.Google Scholar
  27. 27.
    D. A. Patterson and J. L. Hennessy. Computer Organization & Design: The Hardware/Software Interface. Morgan Kaufmann Publishers, San Francisco, 1994.MATHGoogle Scholar
  28. 28.
    R. Sedgewick. Algorithms. Addison-Wesley Publishing Company, Reading, 1983.MATHGoogle Scholar
  29. 29.
    M. Thorup. On RAM priority queues. In Proceedings of the 7th Annual ACM-SIAM Symposium on Discrete Algorithms, ACM, New York and SIAM, Philadelphia, pages 59–67, 1996.Google Scholar
  30. 30.
    J. S. Vitter and E. A. M. Shriver. Algorithms for parallel memory I: Two-level memories. Algorithmica, volume 12, pages 110–147, 1994.MathSciNetCrossRefMATHGoogle Scholar
  31. 31.
    J. Vuillemin. A data structure for manipulating priority queues. Communications of the ACM, volume 21, pages 309–315, 1978.MATHMathSciNetCrossRefGoogle Scholar
  32. 32.
    L. M. Wegner and J. I. Teuhola. The external heapsort. IEEE Transactions on Software Engineering, volume 15, pages 917–925, 1989.CrossRefGoogle Scholar
  33. 33.
    J. W. J. Williams. Algorithm 232, Heapsort. Communications of the ACM, volume 7, pages 347–348, 1964.Google Scholar

Copyright information

© Springer-Verlag 1998

Authors and Affiliations

  • Gerth Stølting Brodal
    • 1
  • Jyrki Katajainen
    • 2
  1. 1.Im StadtwaldMax-Planck-Institut für InformatikSaarbrückenGermany
  2. 2.Datalogisk InstitutKøbenhavns UniversitetKøbenhavn øDenmark

Personalised recommendations