Advertisement

Cache-Aware and Cache-Oblivious Adaptive Sorting

  • Gerth Stølting Brodal
  • Rolf Fagerberg
  • Gabriel Moruz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3580)

Abstract

Two new adaptive sorting algorithms are introduced which perform an optimal number of comparisons with respect to the number of inversions in the input. The first algorithm is based on a new linear time reduction to (non-adaptive) sorting. The second algorithm is based on a new division protocol for the GenericSort algorithm by Estivill-Castro and Wood. From both algorithms we derive I/O-optimal cache-aware and cache-oblivious adaptive sorting algorithms. These are the first I/O-optimal adaptive sorting algorithms.

Keywords

Input Sequence Sorting Algorithm Recursion Tree Fast Memory Oblivious Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. Communications of the ACM 31(9), 1116–1127 (1988)CrossRefMathSciNetGoogle Scholar
  2. 2.
    Arge, L.: External memory data structures. In: Abello, J., Pardalos, P.M., Resende, M.G.C. (eds.) Handbook of Massive Data SetsGoogle Scholar
  3. 3.
    Arge, L., Brodal, G.S., Fagerberg, R.: Cache-oblivious data structures. In: Mehta, D., Sahni, S. (eds.) Handbook of Data Structures and Applications, p. 27. CRC Press, Boca Raton (2004)Google Scholar
  4. 4.
    Arge, L., Knudsen, M., Larsen, K.: A general lower bound on the I/O-complexity of comparison-based algorithms. In: Proc. of Workshop on Algorithms and Data Structures (1993)Google Scholar
  5. 5.
    Blum, M., Floyd, R.W., Pratt, V., Rivest, R.L., Tarjan, R.E.: Time bounds for selection. J. Comput. Syst. Sci. 7, 448–461 (1973)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Brodal, G.S.: Cache-oblivious algorithms and data structures. In: Hagerup, T., Katajainen, J. (eds.) SWAT 2004. LNCS, vol. 3111, pp. 3–13. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Brodal, G.S., Fagerberg, R.: Cache oblivious distribution sweeping. In: Proc. 29th International Colloquium on Automata, Languages, and Programming, pp. 426–438. Springer, Berlin (2002)CrossRefGoogle Scholar
  8. 8.
    Brodal, G.S., Fagerberg, R.: On the limits of cache-obliviousness. In: Proc. 35th Annual ACM Symposium on Theory of Computing, pp. 307–315 (2003)Google Scholar
  9. 9.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)zbMATHGoogle Scholar
  10. 10.
    Demaine, E.: Cache-oblivious algorithms and data structures. Lecture Notes from the EEF Summer School on Massive Data Sets (2002)Google Scholar
  11. 11.
    Estivill-Castro, V., Wood, D.: A new measure of presortedness. Information and Computation 83(1), 111–119 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Estivill-Castro, V., Wood, D.: Practical adaptive sorting. In: Dehne, F., Fiala, F., Koczkodaj, W.W. (eds.) ICCI 1991. LNCS, vol. 497, pp. 47–54. Springer, Heidelberg (1991)Google Scholar
  13. 13.
    Estivill-Castro, V., Wood, D.: A survey of adaptive sorting algorithms. ACM Computing Surverys 24(4), 441–475 (1992)CrossRefGoogle Scholar
  14. 14.
    Frigo, M., Leiserson, C.E., Prokop, H., Ramachandran, S.: Cache oblivious algorithms. In: 40th Ann. IEEE Symp. on Foundations of Computer Science, pp. 285–298 (1999)Google Scholar
  15. 15.
    Guibas, L.J., McCreight, E.M., Plass, M.F., Roberts, J.R.: A new representation of linear lists. In: Proc. 9th Ann. ACM Symp. on Theory of Computing, pp. 49–60 (1977)Google Scholar
  16. 16.
    Knuth, D.E.: The Art of Computer Programming. Vol 3, Sorting and searching. Addison-Wesley, Reading (1973)Google Scholar
  17. 17.
    Levcopoulos, C., Petersson, O.: Splitsort – an adaptive sorting algorithm. Information Processing Letters 39(1), 205–211 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  18. 18.
    Manilla, H.: Measures of presortedness and optimal sorting algorithms. IEEE Trans. Comput. 34, 318–325 (1985)CrossRefMathSciNetGoogle Scholar
  19. 19.
    Mehlhorn, K.: Data structures and algorithms. In: Sorting and searching, vol. 1. Springer, Heidelberg (1984)Google Scholar
  20. 20.
    Pagh, A., Pagh, R., Thorup, M.: On adaptive integer sorting. In: Albers, S., Radzik, T. (eds.) ESA 2004. LNCS, vol. 3221, pp. 556–567. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  21. 21.
    Vitter, J.S.: External memory algorithms and data structures: Dealing with massive data. ACM Computing Surveys 33(2), 209–271 (2001)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Gerth Stølting Brodal
    • 1
  • Rolf Fagerberg
    • 2
  • Gabriel Moruz
    • 1
  1. 1.BRICS, Department of Computer ScienceUniversity of AarhusÅrhus NDenmark
  2. 2.Department of Mathematics and Computer ScienceUniversity of Southern DenmarkOdense MDenmark

Personalised recommendations