next up previous contents
Next: Bellman-Ford-Algorithmus Up: Das single-source-shortest-path-Problem Previous: Dijkstra's Algorithmus

Dikstra's Algorithmus mit Radix-Heaps


\begin{picture}
(90,70)
 \put(0,0){\makebox(10,5){e}}
 \put(0,5){\makebox(10,5){...
 ...cle*{1}}
 \put(60,55){\circle*{1}}
 \put(47.5,55){\vector(1,0){10}}\end{picture}

Einstufige Radix-Heaps:

Menge von $B=\left\lceil \log_2(C+1)\right\rceil + 2$ Buckets (jeder Bucket als doppelt verkettete Liste implementiert). Jeder Bucket hat Größe size, mit

\begin{displaymath}
\text{size}(i) = \left\{ 
\begin{array}
{ll}
 1 & \text{f\um...
 ...2,\ldots,B-1\\  nC+1 & \text{f\uml {u}r } i=B\end{array}\right.\end{displaymath}

Beobachtung:

\begin{displaymath}
\sum_{i=1}^{j-1} \text{size}(i) \geq \min\{\text{size}(j),C+1\} \text{
 f\uml {u}r } j=2,\ldots,B
 \end{displaymath}

Wir ordnen den Buckets Intervalle zu, indem wir für jeden Bucket i eine obere Intervallgrenze u(i) angeben. Das Intervall für Bucket i ist dann [u(i-1)+1,u(i)]. Setze zu Beginn u(0):=-1. Die u(i) ändern sich im Algorithmus, die $\text{size}(i)$ bleiben konstant. Zu Beginn:

\begin{displaymath}
\begin{array}
{ll}
 \text{u}(i) & := 2^{i-1}-1 \text{ f\uml ...
 ...ntervalls:}\\ u(i)-u(i-1) \leq \text{size}(i)\end{array}\right.\end{displaymath}

Gesamtkosten für Dijkstra's Algorithmus mit einstufigen Radix-Heaps damit:

\begin{displaymath}
\mathcal{O}(m+m+n \log C+n \log C+n \log C)=\mathcal{O}(m+n \log C)\end{displaymath}

\fbox {\parbox[c]{12.45cm}{\textbf{Satz:}
Dijkstra's Algorithmus mit einfstufigen Radix-Heaps hat
 Zeitkomplexit\uml {a}t $\mathcal{O}(m+n \log C)$.
}}


Verbesserungen:
1.
zweistufige Heaps: \fbox {$\mathcal{O}(m+n \cdot \frac{\log C}{\log \log C})$}
2.
mehrstufige Heaps (+Fibonacci-Heaps): \fbox {$\mathcal{O}(m+n \sqrt{\log C})$}
Literatur: Akuja, Mehlhorn, Orlin, Tarjan; Faster Algorithms for the Shortest Path Problem. J ACM 37(1990), S. 213-223).
next up previous contents
Next: Bellman-Ford-Algorithmus Up: Das single-source-shortest-path-Problem Previous: Dijkstra's Algorithmus
Abbas-Bardia Kabiri-Jarghouyeh
3/3/1999