<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.algo.informatik.tu-darmstadt.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pezi22</id>
	<title>Algowiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.algo.informatik.tu-darmstadt.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pezi22"/>
	<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/Special:Contributions/Pezi22"/>
	<updated>2026-10-09T21:21:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Ford-Fulkerson&amp;diff=2761</id>
		<title>Ford-Fulkerson</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Ford-Fulkerson&amp;diff=2761"/>
		<updated>2015-01-22T15:48:25Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: /* Pseudocode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General information ==&lt;br /&gt;
&lt;br /&gt;
'''Algorithmic problem:''' [[Max-Flow Problems#Standard version|Max-flow problems (standard version)]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Type of algorithm:''' loop&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract view ==&lt;br /&gt;
&lt;br /&gt;
'''Invariant:'''&lt;br /&gt;
After &amp;lt;math&amp;gt;i \ge 0&amp;lt;/math&amp;gt; iterations:&lt;br /&gt;
# The flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is a [[basic flow definitions#Feasible flow|feasible flow]].&lt;br /&gt;
# If all upper bounds are integral, &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is integral as well.&lt;br /&gt;
&lt;br /&gt;
'''Variant:''' The [[Basic flow definitions#Flow value|flow value]] of &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; increases.&lt;br /&gt;
&lt;br /&gt;
'''Break condition:''' There is no [[Basic flow definitions#Flow-augmenting paths and saturated arcs|flow-augmenting path]].&lt;br /&gt;
&lt;br /&gt;
== Induction basis ==&lt;br /&gt;
'''Abstract view:''' We start with some feasible flow, for example, the zero flow.&lt;br /&gt;
&lt;br /&gt;
'''Implementation:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
== Induction step ==&lt;br /&gt;
'''Abstract view:''' Find a [[Basic flow definitions#Flow-augmenting path|flow-augmenting path]] and increase &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; along this path up to saturation. If no path is found, the break condition applies, and the loop is terminated.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' If the graph traversal does not hit &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, the break condition is fulfilled, and nothing is to show. So consider the case that the graph traversal does hit &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;. Then an &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path is found. [[Basic flow definitions#Augmenting along a path|Augmenting along this path up to saturation]] preserves feasibility of the flow.&lt;br /&gt;
&lt;br /&gt;
== Correctness ==&lt;br /&gt;
&lt;br /&gt;
Due to the invariant, the flow is feasible before and after each iteration. Termination results from the complexity considerations below. Due to the [[Max-flow min-cut|max-flow min-cut theorem]], the break condition implies that the final flow is maximum.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:''' If all capacity values are integral, the asymptotic worst-case complexity is &amp;lt;math&amp;gt;\mathcal{O} (m\cdot F)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;m = |A|&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; is the maximum total flow value.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' A graph search from &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; requires &amp;lt;math&amp;gt;\Omicron (m)&amp;lt;/math&amp;gt; . Obviously, determining &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; and changing the flow values along &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; requires &amp;lt;math&amp;gt;\mathcal{O}(m)&amp;lt;/math&amp;gt; as well. &lt;br /&gt;
It is also evident that, before and after each iteration, the flow values on all arcs are integral. In particular, the total flow value is integral. The variant implies that, in case of integral capacity values, the total flow value increases by at least one unit in every iteration. Since the total flow value is always in the interval &amp;lt;math&amp;gt;[0...F]&amp;lt;/math&amp;gt;, this may happen at most &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; times.&lt;br /&gt;
&lt;br /&gt;
'''Remark:'''&lt;br /&gt;
The number of nodes is irrelevant because at most &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; nodes are reachable from &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; (not including &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; itself).&lt;br /&gt;
&lt;br /&gt;
== Pseudocode == &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 FORD-FULKERSON(''G,s,t'')&lt;br /&gt;
 1 '''for''' each edge (''u,v'')  &amp;amp;isin; ''G.E''&lt;br /&gt;
 2    (''u,v'').''f'' = 0&lt;br /&gt;
 3 '''while''' there exists a path ''p'' from ''s'' to ''t'' in the residual Network G&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''&lt;br /&gt;
 4    ''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''p'') = min{''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''u,v'') : (''u,v'') is in ''p''}  &lt;br /&gt;
 5    '''for''' each each edge (''u,v'') in ''p'' &lt;br /&gt;
 6        '''if''' (''u,v'') &amp;amp;isin; ''E''&lt;br /&gt;
 7              (''u,v'').''f'' = (''u,v'').''f'' + ''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''p'')  &lt;br /&gt;
 8        '''else''' (''v,u'').''f'' = (''v,u'').''f'' - ''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''p'')  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Hopcroft-Tarjan&amp;diff=2071</id>
		<title>Hopcroft-Tarjan</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Hopcroft-Tarjan&amp;diff=2071"/>
		<updated>2014-11-11T19:00:49Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: cat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Graph Algorithms]]&lt;br /&gt;
== Abstract view ==&lt;br /&gt;
&lt;br /&gt;
'''Algorithmic problem:'''&lt;br /&gt;
[[Biconnected components]]&lt;br /&gt;
&lt;br /&gt;
'''Type of algorithm:'''&lt;br /&gt;
two steps.&lt;br /&gt;
&lt;br /&gt;
== Step 1 ==&lt;br /&gt;
&lt;br /&gt;
'''Abstract view:'''&lt;br /&gt;
# A start node &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and an edge &amp;lt;math&amp;gt;\{s,v\}&amp;lt;/math&amp;gt; to an arbitrarily chosen node &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; are added to &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
# The core algorithm is a variation of [[Depth-first search|DFS]], where for each node &amp;lt;math&amp;gt;v\in v&amp;lt;/math&amp;gt; two additional nonnegative integral numbers are computed:&lt;br /&gt;
## The '''depth''' of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in the arborescence created by the DFS procedure.&lt;br /&gt;
## The '''lowpoint''', that is, the minimal depth of any node &amp;lt;math&amp;gt;w\in V&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;(u,w)\in A&amp;lt;/math&amp;gt; for some immediate or non-immediate successor of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in the DFS tree.&lt;br /&gt;
# The start node &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and the edge &amp;lt;math&amp;gt;\{s,v\}&amp;lt;/math&amp;gt; are removed from &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; and from the DFS arborescence (which is rooted at &amp;lt;matH&amp;gt;v&amp;lt;/math&amp;gt; afterwards).&lt;br /&gt;
&lt;br /&gt;
'''Implementation of step 2:'''&lt;br /&gt;
# ''Depth'': The DFS maintains a global integral number, the '''current depth'''. Whenever a node is seen for the first time, its depth attribute is set identical to the current depth. In each forward step, the current depth is ''in''creased by one, in each backward step, it is ''de''creased by one.&lt;br /&gt;
# ''Lowpoint'':&lt;br /&gt;
## Whenever a node &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; is seen for the first time, its lowpoint is set identical to its depth.&lt;br /&gt;
## Whenever an arc &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; is examined such that &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; has already been seen and the depth of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is smaller than the lowpoint of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, the lowpoint of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is set identical to the depth of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt;.&lt;br /&gt;
## In each backward step of DFS from a node &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; back to its immediate predecessor &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;: If the lowpoint value of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is smaller than the lowpoint value of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, the lowpoint value of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is set identical to the lowpoint value of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Remarks:'''&lt;br /&gt;
# We do not choose a start node from the given nodes but insert a new start node to avoid a special treatment of the start node.&lt;br /&gt;
# This is another example where it makes perfect sense to implement graph traversal algorithms as iterators (cf. [[Graph traversal#Remarks|here]]). In fact, then the operations on the depth and lowpoint attributes can be inserted in the DFS loop in an easy, obvious way.&lt;br /&gt;
&lt;br /&gt;
== Step 2 ==&lt;br /&gt;
&lt;br /&gt;
'''Definition:'''&lt;br /&gt;
A node &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; is '''essential''' if, for at least one arc &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; in the arborescence from step 1, the lowpoint value of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is equal to or larger than the depth of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Abstract view:'''&lt;br /&gt;
A repeated application of [[Depth-first search|DFS]], where the start nodes of the individual DFS runs are the essential nodes. In that, the essential nodes are considered in ascending order of their finishing times as computed in step 1. The nodes hit in one DFS run are removed from &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; before the next DFS run commences. The node sets visited in the individual DFS runs are returned as the biconnected components.&lt;br /&gt;
&lt;br /&gt;
== Correctness ==&lt;br /&gt;
&lt;br /&gt;
Obviously, the depth and the lowpoint are set correctly according to their intended semantics.&lt;br /&gt;
&lt;br /&gt;
First consider an essential node &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; be an arc in the arborescence such that the lowpoint value of &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; is equal to or larger than the depth of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;. We have to show that the subarborescence rooted at &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; is connected to the rest of the graph via &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; only. So suppose for a contradiction that there is an edge &amp;lt;math&amp;gt;\{x,y\}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; belongs to that subarborescence and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; does not. Then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; must have been seen before &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;, because otherwise, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; would be in the subarborescence rooted at &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. Since the lowpoint of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; is equal to or larger than the depth of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; cannot be a predecessor of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in the arborescence. Hence, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was even finished before &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; was seen. In particular, &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; was finished before &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; was seen, which is impossible.&lt;br /&gt;
&lt;br /&gt;
Now consider a node &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; that is ''not'' essential. Opposite to the first case, we have to show that the subarborescence rooted at an arc &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; is not only connected to the rest of the graph via &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;. However, this follows immediately from the definition of the lowpoint value: There is some &amp;lt;math&amp;gt;x\in V&amp;lt;/math&amp;gt; in the subarborescence rooted at &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; connected to some node &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; that cannot be in the subarborescence due to its smaller depth.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:'''&lt;br /&gt;
The asymptotic complexity is linear.&lt;br /&gt;
&lt;br /&gt;
'''Proof:'''&lt;br /&gt;
Follows immediately from the linear asymptotic complexity of DFS.&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Kosaraju&amp;diff=2070</id>
		<title>Kosaraju</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Kosaraju&amp;diff=2070"/>
		<updated>2014-11-11T19:00:09Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Graph Algorithms]]&lt;br /&gt;
&lt;br /&gt;
== General information ==&lt;br /&gt;
&lt;br /&gt;
'''Algorithmic problem:''' [[Strongly connected components]]&lt;br /&gt;
&lt;br /&gt;
'''Type of algorithm:''' loop&lt;br /&gt;
&lt;br /&gt;
== Abstract View ==&lt;br /&gt;
&lt;br /&gt;
# Apply a [[repeated depth-first search]] to &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, the output order is parenthetical.&lt;br /&gt;
# Invert the output order of the nodes.&lt;br /&gt;
# Let &amp;lt;math&amp;gt;G^t=(V,A^t)&amp;lt;/math&amp;gt; be the [[Basic graph definitions#Transpose of a graph|transpose]] of &amp;lt;math&amp;gt;G=(V,A)&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Apply a [[repeated depth-first search]] to &amp;lt;math&amp;gt;G^t&amp;lt;/math&amp;gt; with a modification: The order in which the nodes are considered as potential start nodes is the inverted parenthetical order from step 2. &lt;br /&gt;
# The node sets from the individual applications of [[Depth-first search|DFS]] inside step 4 are exactly the SCC of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Correctness ==&lt;br /&gt;
&lt;br /&gt;
First note that the transposition of all arcs does not change the SCC of a graph, so step 4 indeed processes the SCC of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
[[File:CondensedGraphKosaraju.jpg|200px|thumb|right|Construction of the condensed graph (example)]]&lt;br /&gt;
Consider the condensed graph &amp;lt;math&amp;gt;G'&amp;lt;/math&amp;gt; whose nodes are these SCC, and there is an arc from an SCC &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; to an SCC &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G'&amp;lt;/math&amp;gt; if, and only if, there is at least one arc in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; from some node in &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; to some node in &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt;. This condensed graph is acyclic because all nodes in all SCC on a cycle would be mutually reachable from each other in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; and their union would consequently form a single larger SCC contradicting the construction of the condensed graph.&lt;br /&gt;
&lt;br /&gt;
In step 1, each [[Depth-first search|DFS]] run either meets ''all'' nodes of an SCC of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; or ''none'' of the nodes of this SCC. More specifically, all nodes in the same SCC as the start node and in all SCC reachable from that SCC, except for the SCC processed in previous [[Depth-first search|DFS]] runs.&lt;br /&gt;
&lt;br /&gt;
It is easy to see that all nodes of an SCC are finished consecutively (because of the parenthetical order); that is, all nodes of an SCC form a connected  subsequence in the output sequence of step 1. In particular, it does not matter in step 4 which node of an SCC is chosen as a start node for a [[Depth-first search|DFS]] run. If an SCC &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; is reachable from an SCC &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, then the nodes of &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; appear before the nodes of &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; in parenthetical order. Equivalently, the nodes of &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; appear ''after'' the nodes of &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; in the reverse order on which step 4 is based.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; be two SCC of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Since each SCC is processed exhaustively or not at all in a  [[Depth-first search|DFS]] run, it suffices to show that &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; are not processed within the same run of step 4. Suppose for a contradiction that &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C_j&amp;lt;/math&amp;gt; are processed in the same [[Depth-first search|DFS]] run in step 4 (not necessarily in the same run in step 1). Let &amp;lt;math&amp;gt;C_k&amp;lt;/math&amp;gt; be the SCC to which the start node of that run belongs (possibly &amp;lt;math&amp;gt;k=i&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;k=j&amp;lt;/math&amp;gt;). Without loss of generality, suppose &amp;lt;math&amp;gt;k\neq i&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; is reachable from &amp;lt;math&amp;gt;C_k&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G'&amp;lt;/math&amp;gt;; in other words, &amp;lt;math&amp;gt;C_k&amp;lt;/math&amp;gt; is reachable from &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. However, then the nodes of &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; have higher finishing times than the nodes of &amp;lt;math&amp;gt;C_k&amp;lt;/math&amp;gt;, so some node of &amp;lt;math&amp;gt;C_i&amp;lt;/math&amp;gt; had been chosen as a start node before any node of &amp;lt;math&amp;gt;C_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:''' The asymptotic complexity is in &amp;lt;math&amp;gt;\Theta(|V|+|A|)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' Follows immediately from the linear asymptotic complexity of [[Repeated depth-first search|repeated DFS]].&lt;br /&gt;
&lt;br /&gt;
== Pseudocode == &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 STRONGLY-CONNECTED-COMPONENTS(''D'')&lt;br /&gt;
 1 call '''DFS'''(''D'') to compute finishing times ''f''[v] for each vertex ''v'' &amp;amp;isin; ''V''&lt;br /&gt;
 2 compute ''D''&amp;lt;sup&amp;gt;''T''&amp;lt;/sup&amp;gt; (w.r.t. step 3)&lt;br /&gt;
 3 call '''DFS'''(''D''&amp;lt;sup&amp;gt;''T''&amp;lt;/sup&amp;gt;), but in the main loop of '''DFS''', consider the vertices in order of decreasing ''f''[v] as computed in step 1&lt;br /&gt;
 4 output the vertices of each tree in the '''DFS''' forest of step 3 as a separate strongly connected component&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Main_Page&amp;diff=2069</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Main_Page&amp;diff=2069"/>
		<updated>2014-11-11T18:54:07Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: /* ??? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News ==&lt;br /&gt;
* The http://wiki.algo.informatik.tu-darmstadt.de domain will forward to this page from 13th October.&lt;br /&gt;
* The old wiki will be reachable at http://huffmann.algo.informatik.tu-darmstadt.de/wiki/&lt;br /&gt;
* &amp;lt;math&amp;gt;LaTeX&amp;lt;/math&amp;gt; [http://www.mediawiki.org/wiki/Manual:Math available now!]&lt;br /&gt;
* ToDo List added&lt;br /&gt;
* Every content has to be in English!&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Syntaxhighlight]&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
* Add finalized reconstructions of the old Wiki to Category:Checkup.&lt;br /&gt;
* Don't any non-Weihe content until the reconstructions isn't finished.&lt;br /&gt;
* Keep your active reconstructing Pages in &amp;quot;Division of labor&amp;quot; section up to date!&lt;br /&gt;
&lt;br /&gt;
'''Look here for short/uncomplete Pages''' [[Special:ShortPages]]&lt;br /&gt;
&lt;br /&gt;
== Page Status ==&lt;br /&gt;
Final: [[:Category:Checkup]]&lt;br /&gt;
&lt;br /&gt;
== To Do ==&lt;br /&gt;
=== Notations ===&lt;br /&gt;
* [[Big O notation]]&lt;br /&gt;
* [[L' Hospital]]&lt;br /&gt;
* [[Master theorem]]&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
* [[Maximum matching problem]]&lt;br /&gt;
* [[Max-Flow Problems]]&lt;br /&gt;
* [[Min-Cost Flow Problems]]&lt;br /&gt;
* [[Shortest Paths Problems]]&lt;br /&gt;
** [[All pairs shortest paths]]&lt;br /&gt;
*** [[Floyd-Warshall]]&lt;br /&gt;
*** [[Bellman-Ford]] (DONE)&lt;br /&gt;
*** [[Shortest paths by repeated squaring]] (variant of Bellman-Ford) &lt;br /&gt;
** [[Single source shortest paths]]&lt;br /&gt;
*** [[Dijkstra]]&lt;br /&gt;
** [[Single source single target shortest paths]]&lt;br /&gt;
*** [[A*]]&lt;br /&gt;
* [[Maximum spanning forest]]&lt;br /&gt;
* [[Problems on Sequences]]&lt;br /&gt;
** [[Basic Problems on Sequences]]&lt;br /&gt;
*** [[Find an element in a sequence]] (DONE)&lt;br /&gt;
*** [[Insert an element in a sequence]] (Empty in old wiki?!)&lt;br /&gt;
*** [[Median]] (DONE)&lt;br /&gt;
*** [[Merging two sorted sequences]] (DONE)&lt;br /&gt;
** [[Pattern Matching]]&lt;br /&gt;
*** [[One-dimensional string matching]] (DONE)&lt;br /&gt;
*** [[String matching]] (DONE)&lt;br /&gt;
** [[Sorting]]&lt;br /&gt;
*** [[Sorting based on pairwise comparison]] (DONE)&lt;br /&gt;
*** [[Sorting Sequences of Strings]] (DONE)&lt;br /&gt;
&lt;br /&gt;
=== Coding Basics ===&lt;br /&gt;
* [[Inheritance]]&lt;br /&gt;
* [[Generics]]&lt;br /&gt;
* [[Collections]]&lt;br /&gt;
** [[Iterator]]&lt;br /&gt;
** [[Comparator]]&lt;br /&gt;
&lt;br /&gt;
=== String Matching Algorithms ===&lt;br /&gt;
* [[Simple string matching algorithm]] (DONE)&lt;br /&gt;
* [[String matching based on finite automaton]] (DONE)&lt;br /&gt;
&lt;br /&gt;
=== Sorting Algorithms ===&lt;br /&gt;
* [[Bubble]]&lt;br /&gt;
* [[Insertion sort]]&lt;br /&gt;
* [[Quicksort]]&lt;br /&gt;
* [[Bubblesort]]&lt;br /&gt;
* [[Mergesort]]&lt;br /&gt;
* [[Bucketsort]]&lt;br /&gt;
* [[Selection sort]]&lt;br /&gt;
* [[Bogosort]]&lt;br /&gt;
&lt;br /&gt;
=== Search Algorithms ===&lt;br /&gt;
* [[Binary search]]&lt;br /&gt;
&lt;br /&gt;
=== Auxillary Algorithms ===&lt;br /&gt;
* [[Pivot partitioning by scanning]]&lt;br /&gt;
&lt;br /&gt;
=== Manipulation ===&lt;br /&gt;
* [[Array list: find]]&lt;br /&gt;
* [[Array list: find at position]]&lt;br /&gt;
* [[Array list: insert at head]]&lt;br /&gt;
* [[Array list: insert at position]]&lt;br /&gt;
* [[Array list: number]]&lt;br /&gt;
* [[Array list: remove]]&lt;br /&gt;
* [[Doubly-linked list: insert at position]]&lt;br /&gt;
* [[Doubly-linked list: insert at tail]]&lt;br /&gt;
* [[Doubly-linked list: remove]]&lt;br /&gt;
* [[Find element in sequence iteratively]]&lt;br /&gt;
* [[Find element in sequence recursively]]&lt;br /&gt;
* [[Hashtable: find]]&lt;br /&gt;
* [[Hashtable: insert]]&lt;br /&gt;
&lt;br /&gt;
=== Tree Algorithms ===&lt;br /&gt;
* [[Depth-first search]]&lt;br /&gt;
* [[Breadth-first search]]&lt;br /&gt;
* [[B-tree: find]]&lt;br /&gt;
* [[B-tree: minimum]]&lt;br /&gt;
* [[B-tree: maximum]]&lt;br /&gt;
* [[B-tree: insert]]&lt;br /&gt;
* [[B-tree: insert and rearrange]]&lt;br /&gt;
* [[B-tree: merge two siblings]]&lt;br /&gt;
* [[B-tree: remove]]&lt;br /&gt;
* [[B-tree: shift key to sibling]]&lt;br /&gt;
* [[B-tree: rotate]]&lt;br /&gt;
* [[B-tree: merge]]&lt;br /&gt;
* [[B-tree: split]]&lt;br /&gt;
* [[Binary search tree: find]]&lt;br /&gt;
* [[Binary search tree: minimum]]&lt;br /&gt;
* [[Binary search tree: maximum]]&lt;br /&gt;
* [[Binary search tree: insert]]&lt;br /&gt;
* [[Binary search tree: remove]]&lt;br /&gt;
* [[Binary search tree: remove node]]&lt;br /&gt;
* [[Binary search tree: traverse]]&lt;br /&gt;
&lt;br /&gt;
=== Graph Theory ===&lt;br /&gt;
* [[Directed graph]]&lt;br /&gt;
* [[Bipartite graph|Bipartite graph]] (DONE)&lt;br /&gt;
* [[k-partite graph]]&lt;br /&gt;
* [[Negative paths]]&lt;br /&gt;
&lt;br /&gt;
=== Graph Algorithms ===&lt;br /&gt;
* [[Dijkstra]]&lt;br /&gt;
* [[Kruskal]]&lt;br /&gt;
* [[Prim]]&lt;br /&gt;
* [[Bellman-Ford]] (DONE)&lt;br /&gt;
* [[Floyd-Warshall]]&lt;br /&gt;
* [[Union Find]]&lt;br /&gt;
* [[A*]]&lt;br /&gt;
* [[Alternating paths algorithm]]&lt;br /&gt;
* [[Johnson]]&lt;br /&gt;
* [[Union-find with disjoint trees: find]]&lt;br /&gt;
* [[Union-find with lists: unite]]&lt;br /&gt;
* [[Max-flow min-cut]]&lt;br /&gt;
&lt;br /&gt;
=== Flow Algorithms ===&lt;br /&gt;
* [[Ford-Fulkerson]]&lt;br /&gt;
=== Abstract Data Structures ===&lt;br /&gt;
*[[Network Structures]]&lt;br /&gt;
**[[Graph]]&lt;br /&gt;
**[[Tree]]&lt;br /&gt;
*[[Sequence]]&lt;br /&gt;
**[[Sorted sequence]]&lt;br /&gt;
**[[Bounded priority queue]]&lt;br /&gt;
**[[Linear sequence]]&lt;br /&gt;
**[[Priority queue]]&lt;br /&gt;
**[[Sorted sequence]]&lt;br /&gt;
=== Implementations of Abstract Data Structures  ===&lt;br /&gt;
* [[Linked list]]&lt;br /&gt;
* [[Array list]]&lt;br /&gt;
* [[Binary search tree]]&lt;br /&gt;
* [[Doubly-linked list]]&lt;br /&gt;
* [[Heap as array]] (DONE (Heap as Array))&lt;br /&gt;
* [[Hashtable]]&lt;br /&gt;
* [[Multi-way search tree]]&lt;br /&gt;
* [[Red-black tree]]&lt;br /&gt;
* [[B-tree]]&lt;br /&gt;
&lt;br /&gt;
=== ??? ===&lt;br /&gt;
* [[Min-Max Heaps]]&lt;br /&gt;
* [[First In - First Out]]&lt;br /&gt;
* [[First In - Last Out]]&lt;br /&gt;
* [[Directed Tree]]&lt;br /&gt;
* [[Decision Tree]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* [[Model computer]]&lt;br /&gt;
&lt;br /&gt;
=== Other Algorithms (LOCKED) ===&lt;br /&gt;
* [[B*]]&lt;br /&gt;
* [[Cyclic redundancy check]]&lt;br /&gt;
* [[Euclid]]&lt;br /&gt;
* [[Gauss]]&lt;br /&gt;
* [[Discrete fourier transform]]&lt;br /&gt;
* [[Fast fourier transform]]&lt;br /&gt;
* [[Bresenham]]&lt;br /&gt;
* [[Round robin]]&lt;br /&gt;
* [[Seperate and conquer]]&lt;br /&gt;
* [[Message-Digest algorithm]]&lt;br /&gt;
* [[Secure hash algorithm]]&lt;br /&gt;
* [[Sequent calculus]]&lt;br /&gt;
* [[Resolution calculus]]&lt;br /&gt;
* [[Cocke-Younger-Kasami algorithm]]&lt;br /&gt;
* [[Distance vector routing]]&lt;br /&gt;
* [[Link state routing]]&lt;br /&gt;
* [[Z Buffer algorithm]]&lt;br /&gt;
* [[Marching squares]]&lt;br /&gt;
* [[Marching cubes]]&lt;br /&gt;
* [[Bottom-Up heapsort]]&lt;br /&gt;
* [[Radixsort]]&lt;br /&gt;
* [[Median cut]]&lt;br /&gt;
* [[Pancake sorting]]&lt;br /&gt;
* [[Karnaugh-Veitch diagramm]]&lt;br /&gt;
* [[Delanuay triangulation]]&lt;br /&gt;
* [[Backtracking]]&lt;br /&gt;
* [[Alpha–beta pruning]]&lt;br /&gt;
* [[Beam search]]&lt;br /&gt;
* [[Best-first search]]&lt;br /&gt;
* [[Bidirectional search]]&lt;br /&gt;
* [[Borůvka's algorithm]]&lt;br /&gt;
* [[Branch and bound]]&lt;br /&gt;
* [[D*]]&lt;br /&gt;
* [[Depth-limited search]]&lt;br /&gt;
* [[Edmonds' algorithm]]&lt;br /&gt;
* [[Fringe search]]&lt;br /&gt;
* [[Hill climbing]]&lt;br /&gt;
* [[IDA*]]&lt;br /&gt;
* [[Iterative deepening depth-first search]]&lt;br /&gt;
* [[Jump point search]]&lt;br /&gt;
* [[Lexicographic breadth-first search]]&lt;br /&gt;
* [[SMA*]]&lt;br /&gt;
* [[Uniform-cost search]]&lt;br /&gt;
&lt;br /&gt;
=== Other Data Structures (LOCKED) ===&lt;br /&gt;
* [[Adelson-Velskii and Landis' tree]]&lt;br /&gt;
* [[Patricia-Trie]]&lt;br /&gt;
* [[Suffix Tree]]&lt;br /&gt;
* [[Huffmann Tree]]&lt;br /&gt;
* [[Binary Expression Tree]]&lt;br /&gt;
* [[Hash Set]]&lt;br /&gt;
* [[Incidence Matrix]]&lt;br /&gt;
* [[Voronoi Diagramm]]&lt;br /&gt;
* [[Quad Tree]]&lt;br /&gt;
* [[Oct Tree]]&lt;br /&gt;
* [[kd Tree]]&lt;br /&gt;
* [[Binary space partitioning]]&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Classical_eulerian_cycle_algorithm&amp;diff=2068</id>
		<title>Classical eulerian cycle algorithm</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Classical_eulerian_cycle_algorithm&amp;diff=2068"/>
		<updated>2014-11-11T18:50:02Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Nikolaus.png|400px|thumb|right|Another may well know example with 44 solutions]]&lt;br /&gt;
&lt;br /&gt;
== General information ==&lt;br /&gt;
&lt;br /&gt;
'''Algorithmic problem:''' [[Eulerian cycle]]&lt;br /&gt;
&lt;br /&gt;
''' Type of algorithm:''' recursion with an arbitrarily chosen start node &amp;lt;math&amp;gt;s\in V&amp;lt;/math&amp;gt; as an additional input. Before the proper recursive procedure is invoked, the output sequence &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is initialized so as to contain the start node &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and nothing else.&lt;br /&gt;
&lt;br /&gt;
'''Break condition:''' No edges/arcs leave the start node &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; of that recursive call.&lt;br /&gt;
&lt;br /&gt;
== Induction basis ==&lt;br /&gt;
&lt;br /&gt;
'''Abstract view:''' Nothing to do.&lt;br /&gt;
&lt;br /&gt;
== Induction step ==&lt;br /&gt;
&lt;br /&gt;
For notational convenience, both undirected edges and directed arcs are denoted by parentheses in the following (in the direction in which they are looked at).&lt;br /&gt;
&lt;br /&gt;
# Let &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; be a (dynamically growing) path, represented in &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; as an alternating sequence of nodes and edges/arcs.&lt;br /&gt;
# Initialize &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; so as to contain &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and nothing else.&lt;br /&gt;
# Set &amp;lt;math&amp;gt;x:=s&amp;lt;/math&amp;gt;.&lt;br /&gt;
# While there are edges/arcs leaving &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;:&lt;br /&gt;
## Choose one such arc &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt;.&lt;br /&gt;
## Remove &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; from the graph.&lt;br /&gt;
## Append &amp;lt;math&amp;gt;(x,y)&amp;lt;/math&amp;gt; and then &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;.&lt;br /&gt;
## Set &amp;lt;math&amp;gt;x:=y&amp;lt;/math&amp;gt;.&lt;br /&gt;
# If &amp;lt;math&amp;gt;x\neq s&amp;lt;/math&amp;gt;, terminate the algorithm with the statement that no eulerian cycle exists.&lt;br /&gt;
# Otherwise: For each node &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; that still has leaving edges/arcs,:&lt;br /&gt;
## Call the procedure recursively with &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; as the start node, giving path &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt;.&lt;br /&gt;
## Replace &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Correctness ==&lt;br /&gt;
&lt;br /&gt;
Since each edge/arc is removed immediately when it is processed, no edge/arc occurs twice in the output. Obviously, steps 4.3 and 6.2 ensure that the order in which the nodes and edges/arcs occur in the output yields a correct path. Obviously, whenever step 4 is finished, it is &amp;lt;math&amp;gt;x=s&amp;lt;/math&amp;gt; and the remaining graph is eulerian, if the original graph was eulerian. Consequently, the statement that no eulerian cycle exists is only delivered if the graph is indeed non-eulerian. Moreover, the graph handed over to a recursive call is Eulerian, if the original graph was Eulerian.&lt;br /&gt;
&lt;br /&gt;
Suppose for a contradiction that some edge/arc &amp;lt;math&amp;gt;e/a&amp;lt;/math&amp;gt; is '''not''' in the output. Since the graph is (strongly) connected, there is a path &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; from the start node to the tail of &amp;lt;math&amp;gt;e/a&amp;lt;/math&amp;gt; (an arbitrary endnode of &amp;lt;math&amp;gt;e/a&amp;lt;/math&amp;gt; in the undirected case). Let &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; be the last node on &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; processed by any recursive call. Then the subsequent edge/arc on &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt; has not been processed, which contradicts the procedure.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:'''&lt;br /&gt;
Both for directed and undirected graphs, the asymtptotic complexity is linear in the number of edges/ars.&lt;br /&gt;
&lt;br /&gt;
'''Proof:'''&lt;br /&gt;
We assume that all data structures are implemented in the obvious appropriate way. First note that steps 1, 2, 3, and 5 take constant time each. So the total complexity of these steps is linear in the number of recursive calls, which is linear in the number of edges/arcs in turn. The total number of iterations of steps 4 and 6, respectively, taken over all recursive calls, is linear in the number of edges/arcs as well.&lt;br /&gt;
&lt;br /&gt;
'''Remarks:'''&lt;br /&gt;
# Since the graph is (strongly) connected, the number of nodes is asymptotically dominated by the number of edges/arcs and, therefore, irrelevant here.&lt;br /&gt;
# Of course, the edges/arcs need not be removed permanently. However, when an edge/arc is processed, it must be hidden from the algorithm up to its termination to achieve the linear bound on the complexity. A boolean edge/arc label to indicate whether this edge/arc has already been processed, does not suffice.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Eulerpath_1.png|Step 1&lt;br /&gt;
File:Eulerpath_2.png|Step 2&lt;br /&gt;
File:Eulerpath_3.png|Step 3&lt;br /&gt;
File:Eulerpath_4.png|Step 4&lt;br /&gt;
File:Eulerpath_5.png|Step 5&lt;br /&gt;
File:Eulerpath_6.png|Step 6&lt;br /&gt;
File:Eulerpath_7.png|Step 7&lt;br /&gt;
File:Eulerpath_8.png|Step 8&lt;br /&gt;
File:Eulerpath_9.png|Step 9&lt;br /&gt;
File:Eulerpath_10.png|Step 10&lt;br /&gt;
File:Eulerpath_11.png|Final Step&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Main_Page&amp;diff=2067</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Main_Page&amp;diff=2067"/>
		<updated>2014-11-11T18:37:37Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: /* Other Algorithms (LOCKED) */  euclid instead of eulcid&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== News ==&lt;br /&gt;
* The http://wiki.algo.informatik.tu-darmstadt.de domain will forward to this page from 13th October.&lt;br /&gt;
* The old wiki will be reachable at http://huffmann.algo.informatik.tu-darmstadt.de/wiki/&lt;br /&gt;
* &amp;lt;math&amp;gt;LaTeX&amp;lt;/math&amp;gt; [http://www.mediawiki.org/wiki/Manual:Math available now!]&lt;br /&gt;
* ToDo List added&lt;br /&gt;
* Every content has to be in English!&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi Syntaxhighlight]&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
* Add finalized reconstructions of the old Wiki to Category:Checkup.&lt;br /&gt;
* Don't any non-Weihe content until the reconstructions isn't finished.&lt;br /&gt;
* Keep your active reconstructing Pages in &amp;quot;Division of labor&amp;quot; section up to date!&lt;br /&gt;
&lt;br /&gt;
'''Look here for short/uncomplete Pages''' [[Special:ShortPages]]&lt;br /&gt;
&lt;br /&gt;
== Page Status ==&lt;br /&gt;
Final: [[:Category:Checkup]]&lt;br /&gt;
&lt;br /&gt;
== To Do ==&lt;br /&gt;
=== Notations ===&lt;br /&gt;
* [[Big O notation]]&lt;br /&gt;
* [[L' Hospital]]&lt;br /&gt;
* [[Master theorem]]&lt;br /&gt;
&lt;br /&gt;
=== Problems ===&lt;br /&gt;
* [[Maximum matching problem]]&lt;br /&gt;
* [[Max-Flow Problems]]&lt;br /&gt;
* [[Min-Cost Flow Problems]]&lt;br /&gt;
* [[Shortest Paths Problems]]&lt;br /&gt;
** [[All pairs shortest paths]]&lt;br /&gt;
*** [[Floyd-Warshall]]&lt;br /&gt;
*** [[Bellman-Ford]] (DONE)&lt;br /&gt;
*** [[Shortest paths by repeated squaring]] (variant of Bellman-Ford) &lt;br /&gt;
** [[Single source shortest paths]]&lt;br /&gt;
*** [[Dijkstra]]&lt;br /&gt;
** [[Single source single target shortest paths]]&lt;br /&gt;
*** [[A*]]&lt;br /&gt;
* [[Maximum spanning forest]]&lt;br /&gt;
* [[Problems on Sequences]]&lt;br /&gt;
** [[Basic Problems on Sequences]]&lt;br /&gt;
*** [[Find an element in a sequence]] (DONE)&lt;br /&gt;
*** [[Insert an element in a sequence]] (Empty in old wiki?!)&lt;br /&gt;
*** [[Median]] (DONE)&lt;br /&gt;
*** [[Merging two sorted sequences]] (DONE)&lt;br /&gt;
** [[Pattern Matching]]&lt;br /&gt;
*** [[One-dimensional string matching]] (DONE)&lt;br /&gt;
*** [[String matching]] (DONE)&lt;br /&gt;
** [[Sorting]]&lt;br /&gt;
*** [[Sorting based on pairwise comparison]] (DONE)&lt;br /&gt;
*** [[Sorting Sequences of Strings]] (DONE)&lt;br /&gt;
&lt;br /&gt;
=== Coding Basics ===&lt;br /&gt;
* [[Inheritance]]&lt;br /&gt;
* [[Generics]]&lt;br /&gt;
* [[Collections]]&lt;br /&gt;
** [[Iterator]]&lt;br /&gt;
** [[Comparator]]&lt;br /&gt;
&lt;br /&gt;
=== String Matching Algorithms ===&lt;br /&gt;
* [[Simple string matching algorithm]] (DONE)&lt;br /&gt;
* [[String matching based on finite automaton]] (DONE)&lt;br /&gt;
&lt;br /&gt;
=== Sorting Algorithms ===&lt;br /&gt;
* [[Bubble]]&lt;br /&gt;
* [[Insertion sort]]&lt;br /&gt;
* [[Quicksort]]&lt;br /&gt;
* [[Bubblesort]]&lt;br /&gt;
* [[Mergesort]]&lt;br /&gt;
* [[Bucketsort]]&lt;br /&gt;
* [[Selection sort]]&lt;br /&gt;
* [[Bogosort]]&lt;br /&gt;
&lt;br /&gt;
=== Search Algorithms ===&lt;br /&gt;
* [[Binary search]]&lt;br /&gt;
&lt;br /&gt;
=== Auxillary Algorithms ===&lt;br /&gt;
* [[Pivot partitioning by scanning]]&lt;br /&gt;
&lt;br /&gt;
=== Manipulation ===&lt;br /&gt;
* [[Array list: find]]&lt;br /&gt;
* [[Array list: find at position]]&lt;br /&gt;
* [[Array list: insert at head]]&lt;br /&gt;
* [[Array list: insert at position]]&lt;br /&gt;
* [[Array list: number]]&lt;br /&gt;
* [[Array list: remove]]&lt;br /&gt;
* [[Doubly-linked list: insert at position]]&lt;br /&gt;
* [[Doubly-linked list: insert at tail]]&lt;br /&gt;
* [[Doubly-linked list: remove]]&lt;br /&gt;
* [[Find element in sequence iteratively]]&lt;br /&gt;
* [[Find element in sequence recursively]]&lt;br /&gt;
* [[Hashtable: find]]&lt;br /&gt;
* [[Hashtable: insert]]&lt;br /&gt;
&lt;br /&gt;
=== Tree Algorithms ===&lt;br /&gt;
* [[Depth-first search]]&lt;br /&gt;
* [[Breadth-first search]]&lt;br /&gt;
* [[B-tree: find]]&lt;br /&gt;
* [[B-tree: minimum]]&lt;br /&gt;
* [[B-tree: maximum]]&lt;br /&gt;
* [[B-tree: insert]]&lt;br /&gt;
* [[B-tree: insert and rearrange]]&lt;br /&gt;
* [[B-tree: merge two siblings]]&lt;br /&gt;
* [[B-tree: remove]]&lt;br /&gt;
* [[B-tree: shift key to sibling]]&lt;br /&gt;
* [[B-tree: rotate]]&lt;br /&gt;
* [[B-tree: merge]]&lt;br /&gt;
* [[B-tree: split]]&lt;br /&gt;
* [[Binary search tree: find]]&lt;br /&gt;
* [[Binary search tree: minimum]]&lt;br /&gt;
* [[Binary search tree: maximum]]&lt;br /&gt;
* [[Binary search tree: insert]]&lt;br /&gt;
* [[Binary search tree: remove]]&lt;br /&gt;
* [[Binary search tree: remove node]]&lt;br /&gt;
* [[Binary search tree: traverse]]&lt;br /&gt;
&lt;br /&gt;
=== Graph Theory ===&lt;br /&gt;
* [[Directed graph]]&lt;br /&gt;
* [[Bipartite graph|Bipartite graph]] (DONE)&lt;br /&gt;
* [[k-partite graph]]&lt;br /&gt;
* [[Negative paths]]&lt;br /&gt;
&lt;br /&gt;
=== Graph Algorithms ===&lt;br /&gt;
* [[Dijkstra]]&lt;br /&gt;
* [[Kruskal]]&lt;br /&gt;
* [[Prim]]&lt;br /&gt;
* [[Bellman-Ford]] (DONE)&lt;br /&gt;
* [[Floyd-Warshall]]&lt;br /&gt;
* [[Union Find]]&lt;br /&gt;
* [[A*]]&lt;br /&gt;
* [[Alternating paths algorithm]]&lt;br /&gt;
* [[Johnson]]&lt;br /&gt;
* [[Union-find with disjoint trees: find]]&lt;br /&gt;
* [[Union-find with lists: unite]]&lt;br /&gt;
* [[Max-flow min-cut]]&lt;br /&gt;
&lt;br /&gt;
=== Flow Algorithms ===&lt;br /&gt;
* [[Ford-Fulkerson]]&lt;br /&gt;
=== Abstract Data Structures ===&lt;br /&gt;
*[[Network Structures]]&lt;br /&gt;
**[[Graph]]&lt;br /&gt;
**[[Tree]]&lt;br /&gt;
*[[Sequence]]&lt;br /&gt;
**[[Sorted sequence]]&lt;br /&gt;
**[[Bounded priority queue]]&lt;br /&gt;
**[[Linear sequence]]&lt;br /&gt;
**[[Priority queue]]&lt;br /&gt;
**[[Sorted sequence]]&lt;br /&gt;
=== Implementations of Abstract Data Structures  ===&lt;br /&gt;
* [[Linked list]]&lt;br /&gt;
* [[Array list]]&lt;br /&gt;
* [[Binary search tree]]&lt;br /&gt;
* [[Doubly-linked list]]&lt;br /&gt;
* [[Heap as array]] (DONE (Heap as Array))&lt;br /&gt;
* [[Hashtable]]&lt;br /&gt;
* [[Multi-way search tree]]&lt;br /&gt;
* [[Red-black tree]]&lt;br /&gt;
* [[B-tree]]&lt;br /&gt;
&lt;br /&gt;
=== ??? ===&lt;br /&gt;
* [[Min-Max Heaps]]&lt;br /&gt;
* [[First In - First Out]]&lt;br /&gt;
* [[First In - Ieast Out]]&lt;br /&gt;
* [[Directed Tree]]&lt;br /&gt;
* [[Decision Tree]]&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* [[Model computer]]&lt;br /&gt;
&lt;br /&gt;
=== Other Algorithms (LOCKED) ===&lt;br /&gt;
* [[B*]]&lt;br /&gt;
* [[Cyclic redundancy check]]&lt;br /&gt;
* [[Euclid]]&lt;br /&gt;
* [[Gauss]]&lt;br /&gt;
* [[Discrete fourier transform]]&lt;br /&gt;
* [[Fast fourier transform]]&lt;br /&gt;
* [[Bresenham]]&lt;br /&gt;
* [[Round robin]]&lt;br /&gt;
* [[Seperate and conquer]]&lt;br /&gt;
* [[Message-Digest algorithm]]&lt;br /&gt;
* [[Secure hash algorithm]]&lt;br /&gt;
* [[Sequent calculus]]&lt;br /&gt;
* [[Resolution calculus]]&lt;br /&gt;
* [[Cocke-Younger-Kasami algorithm]]&lt;br /&gt;
* [[Distance vector routing]]&lt;br /&gt;
* [[Link state routing]]&lt;br /&gt;
* [[Z Buffer algorithm]]&lt;br /&gt;
* [[Marching squares]]&lt;br /&gt;
* [[Marching cubes]]&lt;br /&gt;
* [[Bottom-Up heapsort]]&lt;br /&gt;
* [[Radixsort]]&lt;br /&gt;
* [[Median cut]]&lt;br /&gt;
* [[Pancake sorting]]&lt;br /&gt;
* [[Karnaugh-Veitch diagramm]]&lt;br /&gt;
* [[Delanuay triangulation]]&lt;br /&gt;
* [[Backtracking]]&lt;br /&gt;
* [[Alpha–beta pruning]]&lt;br /&gt;
* [[Beam search]]&lt;br /&gt;
* [[Best-first search]]&lt;br /&gt;
* [[Bidirectional search]]&lt;br /&gt;
* [[Borůvka's algorithm]]&lt;br /&gt;
* [[Branch and bound]]&lt;br /&gt;
* [[D*]]&lt;br /&gt;
* [[Depth-limited search]]&lt;br /&gt;
* [[Edmonds' algorithm]]&lt;br /&gt;
* [[Fringe search]]&lt;br /&gt;
* [[Hill climbing]]&lt;br /&gt;
* [[IDA*]]&lt;br /&gt;
* [[Iterative deepening depth-first search]]&lt;br /&gt;
* [[Jump point search]]&lt;br /&gt;
* [[Lexicographic breadth-first search]]&lt;br /&gt;
* [[SMA*]]&lt;br /&gt;
* [[Uniform-cost search]]&lt;br /&gt;
&lt;br /&gt;
=== Other Data Structures (LOCKED) ===&lt;br /&gt;
* [[Adelson-Velskii and Landis' tree]]&lt;br /&gt;
* [[Patricia-Trie]]&lt;br /&gt;
* [[Suffix Tree]]&lt;br /&gt;
* [[Huffmann Tree]]&lt;br /&gt;
* [[Binary Expression Tree]]&lt;br /&gt;
* [[Hash Set]]&lt;br /&gt;
* [[Incidence Matrix]]&lt;br /&gt;
* [[Voronoi Diagramm]]&lt;br /&gt;
* [[Quad Tree]]&lt;br /&gt;
* [[Oct Tree]]&lt;br /&gt;
* [[kd Tree]]&lt;br /&gt;
* [[Binary space partitioning]]&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Binary_search&amp;diff=2066</id>
		<title>Binary search</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Binary_search&amp;diff=2066"/>
		<updated>2014-11-11T12:19:55Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: new&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Binary search ==&lt;br /&gt;
'''Algorithmic problem:''' [[Sorted sequence: find]]&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites:''' The linear sequence S(length n) must be well-ordered and sorted by the same key&lt;br /&gt;
&lt;br /&gt;
'''Type of algorithm:''' loop&lt;br /&gt;
&lt;br /&gt;
'''Auxiliary data:''' A pointer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; of type &amp;quot;pointer to list item of array lists of component type &amp;lt;math&amp;gt;\Kappa&amp;lt;/math&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Abstract view ==&lt;br /&gt;
&lt;br /&gt;
'''Invariant:''' After &amp;lt;math&amp;gt;i \ge 0&amp;lt;/math&amp;gt; iterations:&lt;br /&gt;
# The pointer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; points to the sequence at position &amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;&lt;br /&gt;
#The key &amp;lt;math&amp;gt;\Kappa &amp;lt;/math&amp;gt; is in the range of &amp;lt;math&amp;gt;[k_i-n/2^i, k_i +n/2^i]&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Variant:''' The pointer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; is moved so the sequence item at the position (rounded) &amp;lt;math&amp;gt;(k_i+k_{i-1})/2&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;k_0=0 if S[n/2]&amp;lt;\Kappa,k_0=n if S[n/2]&amp;gt;\Kappa  &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Break condition:''' Either &amp;lt;math&amp;gt;S[k_i]=\Kappa&amp;lt;/math&amp;gt; or, otherwise, &amp;lt;math&amp;gt;k_i=k_{i+1} with S[k_i]\neq \Kappa&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Induction basis == &lt;br /&gt;
&lt;br /&gt;
'''Abstract view:''' Set &amp;lt;math&amp;gt;p:=&amp;lt;/math&amp;gt; n/2.&lt;br /&gt;
&lt;br /&gt;
'''Implementation:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' Nothing to show.&lt;br /&gt;
&lt;br /&gt;
== Induction step ==&lt;br /&gt;
&lt;br /&gt;
'''Abstract view:'''&lt;br /&gt;
 If p points to a node but not with key K, p descends in the appropriate direction, left or right.&lt;br /&gt;
'''Implementation:'''&lt;br /&gt;
&lt;br /&gt;
#If &amp;lt;math&amp;gt;p.key = K&amp;lt;/math&amp;gt;, terminate the algorithm and return '''''true'''''.&lt;br /&gt;
# Otherwise:&lt;br /&gt;
## If &amp;lt;math&amp;gt;K &amp;lt; p.key&amp;lt;/math&amp;gt;, set &amp;lt;math&amp;gt;p &amp;lt;/math&amp;gt; to the sequence element &amp;lt;math&amp;gt;k_{i+1}=k_i-n/2^i&amp;lt;/math&amp;gt;.&lt;br /&gt;
## If &amp;lt;math&amp;gt;K &amp;gt; p.key&amp;lt;/math&amp;gt;, set &amp;lt;math&amp;gt;p &amp;lt;/math&amp;gt;to the sequence element &amp;lt;math&amp;gt;k_{i+1}=k_i-n/2^i&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Correctnes:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:''' Log(n)&lt;br /&gt;
&lt;br /&gt;
'''Proff:''' Obvious.&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Array_list:_find&amp;diff=1965</id>
		<title>Array list: find</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Array_list:_find&amp;diff=1965"/>
		<updated>2014-11-10T11:56:24Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Algorithmic problem:''' [[Linear sequence: find]]&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites:''' None.&lt;br /&gt;
&lt;br /&gt;
'''Type of algorithm:''' loop&lt;br /&gt;
&lt;br /&gt;
'''Auxiliary data:''' A pointer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; of type &amp;quot;pointer to list item of array lists of component type &amp;lt;math&amp;gt;\Kappa&amp;lt;/math&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Abstract view ==&lt;br /&gt;
&lt;br /&gt;
'''Invariant:''' After &amp;lt;math&amp;gt;i \ge 0&amp;lt;/math&amp;gt; iterations:&lt;br /&gt;
# The pointer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; points to the list item at position &amp;lt;math&amp;gt;i + 1&amp;lt;/math&amp;gt; (or is void if no such item exists).&lt;br /&gt;
# The first &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; arrays in the list do not contain &amp;lt;math&amp;gt;\Kappa&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Variant:''' The pointer &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; is moved one step forward to the next array list item.&lt;br /&gt;
&lt;br /&gt;
'''Break condition:''' Either &amp;lt;math&amp;gt;p=&amp;lt;/math&amp;gt;void or, otherwise, &amp;lt;math&amp;gt;\Kappa \in \{p.A[1], \ldots, p.A[p.n]\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Induction basis == &lt;br /&gt;
&lt;br /&gt;
'''Abstract view:''' Set &amp;lt;math&amp;gt;p:=&amp;lt;/math&amp;gt; first.&lt;br /&gt;
&lt;br /&gt;
'''Implementation:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' Nothing to show.&lt;br /&gt;
&lt;br /&gt;
== Induction step ==&lt;br /&gt;
&lt;br /&gt;
'''Abstract view:'''&lt;br /&gt;
# Terminate the algorithm if the end of the list is reached or, otherwise, if &amp;lt;math&amp;gt;\Kappa&amp;lt;/math&amp;gt; is found in the current array.&lt;br /&gt;
# Otherwise, &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; is moved one step forward to the next array.&lt;br /&gt;
&lt;br /&gt;
'''Implementation:'''&lt;br /&gt;
# If &amp;lt;math&amp;gt;p=&amp;lt;/math&amp;gt;void, terminate the algorithm and return &amp;lt;math&amp;gt;false&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Otherwise, if &amp;lt;math&amp;gt;p.A[j] = \Kappa&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;j \in \{1, \ldots, p.n\}&amp;lt;/math&amp;gt;, set &amp;lt;math&amp;gt;p:=p.next&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Correctness:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:''' Linear in the length of the sequence in the worst case.&lt;br /&gt;
&lt;br /&gt;
'''Proff:''' Obvious.&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=L%27_Hospital&amp;diff=1639</id>
		<title>L' Hospital</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=L%27_Hospital&amp;diff=1639"/>
		<updated>2014-10-29T22:43:33Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: Created page with &amp;quot;A central rule for the determination of the limit of series is the rule of L'Hospital. After several forming steps it might be that the rest of your sequels or functions can b...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A central rule for the determination of the limit of series is the rule of L'Hospital. After several forming steps it might be that the rest of your sequels or functions can be represented as a fraction, e.g. &amp;lt;math&amp;gt;\lim_{x\rightarrow 0}\frac{sin(x)}{x}&amp;lt;/math&amp;gt;. It is known that devisions with zero are forbidden or not definied. &lt;br /&gt;
&lt;br /&gt;
The '''rule of L'Hospital''' allows us to determine the limit value of a term &amp;lt;math&amp;gt;\lim_{x\rightarrow x_0} \dfrac{ f(x)}{g(x)}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;g(x)&amp;lt;/math&amp;gt; are sequels(or functions), either both have the limit zero or infintity. &lt;br /&gt;
&lt;br /&gt;
Normally, it is not solvable what the limit of the fraction is, because in math limits of &amp;lt;math&amp;gt;\frac{0}{0} &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\frac{\infty}{\infty}&amp;lt;/math&amp;gt; are not defined.&lt;br /&gt;
The rule of L'Hospital says, that you can replace the functions with their derivative. So basicly in formula:&lt;br /&gt;
&amp;lt;math&amp;gt;\lim_{x\rightarrow x_0}  \dfrac{ f(x)}{g(x)} \overset{l'H}{=} \lim_{x\rightarrow x_0} \dfrac{ f'(x)}{g'(x)}&amp;lt;/math&amp;gt;,&lt;br /&gt;
if and only if &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt; are derivable and have the same limit if &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; goes to &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
''Remark 1:'' Don't try to make a derivative of the whole fraction! &lt;br /&gt;
&lt;br /&gt;
''Remark 2:'' If it is neccessary and the functions are continous derivable enough you can reapply L'Hospital until the fraction has a known limit (you have to check on every step if the single limits are equal!).&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Edmonds-Karp&amp;diff=1624</id>
		<title>Edmonds-Karp</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Edmonds-Karp&amp;diff=1624"/>
		<updated>2014-10-29T11:58:19Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: fleasible-&amp;gt;feasible&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Information ==&lt;br /&gt;
&lt;br /&gt;
'''Algorithmic problem:''' [[Max-Flow Problems#Standard version|Max-flow problems (standard version)]]&lt;br /&gt;
&lt;br /&gt;
'''Algorithm :''' This is a specialization of [[Ford-Fulkerson]]: Among all flow-augmenting &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-paths, always choose one with smallest number of arcs.&lt;br /&gt;
&lt;br /&gt;
== Abstract View ==&lt;br /&gt;
&lt;br /&gt;
'''Invariant:'''&lt;br /&gt;
After &amp;lt;math&amp;gt;i \ge 0&amp;lt;/math&amp;gt; iterations:&lt;br /&gt;
# The flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is a feasible flow.&lt;br /&gt;
# If all upper bounds are integral, &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is integral as well.&lt;br /&gt;
&lt;br /&gt;
'''Notation:'''&lt;br /&gt;
For an &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-flow, let &amp;lt;math&amp;gt;A_f&amp;lt;/math&amp;gt; denote the set of all arcs that belong to at least one flow-augmenting &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path with smallest number of arcs.&lt;br /&gt;
&lt;br /&gt;
'''Variant:'''&lt;br /&gt;
# The smallest number of arcs on a flow-aumenting &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path increases (non-strictly) monotonously.&lt;br /&gt;
# Whenever that number does ''not'' decrease in an iteration, the size of &amp;lt;math&amp;gt;A_f&amp;lt;/math&amp;gt; decreases.&lt;br /&gt;
&lt;br /&gt;
'''Break condition:''' There is no flow-augumenting path.&lt;br /&gt;
&lt;br /&gt;
== Correctness ==&lt;br /&gt;
&lt;br /&gt;
See [[Ford-Fulkerson#Correctness|Ford-Fulkerson]].&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:'''&lt;br /&gt;
Even if the upper bounds are not integral, the asymptotic complexity is in &amp;lt;math&amp;gt;\mathcal{O}(nm^2)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n=|V|&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;m=|A|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Proof:'''&lt;br /&gt;
If the variant is fulfilled, the smallest number of arcs on a flow-augmenting path strictly increases after at most &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; iterations. This number is positive, but cannot be larger than &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;. Hence, the total number of iterations is in &amp;lt;math&amp;gt;\mathcal{O}(nm)&amp;lt;/math&amp;gt;. The claim then follows from the fact that the complexity of an iteration is linear in the number of arcs. Therefore, it suffices to show that the variant is fulfilled.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; be the flow-augmenting path in the current iteration, and let &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; be the number of arcs on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;; in other words, the minimum number of arcs of a flow-augmenting &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path with respect to the current flow. At least one arc of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; is being saturated in this iteration and, thus, not on any flow-augmenting path anymore. Therefore, it remains to show that augmenting the flow along &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; according to [[Ford-Fulkerson]] does not create new flow-augmenting paths of length &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; or less than &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A new flow-augmenting &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path can only be created by an arc of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; that fulfills one of the following two conditions immediately before the current iteration:&lt;br /&gt;
# A forward arc &amp;lt;math&amp;gt;(v,w)\in A&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;f(v,w)=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
# A backward arc &amp;lt;math&amp;gt;(w,v)\in A&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;f(w,v)=u(w,v)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose a new flow-augmenting path &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt; has been created. We have to show that &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt; has more than &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; arcs. Note that &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt; contains &amp;lt;math&amp;gt;r\geq 1&amp;lt;/math&amp;gt; arcs that fall into one of the two cases above. For notational convenience (to get rid of that case distinction), we assume without loss of generality that all of these arcs are backward arcs; the treatment of forward arcs is perfectly analogous. So let &amp;lt;math&amp;gt;(w_1,v_1),\ldots,(w_r,v_r)&amp;lt;/math&amp;gt; denote these arcs, in the order in which they appear on &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt; (not necessarily the order in which they appear on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;). For notational convenience, let &amp;lt;math&amp;gt;v_0:=s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;w_{r+1}:=t&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;i\in\{0,\ldots,r\}&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; denote the subpath of &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;v_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;w_{i+1}&amp;lt;/math&amp;gt;. Now, for all paths &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;v_{i+1}&amp;lt;/math&amp;gt; appears after &amp;lt;math&amp;gt;w_i&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, the specific choice of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; to have a minimum number of arcs implies that &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; does not have fewer arcs than the subpath of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;w_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;v_{i+1}&amp;lt;/math&amp;gt;. For the other subpaths &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt;, it suffices to note the trivial fact that the number of arcs on &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; is not negative. So, summing up the numbers of arcs on all &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; and adding the number &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; of arcs &amp;lt;math&amp;gt;(w_i,v_i)&amp;lt;/math&amp;gt; to get the number of arcs on &amp;lt;math&amp;gt;p'&amp;lt;/math&amp;gt; proves the claim.&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
	<entry>
		<id>https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Ford-Fulkerson&amp;diff=1623</id>
		<title>Ford-Fulkerson</title>
		<link rel="alternate" type="text/html" href="https://wiki.algo.informatik.tu-darmstadt.de/index.php?title=Ford-Fulkerson&amp;diff=1623"/>
		<updated>2014-10-29T11:57:39Z</updated>

		<summary type="html">&lt;p&gt;Pezi22: aus fleasible das erste l für die Rechtschreibung gelöscht&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General information ==&lt;br /&gt;
&lt;br /&gt;
'''Algorithmic problem:''' [[Max-Flow Problems#Standard version|Max-flow problems (standard version)]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Type of algorithm:''' loop&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Abstract view ==&lt;br /&gt;
&lt;br /&gt;
'''Invariant:'''&lt;br /&gt;
After &amp;lt;math&amp;gt;i \ge 0&amp;lt;/math&amp;gt; iterations:&lt;br /&gt;
# The flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is a feasible flow.&lt;br /&gt;
# If all upper bounds are integral, &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is integral as well.&lt;br /&gt;
&lt;br /&gt;
'''Variant:''' The value of &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; increases.&lt;br /&gt;
&lt;br /&gt;
'''Break condition:''' There is no flow-augumenting path.&lt;br /&gt;
&lt;br /&gt;
== Induction basis ==&lt;br /&gt;
'''Abstract view:''' We start with some feasible flow, for example, the zero flow.&lt;br /&gt;
&lt;br /&gt;
'''Implementation:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' Obvious.&lt;br /&gt;
&lt;br /&gt;
== Induction step ==&lt;br /&gt;
'''Abstract view:''' Find a [[Basic flow definitions#Flow-augmenting path|flow-augmenting path]] and increase &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; along this path by the maximal value such that the flow value of each &amp;lt;math&amp;gt;a\in A&amp;lt;/math&amp;gt; remains in the interval &amp;lt;math&amp;gt;[0,...,u(a)]&amp;lt;/math&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Implementation:'''&lt;br /&gt;
# Apply a [[Graph traversal|graph traversal]] algorithm from &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
## If &amp;lt;math&amp;gt;f(v,w)&amp;lt;c(v,w)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(v,w)\in A&amp;lt;/math&amp;gt; can be used for going forward in the direction &amp;lt;math&amp;gt;v \rightarrow w&amp;lt;/math&amp;gt;;&lt;br /&gt;
## If &amp;lt;math&amp;gt;f(v,w)&amp;gt;0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(v,w)\in A&amp;lt;/math&amp;gt;  can be used for going forward in the direction &amp;lt;math&amp;gt; w\rightarrow v&amp;lt;/math&amp;gt;; .&lt;br /&gt;
# Terminate this graph traversal once either &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; is seen or all reachable nodes were seen (whatever occurs first).&lt;br /&gt;
# In the latter case, the break condition applies and the loop is terminated.&lt;br /&gt;
# Otherwise,&lt;br /&gt;
## Let &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; denote the current path of the traversal (which is an &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path in this case).&lt;br /&gt;
## Let &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; denote the minimum of the values &amp;lt;math&amp;gt;c(a)-f(a)&amp;lt;/math&amp;gt; on all forward arcs of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;.&lt;br /&gt;
## Let &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; denote the minimum of the values &amp;lt;math&amp;gt;f(a)&amp;lt;/math&amp;gt; on all backward arcs of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;.&lt;br /&gt;
## For each arc &amp;lt;math&amp;gt;a \in A&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, increase the flow value by &amp;lt;math&amp;gt;\min \{x,y \}&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; is a forward arc on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, otherwise, decrease the flow value by &amp;lt;math&amp;gt;\min \{x,y \}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' If the graph traversal does not hit &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, the break condition is fulfilled, so nothing is to show. So consider the case that the graph traversal does hit &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;(s,t)&amp;lt;/math&amp;gt;-path. By definition of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, the capacity constraints are preserved. To see that the flow conservation conditions are preserved as well, only the internal nodes of &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; are relevant. Let &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; be such an internal node, and let &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; denote the immediate predecessor and successor of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;, respectively. Basically, there are four cases:&lt;br /&gt;
*Either &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; is on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; as a forward arc or &amp;lt;math&amp;gt;(v,u)&amp;lt;/math&amp;gt; is on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;  as a backward arc.&lt;br /&gt;
*Either &amp;lt;math&amp;gt;(v,w)&amp;lt;/math&amp;gt; is on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; as a forward arc or &amp;lt;math&amp;gt;(w,v)&amp;lt;/math&amp;gt; is on &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; as a backward arc.&lt;br /&gt;
It is easy to check preservation of the flow conservation conditions for each of these four cases.&lt;br /&gt;
&lt;br /&gt;
== Correctness ==&lt;br /&gt;
&lt;br /&gt;
Due to the invariant, the flow is feasible before and after each iteration. Termination results from the complexity considerations below. Due to the [[Max-flow min-cut|max-flow min-cut theorem]], the break condition implies that the final flow is maximum.&lt;br /&gt;
&lt;br /&gt;
== Complexity ==&lt;br /&gt;
&lt;br /&gt;
'''Statement:''' If all capacity values are integral, the asymptotic worst-case complexity is &amp;lt;math&amp;gt;\mathcal{O} (m\cdot F)&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;m = |A|&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; is the maximum total flow value.&lt;br /&gt;
&lt;br /&gt;
'''Proof:''' A graph search from &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; requires &amp;lt;math&amp;gt;\Omicron (m)&amp;lt;/math&amp;gt; . Obviously, determining &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; and changing the flow values along &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; requires &amp;lt;math&amp;gt;\mathcal{O}(m)&amp;lt;/math&amp;gt; as well. &lt;br /&gt;
It is also evident that, before and after each iteration, the flow values on all arcs are integral. In particular, the total flow value is integral. The variant implies that, in case of integral capacity values, the total flow value increases by at least one unit in every iteration. Since the total flow value is always in the interval &amp;lt;math&amp;gt;[0...F]&amp;lt;/math&amp;gt;, this may happen at most &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; times.&lt;br /&gt;
&lt;br /&gt;
== Pseudocode == &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 FORD-FULKERSON(''G,s,t'')&lt;br /&gt;
 1 '''for''' each edge (''u,v'')  &amp;amp;isin; ''G.E''&lt;br /&gt;
 2    (''u,v'').''f'' = 0&lt;br /&gt;
 3 '''while''' there exists a path ''p'' from ''s'' to ''t'' in the residual Network G&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''&lt;br /&gt;
 4    ''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''p'') = min{''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''u,v'') : (''u,v'') is in ''p''}  &lt;br /&gt;
 5    '''for''' each each edge (''u,v'') in ''p'' &lt;br /&gt;
 6        '''if''' (''u,v'') &amp;amp;isin; ''E''&lt;br /&gt;
 7              (''u,v'').''f'' = (''v,u'').''f'' + ''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''p'')  &lt;br /&gt;
 8        '''else''' (''v,u'').''f'' = (''v,u'').''f'' - ''c&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;''(''p'')  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pezi22</name></author>
	</entry>
</feed>