1 / 55

Algorithm Engineering „Schnelles Sortieren“

Algorithm Engineering „Schnelles Sortieren“. Stefan Edelkamp. Überblick. Kriterien für Sortierverfahren State- of - the -Art Clever- Quicksort Heapsort Weak-Heapsort Quick- Heapsort Radix-Exchange- Sort Sortieren durch Fachverteilung. Kriterien für Sortierverfahren.

gali
Download Presentation

Algorithm Engineering „Schnelles Sortieren“

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algorithm Engineering „Schnelles Sortieren“ Stefan Edelkamp

  2. Überblick • Kriterien für Sortierverfahren • State-of-the-Art • Clever-Quicksort • Heapsort • Weak-Heapsort • Quick-Heapsort • Radix-Exchange-Sort • Sortieren durch Fachverteilung

  3. Kriterien für Sortierverfahren

  4. State-of-the-Art

  5. State-of-the-Art (2)

  6. State-of-the-Art (3)

  7. Clever-Quicksort (Median-of-3)

  8. Clever-Quicksort (Median-of-3) Σ

  9. ImplementierungSieheSedgewick: The analysis of quicksortprograms, ActaInformatica, Journal of Algorithms,15(1):76-100, 1993

  10. Heapsort

  11. Definition

  12. Veranschaulichung

  13. Entfernen des Maximums

  14. Versickern

  15. Pseudo-Code

  16. Erstellung eines Heaps

  17. Äußere Schleife

  18. Analyse Iteriertes Versickern Σ

  19. Analyse

  20. Beobachtung

  21. Bottom-Up-Heapsort

  22. Pseudo-Code (1)

  23. Pseudo-Code (2)

  24. Worst-Case

  25. Average Case

  26. Weak-Heap-Sort

  27. Verschmelzen

  28. Generiereneines Weak-Heaps

  29. Sortierung

  30. Arrayeinbettung

  31. 3 Fälle

  32. PseudoCode

  33. Analyse Σ

  34. Engineering

  35. Quick-Heapsort

  36. Quick-Heapsort Σ Σ

  37. Pseudo-Code

  38. Pseudo-Code (2)

  39. Pseudo-Code (3)

  40. Radix-Sort

  41. Radix-Exchange-Sort

  42. Beispiel

  43. UnterscheidenePräfixe

  44. Analyse

  45. Sortieren durch Fachverteilen

  46. Analyse

  47. Illustration

  48. Pseudo-Code (1)

  49. Pseudo-Code (2)

  50. Adaptives Sortieren Inversionen Inv(X) = {(i,j) | • 1 <= i < j <= n und • xi > xj} Ziel AE: 1*n log (Inv(X)/n)+O(n) Wenn Inv(X) = O(n²)  n log n + O(n) Inversions-optimal := Laufzeit • O(n log (Inv(X)/n)+n) Informationstheoretische Grenze: • Ω(n log (Inv(X)/n)+n)

More Related