<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Min-Plus-Matrixmultiplikations-Algorithmus</id>
	<title>Min-Plus-Matrixmultiplikations-Algorithmus - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Min-Plus-Matrixmultiplikations-Algorithmus"/>
	<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Min-Plus-Matrixmultiplikations-Algorithmus&amp;action=history"/>
	<updated>2026-05-26T01:28:02Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Wikipedia (Deutsch) – Lokale Kopie</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki-de.moshellshocker.dns64.de/index.php?title=Min-Plus-Matrixmultiplikations-Algorithmus&amp;diff=719979&amp;oldid=prev</id>
		<title>imported&gt;Wdvorak: /* Matrizenoperation ⊕ */</title>
		<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Min-Plus-Matrixmultiplikations-Algorithmus&amp;diff=719979&amp;oldid=prev"/>
		<updated>2017-01-20T12:02:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Matrizenoperation ⊕&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Der &amp;#039;&amp;#039;&amp;#039;Min-Plus-Matrixmultiplikations-Algorithmus&amp;#039;&amp;#039;&amp;#039; ist ein [[Algorithmus]] der [[Graphentheorie]], der die [[Kürzester Pfad|kürzesten Pfade]] eines [[Graph (Graphentheorie)|Graphen]] berechnet. Er läuft mit einer speziellen [[Matrizenmultiplikation]] und hat zudem den Vorteil, dass bei jedem Berechnungsschritt automatisch alle Informationen über erreichbare Wege innerhalb der bisher angegebenen Anzahl der Berechnungsschritte verfügbar sind. Er ist allerdings sehr rechenintensiv und daher langsam.&lt;br /&gt;
&lt;br /&gt;
== Definitionen ==&lt;br /&gt;
Gegeben seien ein gerichteter Graph &amp;lt;math&amp;gt;G = (V,E)&amp;lt;/math&amp;gt; und eine Matrix mit Gewichten &amp;lt;math&amp;gt;c_{i,j}&amp;lt;/math&amp;gt;, wobei die Indizes &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; über die Menge &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; laufen.&lt;br /&gt;
&lt;br /&gt;
=== Bewertungsmatrix ===&lt;br /&gt;
Die &amp;#039;&amp;#039;Kostenmatrix&amp;#039;&amp;#039; oder &amp;#039;&amp;#039;Bewertungsmatrix&amp;#039;&amp;#039; &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; ist dann wie folgt definiert:&lt;br /&gt;
:&amp;lt;math&amp;gt;k_{i,j}=\begin{cases} 0~\mathrm{falls}~i=j \\ c_{i,j}~\mathrm{falls}~ (i,j) \in E \\ \infty~\mathrm{sonst}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Entfernungsmatrix ===&lt;br /&gt;
Die &amp;#039;&amp;#039;Entfernungsmatrix&amp;#039;&amp;#039; &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; ist wie folgt definiert &lt;br /&gt;
:&amp;lt;math&amp;gt;d_{i,j}=\begin{cases} 0,~\mathrm{falls}~i=j \\ &lt;br /&gt;
\mathrm{L\ddot ange~des~k\ddot urzesten~Weges~von~} i \mathrm{~nach~} j\\ &lt;br /&gt;
\infty,~\mathrm{falls~es~keinen~Weg~gibt}~\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrizenoperation ⊕ ===&lt;br /&gt;
&amp;lt;math&amp;gt;F,G&amp;lt;/math&amp;gt; seien zwei &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt;-Matrizen. &lt;br /&gt;
Die Matrix &amp;lt;math&amp;gt;H = F \oplus G&amp;lt;/math&amp;gt; berechnet sich wie folgt:&lt;br /&gt;
:&amp;lt;math&amp;gt;h_{i,j} = \min \{ f_{i,l}+g_{l,j} \mid l \in \{ 1,\dots,n \}\}&amp;lt;/math&amp;gt;&lt;br /&gt;
wobei gelten soll &amp;lt;math&amp;gt;a + \infty = \infty + a = \infty&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\oplus&amp;lt;/math&amp;gt; ist also die Multiplikation von Matrizen über einem [[Halbring (Algebraische Struktur)|Halbring]] mit &amp;lt;math&amp;gt;(0,1,+,\cdot) := (\infty, 0, \operatorname{min}, +)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Statt &amp;lt;math&amp;gt;K \oplus K&amp;lt;/math&amp;gt; schreiben wir kurz &amp;lt;math&amp;gt;K^{[2]}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;K^{[i+1]}=K^{[i]} \oplus K&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Zusammenhang mit Kürzesten Pfaden ==&lt;br /&gt;
Für einen gerichteten Graph &amp;lt;math&amp;gt;G = (V,E)&amp;lt;/math&amp;gt; mit positiven Kantengewichten &amp;lt;math&amp;gt;c_{i,j}&amp;lt;/math&amp;gt; (oder mit [[Kürzester Pfad#Komplexität|konservativer Gewichtsfunktion]]) gilt:&lt;br /&gt;
* Die Matrix &amp;lt;math&amp;gt;K^{[p]} =(k^{[p]}_{i,j})&amp;lt;/math&amp;gt; gibt die Länge der kürzesten Pfade mit maximal &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; Kanten an. Der Eintrag &amp;lt;math&amp;gt;k^{[p]}_{i,j}&amp;lt;/math&amp;gt; gibt dabei die Länges des kürzesten Pfad (mit maximal &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; Kanten) von Knoten &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; zu Knoten &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; an.&lt;br /&gt;
* Wenn &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; die Anzahl der Knoten ist dann gilt &amp;lt;math&amp;gt;K^{[p]} = D&amp;lt;/math&amp;gt; für alle &amp;lt;math&amp;gt;p\geq n-1&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Wenn &amp;lt;math&amp;gt;K^{[p+1]} = K^{[p]}&amp;lt;/math&amp;gt; dann auch &amp;lt;math&amp;gt;K^{[p]} = D&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Algorithmus ==&lt;br /&gt;
Der Min-Plus-Matrixmultiplikations-Algorithmus berechnet nun ausgehend von der Kostenmatrix &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; des Graph &amp;lt;math&amp;gt;K^{[p]}&amp;lt;/math&amp;gt; sodass &amp;lt;math&amp;gt;K^{[p+1]} = K^{[p]}=D&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Variante 1&amp;#039;&amp;#039;: Berechnet &amp;lt;math&amp;gt;K^{[2]}, K^{[3]}, K^{[4]}, ...&amp;lt;/math&amp;gt; bis  &amp;lt;math&amp;gt;K^{[p+1]} = K^{[p]}&amp;lt;/math&amp;gt;. Dabei wird in jedem Schritt das Ergebnis des letzten Schrittes mit der Matrix &amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt; multipliziert.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Variante 2&amp;#039;&amp;#039;: Berechnet &amp;lt;math&amp;gt;K^{[2]}, K^{[4]}, K^{[8]}, ...&amp;lt;/math&amp;gt; bis &amp;lt;math&amp;gt;K^{[2*p]} = K^{[p]}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Dabei wird in jedem Schritt das Ergebnis des letzten Schrittes quadriert.&lt;br /&gt;
=== Laufzeit ===&lt;br /&gt;
Im Folgenden verwenden wir die [[Landau-Notation]], um das asymptotische Verhalten der Laufzeit anzugeben.&lt;br /&gt;
Im &amp;#039;&amp;#039;worst case&amp;#039;&amp;#039; benötigt Variante 1 &amp;lt;math&amp;gt;\Theta\left(n\right)&amp;lt;/math&amp;gt; Matrixmultiplikationen während Variante 2 nur  &amp;lt;math&amp;gt;\Theta\left( \log n\right)&amp;lt;/math&amp;gt; Matrixmultiplikationen benötigt.&lt;br /&gt;
Die Laufzeit mit der naiven Implementierung der Min-Plus-Matrixmultiplikation ist dann in &amp;lt;math&amp;gt;\Theta\left( n^4 \right)&amp;lt;/math&amp;gt; für Variante 1 und in &amp;lt;math&amp;gt;\Theta\left( n^3 \cdot \log n \right)&amp;lt;/math&amp;gt; für Variante 2. &lt;br /&gt;
Damit hat der Algorithmus eine schlechtere Laufzeit als der vergleichbare [[Algorithmus von Floyd und Warshall]] dessen Laufzeit in &amp;lt;math&amp;gt; \mathcal{O}(n^3) &amp;lt;/math&amp;gt; ist.&lt;br /&gt;
&lt;br /&gt;
Die Laufzeit kann jedoch durch kompliziertere Implementierungen der Min-Plus-Matrixmultiplikation verbessert werden.&lt;br /&gt;
&lt;br /&gt;
== Siehe auch ==&lt;br /&gt;
* [[Pathfinding]]&lt;br /&gt;
&lt;br /&gt;
== Quellen ==&lt;br /&gt;
* Thomas H. Cormen, [[Charles Leiserson]], [[Ronald L. Rivest]], Clifford Stein: &amp;#039;&amp;#039;Introduction to Algorithms.&amp;#039;&amp;#039; 2. Auflage. MIT Press, 2001, ISBN 0-262-53196-8, S. 622–627&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Algorithmus (Graphentheorie)]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Wdvorak</name></author>
	</entry>
</feed>