An Empirical Study for Inversions-Sensitive Sorting Algorithms

  • Amr Elmasry
  • Abdelrahman Hammad
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3503)

Abstract

We study the performance of the most practical internal adaptive sorting algorithms. Experimental results show that adaptive AVL sort performs the least number of comparisons unless the number of inversions is fewer than 1%. In such case, Splaysort performs the fewest number of comparisons. On the other hand, the running time of Quicksort is superior unless the number of inversions is fewer than 1.5%. In such case, Splaysort consumes the smallest running time.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Brodal, G., Fagerberg, R., Moruz, G.: On the adaptiveness of quicksort. In: 7th (ALENEX) Workshop on Algorithm Engineering and Experiments (2005)Google Scholar
  2. 2.
    Cole, R.: On the dynamic finger conjecture for splay trees. Part II: The proof. SIAM J. Computing 30, 44–85 (2000)MATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Cook, R., Kim, J.: Best sorting algorithms for nearly sorted lists. Commun. ACM 23, 620–624 (1980)CrossRefGoogle Scholar
  4. 4.
    Elmasry, A.: Adaptive sorting with AVL trees. In: 3rd IFIP-WCC International Conference on Theoretical Computer Science, pp. 315–324 (2004)Google Scholar
  5. 5.
    Estivill-Castro, V., Wood, D.: A survey of adaptive sorting algorithms. ACM Computing Surveys 24(4), 441–476 (1992)CrossRefGoogle Scholar
  6. 6.
    Guibas, L., McCreight, E., Plass, M., Roberts, J.: A new representation of linear lists. 9th ACM (STOC) Symposium on Theory of Computing 9, 49–60 (1977)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Hoare, C.: Algorithm 64: Quicksort. Commun. ACM 4(7), 321 (1961)CrossRefGoogle Scholar
  8. 8.
    Levcopoulos, C., Petersson, O.: Splitsort - An adaptive sorting algorithm. Information Processing Letters 39, 205–211 (1991)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Levcopoulos, C., Petersson, O.: Adaptive Heapsort. J. Alg. 14, 395–413 (1993)MATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Moffat, A., Eddy, G., Petersson, O.: Splaysort: fast, versatile, practical. Softw. Pract. and Exper. 126(7), 781–797 (1996)CrossRefGoogle Scholar
  11. 11.
    Sleator, D., Tarjan, R.: Self-adjusting binary search trees. J. ACM 32(3), 652–686 (1985)MATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Vuillemin, J.: A unifying look at data structures. Commu. ACM 23, 229–239 (1980)MATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Wainwrigh, R.: A class of sorting algorithms based on quicksort. Commun. ACM 28(4), 396–402 (1985)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Amr Elmasry
    • 1
    • 2
  • Abdelrahman Hammad
    • 1
  1. 1.Dept of Computer Engineering and SystemsAlexandria UniversityEgypt
  2. 2.Faculty of Science and Information TechnologyAl-Zaytoonah UniversityJordan

Personalised recommendations