algorithm engineering schnelles sortieren n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Algorithm Engineering „Schnelles Sortieren“ PowerPoint Presentation
Download Presentation
Algorithm Engineering „Schnelles Sortieren“

Loading in 2 Seconds...

play fullscreen
1 / 55

Algorithm Engineering „Schnelles Sortieren“ - PowerPoint PPT Presentation


  • 144 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Algorithm Engineering „Schnelles Sortieren“' - gali


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
berblick
Überblick
  • Kriterien für Sortierverfahren
  • State-of-the-Art
  • Clever-Quicksort
  • Heapsort
  • Weak-Heapsort
  • Quick-Heapsort
  • Radix-Exchange-Sort
  • Sortieren durch Fachverteilung
slide9
ImplementierungSieheSedgewick: The analysis of quicksortprograms, ActaInformatica, Journal of Algorithms,15(1):76-100, 1993
adaptives sortieren
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)
kartesischer baum
Kartesischer Baum
  • Der kartesische Baum TF

von F[1..n] ist ein geordneter „gewurzelter“ Baum mit n Knoten.

  • Der kartesische Baum des leeren Feldes ist der leere Baum. Sei k = min (1,n).
  • Die Wurzel von TF ist markiert mit k, die Kinder sind die kartesischen Bäume von
  • F[1..k −1] und F[k+1..n] (wobei F[i..j] das leere Feld ist, falls j < i).
konstruktion a la wikipedia
Konstruktion (a la wikipedia)

Process the sequence values in left-to-right order, maintaining the Cartesian tree of the nodes processed so far, in a structure that allows both upwards and downwards traversal of the tree.

To process each new value x, start at the node representing the value prior to x in the sequence and follow the path from this node to the root of the tree until finding a value y smaller than x. This node y is the parent of x, and the previous right child of y becomes the new left child of x.

The total time for this procedure is linear, because the time spent searching for the parent y of each new node x can be charged against the number of nodes that are removed from the rightmost path in the tree

levcopoulos petersson algorithmus
Levcopoulos–PeterssonAlgorithmus
  • KonstruiereKarteschenBaumsfür die Eingabe
  • Initialisiere PQ mitderWurzel des kartesischenBaumes
  • Solange PQ nicht leer:
    • Finde und lösche den min. Wert x in PQ (DeleteMin)
    • Gebexaus
    • Füge die Kinder von x imkartesischen Baum zu PQ hinzu (Insert)