Skip to main content

On the Performance of WEAK-HEAPSORT

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1770))

Abstract

Dutton (1993) presents a further HEAPSORT variant called WEAK-HEAPSORT, which also contains a new data structure for priority queues. The sorting algorithm and the underlying data structure are analyzed showing that WEAK-HEAPSORT is the best HEAPSORT variant and that it has a lot of nice properties.

It is shown that the worst case number of comparisons is n⌈log n⌉ — 2⌈log n + n − ⌈log n⌉ ≤ n log n + 0.1n and weak heaps can be generated with n − 1 comparisons. A double-ended priority queue based on weakheaps can be generated in n + ⌈n/2⌉ − 2 comparisons.

Moreover, examples for the worst and the best case of WEAK-HEAP-SORT are presented, the number of Weak-Heaps on 1, ... , n is determined, and experiments on the average case are reported.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R. D. Dutton. The weak-heap data structure. Technical report, University of Central Florida, Orlando, FL 32816, 1992.

    Google Scholar 

  2. R. D. Dutton. Weak-heap sort. BIT, 33:372–381, 1993.

    Article  MathSciNet  Google Scholar 

  3. S. Edelkamp and I. Wegener. On the performance of WEAK-HEAPSORT. Technical Report TR99-028, Electronic Colloquium on Computational Complexity, 1999. ISSN 1433-8092, 6th Year.

    Google Scholar 

  4. R. Fleischer. A tight lower bound for the worst case of Bottom-Up-Heapsort. Algorithmica, 11(2):104–115, 1994.

    Article  MathSciNet  Google Scholar 

  5. R. W. Floyd. ACM algorithm 245: Treesort 3. Communications of the ACM, 7(12):701, 1964.

    Article  Google Scholar 

  6. T. N. Hibbard. A empirical study of minimal storage sorting. Communications of the ACM, 6(5):206–213, 1963.

    Article  MATH  Google Scholar 

  7. C. A. R. Hoare. Quicksort. Computer Journal, 5(1):10–15, 1962.

    Article  MATH  MathSciNet  Google Scholar 

  8. J. Incerpi and R. Sedgewick. Improved upper bounds on shellsort. Journal of Computer and System Sciences, 31:210–224, 1985.

    Article  MATH  MathSciNet  Google Scholar 

  9. T. Jiang, M. Li, and P. Vitányi. Average complexity of shellsort. In ICALP’99, volume 1644 of LNCS, pages 453–462, 1999.

    Google Scholar 

  10. J. Katajainen. The ultimate heapsort. In Proceedings of the Computing: the 4th Australasian Theory Symposium, Australian Computer Science Communications 20(3), pages 87–95, 1998.

    MathSciNet  Google Scholar 

  11. J. Katajainen, T. Pasanen, and J. Teuhola. Practical in-place mergesort. Nordic Journal of Computing, 3(1):27–40, 1996.

    MathSciNet  Google Scholar 

  12. J. Katajainen and T. A. Pasanen. In-place sorting with fewer moves. Information Processing Letters, 70(1):31–37, 1999.

    Article  MATH  MathSciNet  Google Scholar 

  13. M. Li and P. Vitányi. An Introduction to Kolmogorov Complexity and Its Applications. Text and Monographs in Computer Science. Springer-Verlag, 1993.

    Google Scholar 

  14. C. J. H. McDiarmid and B. A. Reed. Building heaps fast. Journal of Algorithms, 10:352–365, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  15. S. Nilsson. Radix Sorting & Searching. PhD thesis, Lund University, 1996.

    Google Scholar 

  16. A. Papernov and G. Stasevich. The worst case in shellsort and related algorithms. Problems Inform. Transmission, 1(3):63–75, 1965.

    Google Scholar 

  17. V. Pratt. Shellsort and Sorting Networks. PhD thesis, Stanford University, 1979.

    Google Scholar 

  18. K. Reinhardt. Sorting in-place with a worst case complexity of n log n — 1.3n + O(log n) comparisons and εn log n+ O(1) transports. Lecture Notes in Computer Science, 650:489–499, 1992.

    Google Scholar 

  19. W. Rudin. Real and Complex Analysis. McGraw-Hill, 1974.

    Google Scholar 

  20. R. Schaffer and R. Sedgewick. The analysis of heapsort. Journal of Algorithms, 15(1):76–100, 1993.

    Article  MATH  MathSciNet  Google Scholar 

  21. R. Sedgewick. The analysis of quicksort programs. Acta Inform., 7:327–355, 1977.

    Article  MATH  MathSciNet  Google Scholar 

  22. R. Sedgewick. A new upper bound for shellsort. Journal of Algorithms, 2:159–173, 1986.

    Article  MathSciNet  Google Scholar 

  23. D. Shell. A high-speed sorting procedure. Communications of the ACM, 2(7):30–32, 1959.

    Article  Google Scholar 

  24. H. Steinhaus. One hundred problems in elemantary mathematics (Problems 52,85). Pergamon Press, London, 1958.

    Google Scholar 

  25. M. H. van Emden. Increasing the efficiency of QUICKSORT. Communications of the ACM, 13:563–567, 1970.

    Article  MATH  Google Scholar 

  26. I. Wegener. The worst case complexity of McDiarmid and Reed’s variant of BOTTOM-UP HEAPSORT is less than n log n+1.1n. Information and Computation, 97(1):86–96, 1992.

    Article  MATH  MathSciNet  Google Scholar 

  27. I. Wegener. BOTTOM-UP-HEAPSORT, a new variant of HEAPSORT, beating, on an average, QUICKSORT (if n is not very small). Theoretical Computer Science, 118:81–98, 1993.

    Article  MATH  MathSciNet  Google Scholar 

  28. J. W. J. Williams. ACM algorithm 232: Heapsort. Communications of the ACM, 7(6):347–348, 1964.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Edelkamp, S., Wegener, I. (2000). On the Performance of WEAK-HEAPSORT . In: Reichel, H., Tison, S. (eds) STACS 2000. STACS 2000. Lecture Notes in Computer Science, vol 1770. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46541-3_21

Download citation

  • DOI: https://doi.org/10.1007/3-540-46541-3_21

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-67141-1

  • Online ISBN: 978-3-540-46541-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics