<?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=Algorithmus_von_Dinic</id>
	<title>Algorithmus von Dinic - 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=Algorithmus_von_Dinic"/>
	<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Algorithmus_von_Dinic&amp;action=history"/>
	<updated>2026-06-02T09:53:47Z</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=Algorithmus_von_Dinic&amp;diff=1895061&amp;oldid=prev</id>
		<title>imported&gt;Aka: /* Sperrfluss finden */ Tippfehler entfernt</title>
		<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Algorithmus_von_Dinic&amp;diff=1895061&amp;oldid=prev"/>
		<updated>2018-07-08T11:11:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Sperrfluss finden: &lt;/span&gt; Tippfehler entfernt&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;Algorithmus von Dinic&amp;#039;&amp;#039;&amp;#039; ist ein [[Algorithmus]] aus der [[Graphentheorie]] zur Bestimmung eines [[Flüsse und Schnitte in Netzwerken|maximalen Flusses in einem Netzwerk]]. Er wurde von [[E. A. Dinic]] (Jefim (Chaim) Dinic) entwickelt und 1970 publiziert. Er ist eine Weiterentwicklung des [[Algorithmus von Edmonds und Karp|Edmonds-Karp-Algorithmus]], den Dinic unabhängig von [[Jack Edmonds]] und [[Richard M. Karp]] entwickelte. Der Algorithmus von Dinic unterscheidet sich vom Edmonds-Karp-Algorithmus, indem in jedem Durchgang nicht nur an einem einzelnen kürzesten s-t-Weg augmentiert wird, sondern mitunter an größeren s-t-Flüssen, die sich aus mehreren kürzesten s-t-Wegen zusammensetzen.&lt;br /&gt;
&lt;br /&gt;
== Der Algorithmus ==&lt;br /&gt;
Im Folgenden bezeichnet im Netzwerk &amp;lt;math&amp;gt;(G, u, s, t)&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; den gerichteten Graphen, &amp;lt;math&amp;gt;u\colon E(G) \rightarrow \mathbb{R}_+&amp;lt;/math&amp;gt; die Kapazitätsfunktion (wobei &amp;lt;math&amp;gt;u(e)&amp;lt;/math&amp;gt; die Kapazität einer Kante &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; angibt), &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; den Knoten, von dem der Fluss startet, und &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; den Zielknoten des Flusses. &amp;lt;math&amp;gt;V(G)&amp;lt;/math&amp;gt; bezeichnet die Knotenmenge des Graphen &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;E(G)&amp;lt;/math&amp;gt; die Kantenmenge. Zu einem Fluss &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; bezeichnet &amp;lt;math&amp;gt;G_f&amp;lt;/math&amp;gt; den [[Residualgraph]]en und &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; den [[Flüsse und Schnitte in Netzwerken#Schichtnetzwerk|Schichtgraphen]], also den Graphen, der sich mit &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; die Knotenmenge teilt und aus genau den Kanten &amp;lt;math&amp;gt;(u,v)\in E(G_f)&amp;lt;/math&amp;gt; besteht, die für beliebige Knoten &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; zu einem kürzesten s-v-Weg von &amp;lt;math&amp;gt;G_f&amp;lt;/math&amp;gt; gehören. Insbesondere enthält &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; auch alle Kanten, die zu einem kürzesten s-t-Weg in &amp;lt;math&amp;gt;G_f&amp;lt;/math&amp;gt; gehören. &amp;lt;math&amp;gt;u_f&amp;lt;/math&amp;gt; bezeichnet die zum Residualgraph gehörige Residualkapazität. Ein Sperrfluss (auch blockierender Fluss genannt) in &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; ist ein s-t-Fluss, der in jedem s-t-Weg in &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; mindestens eine Kante auslastet. Zu einer Kante &amp;lt;math&amp;gt;e\in E(G)&amp;lt;/math&amp;gt; bezeichnet &amp;lt;math&amp;gt;\overleftarrow{e}&amp;lt;/math&amp;gt; die zugehörige Rückkante des Residualgraphen.&lt;br /&gt;
&lt;br /&gt;
Der Algorithmus arbeitet wie folgt:&lt;br /&gt;
&lt;br /&gt;
# Setze &amp;lt;math&amp;gt;f(e):=0&amp;lt;/math&amp;gt; für jede Kante &amp;lt;math&amp;gt;e\in E(G)&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Bestimme den Schichtgraphen &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Bestimme einen Sperrfluss &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Falls &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; der Nullfluss ist, sind wir fertig, ansonsten augmentiere &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; entlang &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; (d.&amp;amp;nbsp;h. für jede Kante &amp;lt;math&amp;gt;e\in E(G)&amp;lt;/math&amp;gt; setze: &amp;lt;math&amp;gt;f(e):=f(e)+g(e)-g(\overleftarrow{e})&amp;lt;/math&amp;gt; (mit &amp;lt;math&amp;gt;g(e):=0&amp;lt;/math&amp;gt;, falls &amp;lt;math&amp;gt;e\notin E(G_f^L)&amp;lt;/math&amp;gt;)) und springe zu 2.&lt;br /&gt;
&lt;br /&gt;
Am Ende ist &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; ein maximaler s-t-Fluss, da es im Residualgraphen &amp;lt;math&amp;gt;G_f&amp;lt;/math&amp;gt; keinen s-t-Weg mehr gibt.&lt;br /&gt;
&lt;br /&gt;
=== Sperrfluss finden ===&lt;br /&gt;
Für Schritt 3 des Algorithmus kann ein Sperrfluss &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; beispielsweise wie folgt berechnet werden:&lt;br /&gt;
&lt;br /&gt;
# Setze &amp;lt;math&amp;gt;g(e):=0&amp;lt;/math&amp;gt; für jede Kante &amp;lt;math&amp;gt;e\in G_f^L&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Setze &amp;lt;math&amp;gt;H:=G_f^L&amp;lt;/math&amp;gt;.&lt;br /&gt;
# START&lt;br /&gt;
#*&amp;lt;math&amp;gt;P:=[s]&amp;lt;/math&amp;gt; (Weg aus nur einem Knoten ohne Kanten)&lt;br /&gt;
#*&amp;lt;math&amp;gt;v:=s&amp;lt;/math&amp;gt;&lt;br /&gt;
#* springe zu VOR.&lt;br /&gt;
# VOR&lt;br /&gt;
#* Falls in &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; keine Kante den Knoten &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; verlässt, springe zu ZURÜCK.&lt;br /&gt;
#* Anderenfalls&lt;br /&gt;
#** Wähle eine Kante &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; aus &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt;.&lt;br /&gt;
#** Verlängere &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; um &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt;.&lt;br /&gt;
#**&amp;lt;math&amp;gt;v:=w&amp;lt;/math&amp;gt;&lt;br /&gt;
#** Falls &amp;lt;math&amp;gt;v\neq t&amp;lt;/math&amp;gt;, springe zu VOR.&lt;br /&gt;
#** Falls &amp;lt;math&amp;gt;v=t&amp;lt;/math&amp;gt;, springe zu AUGMENTIEREN.&lt;br /&gt;
# AUGMENTIEREN&lt;br /&gt;
#* Augmentiere &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; längs &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; um so viel wie möglich (d.&amp;amp;nbsp;h. für &amp;lt;math&amp;gt;\gamma := \min_{e\in E(P)}u_f(e)&amp;lt;/math&amp;gt; setze &amp;lt;math&amp;gt;g(e):=g(e)+\gamma\!\,&amp;lt;/math&amp;gt; für jedes &amp;lt;math&amp;gt;e\in E(P)&amp;lt;/math&amp;gt;).&lt;br /&gt;
#* Entferne die Kanten aus &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt;, die dadurch ausgelastet werden.&lt;br /&gt;
#* Springe zu START.&lt;br /&gt;
# ZURÜCK&lt;br /&gt;
#* Falls &amp;lt;math&amp;gt;v=s&amp;lt;/math&amp;gt;, ist &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; Sperrfluss, also STOP.&lt;br /&gt;
#* Anderenfalls&lt;br /&gt;
#** Sei &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; letzte Kante auf &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;.&lt;br /&gt;
#** Verkürze &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; um &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt;.&lt;br /&gt;
#** Entferne &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; und alle mit ihm inzidenten Kanten aus &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt;.&lt;br /&gt;
#**&amp;lt;math&amp;gt;v:=u&amp;lt;/math&amp;gt;&lt;br /&gt;
#** Springe zu VOR.&lt;br /&gt;
&lt;br /&gt;
Am Ende dieses Verfahrens ist &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; Sperrfluss in &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt;. Sei &amp;lt;math&amp;gt;m=|E(G)|&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;n=|V(G)|&amp;lt;/math&amp;gt;. Dieses Verfahren benötigt für die Berechnung eines Sperrflusses eine Laufzeit von &amp;lt;math&amp;gt;\mathcal{O}(n m)&amp;lt;/math&amp;gt;. Denn jeder Aufruf von AUGMENTIEREN benötigt Laufzeit &amp;lt;math&amp;gt;\mathcal{O}(n)&amp;lt;/math&amp;gt; und jeder dieser Aufrufe nimmt eine Kante aus dem Graphen, also gibt es höchstens &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; dieser Aufrufe (denn der Schichtgraph &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; hat höchstens &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; Kanten). Weil der Schichtgraph &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; keine gerichteten Kreise enthält, kann zwischen zwei AUGMENTIEREN-Aufrufen jeder Knoten höchstens einmal durch eine VOR-Operation erreicht werden, also werden insgesamt höchstens &amp;lt;math&amp;gt;\mathcal{O}(n m)&amp;lt;/math&amp;gt; solche durchgeführt; eine VOR-Operation kann in konstanter Laufzeit ausgeführt werden. In den ZURÜCK-Operationen wird jedes Mal ein Knoten entfernt, also werden sie höchstens &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-mal durchgeführt, alle ZURÜCK-Operationen zusammen haben eine Laufzeit von &amp;lt;math&amp;gt;\mathcal{O}(n+m)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Anmerkung ===&lt;br /&gt;
E. A. Dinic arbeitete statt mit dem Schichtgraphen mit einem Teilgraphen, der genau aus den Knoten und Kanten besteht, die auf kürzesten s-t-Wegen liegen. Die Verwendung des Schichtgraphen funktioniert analog, vereinfacht aber die Beschreibung des Algorithmus.&lt;br /&gt;
&lt;br /&gt;
== Laufzeit ==&lt;br /&gt;
Sei &amp;lt;math&amp;gt;m=|E(G)|&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;n=|V(G)|&amp;lt;/math&amp;gt;. Der Algorithmus von Dinic benötigt höchstens &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; Durchläufe. Der Schichtgraph &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; kann mit [[Breitensuche]] in Laufzeit &amp;lt;math&amp;gt;\mathcal{O}(m)&amp;lt;/math&amp;gt; berechnet werden. Ein Sperrfluss in &amp;lt;math&amp;gt;G_f^L&amp;lt;/math&amp;gt; kann mit der oben angegebenen Methode in Laufzeit &amp;lt;math&amp;gt;\mathcal{O}(n m)&amp;lt;/math&amp;gt; berechnet werden. Damit ergibt sich eine Gesamtlaufzeit von &amp;lt;math&amp;gt;\mathcal{O}(n^2 m)&amp;lt;/math&amp;gt;. Dies ist auch die Laufzeit, die von Dinic 1970 bewiesen wurde. Allerdings arbeitet der [[Goldberg-Tarjan-Algorithmus]] schneller.&lt;br /&gt;
&lt;br /&gt;
Mit einer Verbesserung von [[Alexander Karzanov]] von 1974 lässt sich für den Algorithmus von Dinic auch eine Laufzeit von &amp;lt;math&amp;gt;\mathcal{O}(n^3 + nm)&amp;lt;/math&amp;gt; erreichen.&lt;br /&gt;
&lt;br /&gt;
== Quellen ==&lt;br /&gt;
* [[Bernhard Korte]], [[Jens Vygen]]: &amp;#039;&amp;#039;Kombinatorische Optimierung: Theorie und Algorithmen&amp;#039;&amp;#039;. Aus dem Englischen von Rabe von Randow. Springer-Verlag, Berlin Heidelberg 2008, ISBN 978-3-540-76918-7&lt;br /&gt;
* Helmut Alt: [http://www.inf.fu-berlin.de/lehre/WS06/HA/skript/skript.pdf Vorlesungsskript &amp;#039;&amp;#039;Höhere Algorithmik&amp;#039;&amp;#039;, Wintersemester 2006/2007, Freie Universität Berlin.] (PDF; 2,5&amp;amp;nbsp;MB)&lt;br /&gt;
&lt;br /&gt;
== Weblinks ==&lt;br /&gt;
* E. A. Dinic: [http://www.cs.bgu.ac.il/~dinitz/D70.pdf &amp;#039;&amp;#039;Algorithm for solution of a problem of maximum flow in a network with power estimaton&amp;#039;&amp;#039;, 1970] (PDF; 428&amp;amp;nbsp;kB) – E. A. Dinics Veröffentlichung des Algorithmus&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Algorithmus (Graphentheorie)|Dinic]]&lt;br /&gt;
[[Kategorie:Optimierungsalgorithmus|Dinic]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Aka</name></author>
	</entry>
</feed>