<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.formulasearchengine.com/index.php?action=history&amp;feed=atom&amp;title=Minimax_eversion</id>
	<title>Minimax eversion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://en.formulasearchengine.com/index.php?action=history&amp;feed=atom&amp;title=Minimax_eversion"/>
	<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Minimax_eversion&amp;action=history"/>
	<updated>2026-04-20T23:48:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0-wmf.28</generator>
	<entry>
		<id>https://en.formulasearchengine.com/index.php?title=Minimax_eversion&amp;diff=254536&amp;oldid=prev</id>
		<title>en&gt;Llightex: /* top */ added bolding</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Minimax_eversion&amp;diff=254536&amp;oldid=prev"/>
		<updated>2014-09-05T21:46:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;top: &lt;/span&gt; added bolding&lt;/p&gt;
&lt;a href=&quot;https://en.formulasearchengine.com/index.php?title=Minimax_eversion&amp;amp;diff=254536&amp;amp;oldid=17237&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>en&gt;Llightex</name></author>
	</entry>
	<entry>
		<id>https://en.formulasearchengine.com/index.php?title=Minimax_eversion&amp;diff=17237&amp;oldid=prev</id>
		<title>90.183.57.98: link</title>
		<link rel="alternate" type="text/html" href="https://en.formulasearchengine.com/index.php?title=Minimax_eversion&amp;diff=17237&amp;oldid=prev"/>
		<updated>2010-11-30T23:00:24Z</updated>

		<summary type="html">&lt;p&gt;link&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[File:Min cut example.svg|thumb|A graph with two cuts. The dotted line in red is a cut with three crossing edges. The dashed line in green is a min-cut of this graph, crossing only two edges.]]&lt;br /&gt;
In [[computer science]] and [[graph theory]], &amp;#039;&amp;#039;&amp;#039;Karger&amp;#039;s algorithm&amp;#039;&amp;#039;&amp;#039; is a [[randomized algorithm]] to compute a [[minimum cut]] of a connected [[graph (mathematics)|graph]]. It was invented by [[David Karger]] and first published in 1993.&amp;lt;ref name=&amp;quot;karger1993&amp;quot;&amp;gt;{{cite conference&lt;br /&gt;
|last=Karger&lt;br /&gt;
|first=David&lt;br /&gt;
|title=Global Min-cuts in RNC and Other Ramifications of a Simple Mincut Algorithm&lt;br /&gt;
|url=http://people.csail.mit.edu/karger/Papers/mincut.ps&lt;br /&gt;
|booktitle=Proc. 4th Annual ACM-SIAM Symposium on Discrete Algorithms&lt;br /&gt;
|date=1993&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The idea of the algorithm is based on the concept of [[Edge contraction|contraction of an edge]] &amp;lt;math&amp;gt;(u, v)&amp;lt;/math&amp;gt; in an undirected graph &amp;lt;math&amp;gt;G = (V, E)&amp;lt;/math&amp;gt;. Informally speaking, the contraction of an edge merges the nodes &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; into one, reducing the total number of nodes of the graph by one. All other edges connecting either &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; are &amp;quot;reattached&amp;quot; to the merged node, effectively producing a [[multigraph]]. Karger&amp;#039;s basic algorithm iteratively contracts randomly chosen edges until only two nodes remain; those nodes represent a [[Cut (graph theory)|cut]] in the original graph. By iterating this basic algorithm a sufficient number of times, a minimum cut can be found with high probability.&lt;br /&gt;
&lt;br /&gt;
==The global minimum cut problem ==&lt;br /&gt;
{{main|Minimum cut}}&lt;br /&gt;
A &amp;#039;&amp;#039;cut&amp;#039;&amp;#039; &amp;lt;math&amp;gt;(S,T)&amp;lt;/math&amp;gt; in an undirected graph &amp;lt;math&amp;gt;G = (V, E)&amp;lt;/math&amp;gt; is a partition of the vertices &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; into two non-empty, disjoint sets &amp;lt;math&amp;gt;S\cup T= V&amp;lt;/math&amp;gt;. &lt;br /&gt;
The &amp;#039;&amp;#039;cutset&amp;#039;&amp;#039; of a cut consists of the edges &amp;lt;math&amp;gt;\{\, uv \in E \colon u\in S, v\in T\,\}&amp;lt;/math&amp;gt; between the two parts.&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;weight&amp;#039;&amp;#039;) of a cut in an unweighted graph is the cardinality of the cutset, i.e., the number of edges between the two parts, &lt;br /&gt;
:: &amp;lt;math&amp;gt;w(S,T) = |\{\, uv \in E \colon u\in S, v\in T\,\}|\,.&amp;lt;/math&amp;gt;&lt;br /&gt;
There are &amp;lt;math&amp;gt;2^{|V|}&amp;lt;/math&amp;gt; ways of choosing for each vertex whether it belongs to &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; or to &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, but two of these choices make &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; empty and do not give rise to cuts. Among the remaining choices, swapping the roles of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; does not change the cut, so each cut is counted twice; therefore, there are &amp;lt;math&amp;gt;2^{|V|-1}-1&amp;lt;/math&amp;gt; distinct cuts.&lt;br /&gt;
The &amp;#039;&amp;#039;minimum cut problem&amp;#039;&amp;#039; is to find a cut of smallest size among these cuts. &lt;br /&gt;
&lt;br /&gt;
For weighted graphs with positive edge weights &amp;lt;math&amp;gt;w\colon E\rightarrow \mathbf R^+&amp;lt;/math&amp;gt; the weight of the cut is the sum of the weights  of edges between vertices in each part&lt;br /&gt;
:: &amp;lt;math&amp;gt;w(S,T) = \sum_{uv\in E\colon u\in S, v\in T} w(uv)\,,&amp;lt;/math&amp;gt;&lt;br /&gt;
which agrees with the unweighted definition for &amp;lt;math&amp;gt;w=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A cut is sometimes called a “global cut” to distinguish it from an “&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut” for a given pair of vertices, which has the additional requirement that &amp;lt;math&amp;gt;s\in S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t\in T&amp;lt;/math&amp;gt;. Every global cut is an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut for some &amp;lt;math&amp;gt;s,t\in V&amp;lt;/math&amp;gt;. Thus, the minimum cut problem can be solved in [[polynomial time]] by iterating over all choices of &amp;lt;math&amp;gt;s,t\in V&amp;lt;/math&amp;gt; and solving the resulting minimum &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut problem using the [[max-flow min-cut theorem]] and a polynomial time algorithm for [[maximum flow]], such as the [[Ford–Fulkerson algorithm]], though this approach is not optimal. There is a deterministic algorithm for the minimum cut problem with running time &amp;lt;math&amp;gt;O(mn+n^2\log n)&amp;lt;/math&amp;gt;.&amp;lt;ref name=&amp;quot;simplemincut&amp;quot;&amp;gt;{{cite doi|10.1145/263867.263872}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Contraction algorithm==&lt;br /&gt;
&lt;br /&gt;
The fundamental operation of Karger’s algorithm is a form of [[edge contraction]]. The result of contracting the edge &amp;lt;math&amp;gt;e=\{u,v\}&amp;lt;/math&amp;gt; is new node &amp;lt;math&amp;gt;uv&amp;lt;/math&amp;gt;. Every edge &amp;lt;math&amp;gt;\{w,u\}&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;\{w,v\}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;w\notin\{u,v\}&amp;lt;/math&amp;gt; to the endpoints of the contracted edge is replaced by an edge &amp;lt;math&amp;gt;\{w,uv\}&amp;lt;/math&amp;gt; to the new node. Finally, the contracted nodes  &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; with all their incident edges are removed. In particular, the resulting graph contains no self-loops. The result of contracting edge &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; is denoted &amp;lt;math&amp;gt;G/e&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Edge contraction in a multigraph.svg|150px|The marked edge is contracted into a single node.]]&lt;br /&gt;
&lt;br /&gt;
The contraction algorithm repeatedly contracts random edges in the graph, until only two nodes remain, at which point there is only a single cut. &lt;br /&gt;
&lt;br /&gt;
[[File:Single run of Karger’s Mincut algorithm.svg|frame|center|Successful run of Karger’s algorithm on a 10-vertex graph. The minimum cut has size 3.]]&lt;br /&gt;
&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;procedure&amp;#039;&amp;#039;&amp;#039; contract(&amp;lt;math&amp;gt;G=(V,E)&amp;lt;/math&amp;gt;):&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;while&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;|V| &amp;gt; 2&amp;lt;/math&amp;gt;&lt;br /&gt;
        choose &amp;lt;math&amp;gt;e\in E&amp;lt;/math&amp;gt; uniformly at random&lt;br /&gt;
        &amp;lt;math&amp;gt;G \leftarrow G/e&amp;lt;/math&amp;gt;&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;return&amp;#039;&amp;#039;&amp;#039; the only cut in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the graph is represented using [[adjacency list]]s or an [[adjacency matrix]], a single edge contraction operation can be implemented with a linear number of updates to the data structure, for a total running time of &amp;lt;math&amp;gt;O(|V|^2)&amp;lt;/math&amp;gt;. Alternatively, the procedure can be viewed as an execution of [[Kruskal’s algorithm]] for constructing the [[minimum spanning tree]] in a graph where the edges have weights &amp;lt;math&amp;gt;w(e_i)=\pi(i)&amp;lt;/math&amp;gt; according to a random permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;. Removing the heaviest edge of this tree results in two components that describe a cut. In this way, the contraction procedure can be implemented like [[Kruskal’s algorithm]] in time &amp;lt;math&amp;gt;O(|E|\log |E|)&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
[[File:Spanning tree interpretation of Karger’s algorithm.svg|frame|center|The random edge choices in Karger’s algorithm correspond to an execution of Kruskal’s algorithm on a graph with random edge ranks until only two components remain.]]&lt;br /&gt;
&lt;br /&gt;
The best known implementations use &amp;lt;math&amp;gt;O(|E|)&amp;lt;/math&amp;gt; time and space, or &amp;lt;math&amp;gt;O(|E|\log |E|)&amp;lt;/math&amp;gt; time and &amp;lt;math&amp;gt;O(|V|)&amp;lt;/math&amp;gt; space, respectively.&amp;lt;ref name=karger1993/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Success probability of the contraction algorithm===&lt;br /&gt;
&lt;br /&gt;
In a graph &amp;lt;math&amp;gt;G=(V,E)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;n=|V|&amp;lt;/math&amp;gt; vertices, the contraction algorithm returns a minimum cut with polynomially small probability &amp;lt;math&amp;gt;\binom{n}{2}^{-1}&amp;lt;/math&amp;gt;. Every graph has &amp;lt;math&amp;gt;2^{n-1} -1 &amp;lt;/math&amp;gt; cuts,&amp;lt;ref&amp;gt;{{citation&lt;br /&gt;
 | last1 = Patrignani | first1 = Maurizio&lt;br /&gt;
 | last2 = Pizzonia | first2 = Maurizio&lt;br /&gt;
 | editor1-last = Brandstädt | editor1-first = Andreas&lt;br /&gt;
 | editor2-last = Le | editor2-first = Van Bang&lt;br /&gt;
 | contribution = The complexity of the matching-cut problem&lt;br /&gt;
 | doi = 10.1007/3-540-45477-2_26&lt;br /&gt;
 | location = Berlin&lt;br /&gt;
 | mr = 1905640&lt;br /&gt;
 | pages = 284–295&lt;br /&gt;
 | publisher = Springer&lt;br /&gt;
 | series = Lecture Notes in Computer Science&lt;br /&gt;
 | title = Graph-Theoretic Concepts in Computer Science: 27th International Workshop, WG 2001, Boltenhagen, Germany, June 14ÔÇô16, 2001, Proceedings&lt;br /&gt;
 | volume = 2204&lt;br /&gt;
 | year = 2001}}.&amp;lt;/ref&amp;gt; among which at most &amp;lt;math&amp;gt;\tbinom{n}{2}&amp;lt;/math&amp;gt; can be minimum cuts. Therefore, the success probability for this algorithm is much better than the probability for picking a cut at random, which is at most &amp;lt;math&amp;gt;\tbinom{n}{2}/( 2^{n-1} -1 )&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, the [[cycle graph]] on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices has exactly &amp;lt;math&amp;gt;\binom{n}{2}&amp;lt;/math&amp;gt; minimum cuts, given by every choice of 2 edges. The contraction procedure finds each of these with equal probability.&lt;br /&gt;
&lt;br /&gt;
To establish the bound on the success probability in general, let &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; denote the edges of a specific minimum cut of size &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. The contraction algorithm returns &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; if none of the random edges belongs to the cutset of &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;. In particular, the first edge contraction avoids &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, which happens with probability &amp;lt;math&amp;gt;1-k/|E|&amp;lt;/math&amp;gt;. The minimum degree of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is at least &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; (otherwise a minimum degree vertex would induce a smaller cut), so &amp;lt;math&amp;gt;|E|\geq nk/2&amp;lt;/math&amp;gt;. Thus, the probability that the contraction algorithm picks an edge from &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is&lt;br /&gt;
::::&amp;lt;math&amp;gt;\frac{k}{|E|} \leq \frac{k}{nk/2} = \frac{2}{n}.&amp;lt;/math&amp;gt;&lt;br /&gt;
The probability &amp;lt;math&amp;gt;p_n&amp;lt;/math&amp;gt; that the contraction algorithm on an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-vertex graph avoids &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; satisfies the recurrence &amp;lt;math&amp;gt;p_n \geq \bigl(1- \frac{2}{n}\bigr) p_{n-1}&amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt;p_2 = 1&amp;lt;/math&amp;gt;, which can be expanded as&lt;br /&gt;
:::&amp;lt;math&amp;gt;&lt;br /&gt;
p_n \geq \prod_{i=0}^{n-3} \Bigl(1-\frac{2}{n-i}\Bigr) =&lt;br /&gt;
 \prod_{i=0}^{n-3} {\frac{n-i-2}{n-i}}&lt;br /&gt;
      = \frac{n-2}{n}\cdot \frac{n-3}{n-1} \cdot \frac{n-4}{n-2}\cdots \frac{3}{5}\cdot \frac{2}{4} \cdot \frac{1}{3}&lt;br /&gt;
      = \binom{n}{2}^{-1}\,.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Repeating the contraction algorithm===&lt;br /&gt;
&lt;br /&gt;
[[File:10 repetitions of Karger’s contraction procedure.svg|thumb|10 repetitions of the contraction procedure. The 5th repetition finds the minimum cut of size 3.]]&lt;br /&gt;
&lt;br /&gt;
By repeating the contraction algorithm &amp;lt;math&amp;gt; T = \binom{n}{2}\ln n &amp;lt;/math&amp;gt; times with independent random choices and returning the smallest cut, the probability of not finding a minimum cut is&lt;br /&gt;
:::&amp;lt;math&amp;gt;&lt;br /&gt;
\Bigl[1-\binom{n}{2}^{-1}\Bigr]^T&lt;br /&gt;
      \leq \frac{1}{e^{\ln n}} = \frac{1}{n}\,.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The total running time for &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; repetitions for a graph with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices and &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; edges is &amp;lt;math&amp;gt; O(Tm) = O(n^2 m \log n)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Karger–Stein algorithm ==&lt;br /&gt;
An extension of Karger’s algorithm due to [[David Karger]] and [[Clifford Stein]] achieves an order of magnitude improvement.&amp;lt;ref name= &amp;quot;faster&amp;quot;&amp;gt;{{cite doi|10.1145/234533.234534}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The basic idea is to perform the contraction procedure until the graph reaches &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; vertices.&lt;br /&gt;
&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;procedure&amp;#039;&amp;#039;&amp;#039; contract(&amp;lt;math&amp;gt;G=(V,E)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;):&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;while&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;|V| &amp;gt; t&amp;lt;/math&amp;gt;&lt;br /&gt;
        choose &amp;lt;math&amp;gt;e\in E&amp;lt;/math&amp;gt; uniformly at random&lt;br /&gt;
        &amp;lt;math&amp;gt;G \leftarrow G/e&amp;lt;/math&amp;gt;&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;return&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The probability &amp;lt;math&amp;gt;p_{n,t}&amp;lt;/math&amp;gt; that this contraction procedure avoids a specific cut &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; in an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-vertex graph is&lt;br /&gt;
:::&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
p_{n,t} &amp;amp;\ge \prod_{i=0}^{n-t-1} \Bigl(1-\frac{2}{n-i}\Bigr) = \binom{t}{2}\bigg/\binom{n}{2}\,.   &lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This expression is &amp;lt;math&amp;gt;\Omega(t^2/n^2)&amp;lt;/math&amp;gt; becomes less than &amp;lt;math&amp;gt;\frac{1}{2}&amp;lt;/math&amp;gt; around &amp;lt;math&amp;gt; t= \lceil 1 + n/\sqrt 2\rceil&amp;lt;/math&amp;gt;. &lt;br /&gt;
In particular, the probability that an edge from &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is contracted grows towards the end. This motivates the idea of switching to a slower algorithm  after a certain number of contraction steps.&lt;br /&gt;
&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;procedure&amp;#039;&amp;#039;&amp;#039; fastmincut(&amp;lt;math&amp;gt;G= (V,E)&amp;lt;/math&amp;gt;):&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;|V| &amp;lt; 6&amp;lt;/math&amp;gt;:&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;return&amp;#039;&amp;#039;&amp;#039; mincut(&amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;)&lt;br /&gt;
    &amp;#039;&amp;#039;&amp;#039;else&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
        &amp;lt;math&amp;gt;t\leftarrow \lceil 1 + |V|/\sqrt 2\rceil&amp;lt;/math&amp;gt;&lt;br /&gt;
        &amp;lt;math&amp;gt;G_1 \leftarrow &amp;lt;/math&amp;gt; contract(&amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;)&lt;br /&gt;
        &amp;lt;math&amp;gt;G_2 \leftarrow &amp;lt;/math&amp;gt; contract(&amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;)&lt;br /&gt;
        &amp;#039;&amp;#039;&amp;#039;return&amp;#039;&amp;#039;&amp;#039; min {fastmincut(&amp;lt;math&amp;gt;G_1&amp;lt;/math&amp;gt;), fastmincut(&amp;lt;math&amp;gt;G_2&amp;lt;/math&amp;gt;)}&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
The probability &amp;lt;math&amp;gt;P(n)&amp;lt;/math&amp;gt; the algorithm finds a specific cutset &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;  is given by the recurrence relation&lt;br /&gt;
:::&amp;lt;math&amp;gt;P(n)= 1-\left(1-\frac{1}{2} P\left(\Bigl\lceil 1 + \frac{n}{\sqrt{2}}\Bigr\rceil \right)\right)^2&amp;lt;/math&amp;gt;&lt;br /&gt;
with solution &amp;lt;math&amp;gt;P(n) = O\left(\frac{1}{\log n}\right)&amp;lt;/math&amp;gt;. The running time of fastmincut satisfies&lt;br /&gt;
:::&amp;lt;math&amp;gt;T(n)= 2T\left(\Bigl\lceil 1+\frac{n}{\sqrt{2}}\Bigr\rceil\right)+O(n^2)&amp;lt;/math&amp;gt;&lt;br /&gt;
with solution &amp;lt;math&amp;gt;T(n)=O(n^2\log n)&amp;lt;/math&amp;gt;. &lt;br /&gt;
To achieve error probability &amp;lt;math&amp;gt;O(1/n)&amp;lt;/math&amp;gt;, the algorithm can be repeated &amp;lt;math&amp;gt;O(\log n/P(n))&amp;lt;/math&amp;gt; times, for an overall running time of &amp;lt;math&amp;gt;T(n) \cdot \frac{1}{P(n)} = O(n^2\log ^3 n)&amp;lt;/math&amp;gt;. This is an order of magnitude improvement over Karger’s original algorithm.&lt;br /&gt;
&lt;br /&gt;
=== Finding all min-cuts ===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Theorem:&amp;#039;&amp;#039;&amp;#039; With high probability we can find all min cuts in the running time of &amp;lt;math&amp;gt;O(n^2\ln ^3 n)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Proof:&amp;#039;&amp;#039;&amp;#039; Since we know that &amp;lt;math&amp;gt;P(n) = O\left(\frac{1}{\ln n}\right)&amp;lt;/math&amp;gt;, therefore after running this algorithm &amp;lt;math&amp;gt;O(\ln ^2 n)&amp;lt;/math&amp;gt; times The probability of missing a specific min-cut is &lt;br /&gt;
::::&amp;lt;math&amp;gt;\Pr[\text{miss a specific min-cut}] = (1-P(n))^{O(\ln ^2 n)} \le \left(1-\frac{c}{\ln n}\right)^{\frac{3\ln ^2 n}{c}} \le e^{-3\ln n} = \frac{1}{n^3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
And there are at most &amp;lt;math&amp;gt;\binom{n}{2}&amp;lt;/math&amp;gt; min-cuts, hence the probability of missing any min-cut is&lt;br /&gt;
:::&amp;lt;math&amp;gt;\Pr[\text{miss any min-cut}] \le \binom{n}{2} \cdot \frac{1}{n^3} = O\left(\frac{1}{n}\right).&amp;lt;/math&amp;gt;&lt;br /&gt;
The probability of failures is considerably small when &amp;#039;&amp;#039;n&amp;#039;&amp;#039; is large enough.∎&lt;br /&gt;
&lt;br /&gt;
=== Improvement bound ===&lt;br /&gt;
To determine a min-cut, one has to touch every edge in the graph at least once, which is &amp;lt;math&amp;gt;O(n^2)&amp;lt;/math&amp;gt; time in a dense graph. The Karger–Stein&amp;#039;s min-cut algorithm takes the running time of &amp;lt;math&amp;gt;O(n^2\ln ^{O(1)} n)&amp;lt;/math&amp;gt;, which is very close to that.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Graph algorithms]]&lt;br /&gt;
[[Category:Graph connectivity]]&lt;/div&gt;</summary>
		<author><name>90.183.57.98</name></author>
	</entry>
</feed>