Content deleted Content added
m Added 1 doi to a journal cite using AWB (10104) |
→Further reading: The link should be refreshed. Isn't valid anymore |
||
(18 intermediate revisions by 15 users not shown) | |||
Line 1:
▲ | last1 = Karger | first1 = David R. | author1-link = David Karger
| title = A Simpler Minimum Spanning Tree Verification Algorithm
|
| year = 1995
| pages = 440–448
Line 37 ⟶ 11:
</ref> It combines the design paradigms of [[divide and conquer algorithms]], [[greedy algorithms]], and [[randomized algorithms]] to achieve [[Expected value|expected]] [[linear time|linear performance]].
Deterministic algorithms that find the minimum spanning tree include [[Prim's algorithm]], [[Kruskal's algorithm]], [[
==Overview==
The key insight to the algorithm is a random sampling step which partitions a graph into two [[Glossary_of_graph_theory#Subgraphs|subgraphs]] by randomly selecting edges to include in each subgraph. The algorithm recursively finds the [[minimum spanning tree|minimum spanning forest]] of the first subproblem and uses the solution in conjunction with
===Borůvka Step===
Each iteration of the algorithm relies on an adaptation of Borůvka's
Input: A graph ''G'' with no isolated vertices
1 For each vertex ''v'', select the lightest edge incident on ''v''
Line 50 ⟶ 24:
3 Remove all isolated vertices, self-loops, and non-minimal repetitive edges from ''G'''
Output: The edges selected in step 1 and the contracted graph ''G'''
A Borůvka Step is equivalent to the inner loop of [[Borůvka's algorithm]] which runs in ''O''(''m'') time where ''m'' is the number of edges in ''G''. Furthermore, since each edge can be selected at most twice (once by each incident vertex) the maximum number of disconnected components after step 1 is equal to half the number of vertices. Thus, a Borůvka step reduces the number of vertices in the graph by at least a factor of two and deletes at least ''n''/2 edges where ''n'' is the number of vertices in ''G''.▼
▲A Borůvka
Example Execution of a Borůvka Step▼
{| class="wikitable"
! Image !! Description
|-
Line 72 ⟶ 47:
|}
===F-heavy and F-light
In each iteration the algorithm removes edges with particular properties that exclude them from the [[minimum spanning tree]]. These are called
==Algorithm==
==Correctness==
Line 90 ⟶ 65:
The expected performance is a result of the random sampling step. The effectiveness of the random sampling step is described by the following lemma which places a bound on the number of '''[[#F-heavy and F-light Edges|F-light]]''' edges in ''G'' thereby restricting the size of the second subproblem.
===Random
'''Lemma'''- Let ''H'' be a subgraph of ''G'' formed by including each edge of ''G'' independently with probability ''p'' and let ''F'' be the minimum spanning forest of ''H''. The [[Expected value|expected number]] of '''[[#F-heavy and F-light Edges|F-light]]''' edges in ''G'' is at most ''n/p'' where ''n'' is the number of vertices in ''G''
To prove the lemma examine the edges of ''G'' as they are being added to ''H''. The number of [[#F-heavy and F-light Edges|F-light]] edges in ''G'' is independent of the order in which the edges of ''H'' are selected since the minimum spanning forest of ''H'' is the same for all selection orders. For the sake of the proof consider selecting edges for ''H'' by taking the edges of ''G'' one at a time in order of edge weight from lightest to heaviest. Let ''e'' be the current edge being considered. If the endpoints of ''e'' are in two disconnected components of ''H'' then ''e'' is the lightest edge connecting those components and if it is added to ''H'' it will be in ''F'' by the [[Minimum_spanning_tree#Cut_property|cut property]]. This also means ''e'' is [[#F-heavy and F-light Edges|F-light]] regardless of whether or not it is added to ''H'' since only heavier edges are subsequently considered. If both endpoints of ''e'' are in the same component of ''H'' then it is (and always will be) F-heavy by the [[Minimum_spanning_tree#Cycle_property|cycle property]]. Edge ''e'' is then added to ''H'' with probability ''p''.
Line 97 ⟶ 72:
The maximum number of [[#F-heavy and F-light Edges|F-light]] edges added to ''H'' is ''n''-1 since any minimum spanning tree of ''H'' has ''n''-1 edges. Once ''n''-1 F-light edges have been added to ''H'' none of the subsequent edges considered are F-light by the [[Minimum_spanning_tree#Cycle_property|cycle property]]. Thus, the number of F-light edges in ''G'' is bounded by the number of F-light edges considered for ''H'' before ''n''-1 F-light edges are actually added to ''H''. Since any F-light edge is added with probability ''p'' this is equivalent to flipping a coin with probability ''p'' of coming up heads until ''n''-1 heads have appeared. The total number of coin flips is equal to the number of F-light edges in ''G''. The distribution of the number of coin flips is given by the [[negative binomial distribution|inverse binomial distribution]] with parameters ''n''-1 and ''p''. For these parameters the expected value of this distribution is (''n''-1)/''p''.
===Expected
Ignoring work done in recursive subproblems the total amount of work done in a single invocation of the algorithm is [[linear time|linear]] in the number of edges in the input graph. Step 1 takes constant time. Borůvka steps can be executed in time linear in the number of edges as mentioned in the [[#Borůvka
Each invocation of the algorithm produces at most two subproblems so the set of subproblems forms a [[binary tree]]. Each [[#Borůvka Step|Borůvka step]] reduces the number of vertices by at least a factor of two so after two Borůvka steps the number of vertices has been reduced by a factor of four. Thus, if the original graph has ''n'' vertices and ''m'' edges then at depth ''d'' of the tree each subproblem is on a graph of at most ''n''/4<sup>''d''</sup> vertices. Also the tree has at most log<sub>4</sub>''n'' levels.
Line 108 ⟶ 83:
Each edge in a left child problem is selected from the edges of its parent problem (less the edges contracted in the [[#Borůvka Step|Borůvka steps]]) with probability 1/2. If a parent problem has ''x'' edges then the [[Expected value|expected number]] of edges in the left child problem is at most ''x''/2. If ''x'' is replaced by a random variable ''X'' then by the [[Linearity_of_expectation#Linearity|linearity of expectation]] the expected number of edges in the left child problem ''Y'' is given by <math>E[Y] \leq E[X]/2</math>. Thus if the expected number of edges in a problem at the top of a left path is ''k'' then the sum of the expected number of edges in each subproblem in the left path is at most <math>\sum_{d=0}^{\infty} \frac{k}{2^d}=2k</math> (see [[Geometric series]]). The root has ''m'' edges so the [[Expected value|expected number]] of edges is equal to 2''m'' plus twice the expected number of edges in each right subproblem.
The expected number of edges in each right subproblem is equal to the number of [[#F-heavy and F-light
===Worst
The worst case runtime is equivalent to the runtime of [[Borůvka's algorithm]]. This occurs if all edges are added to either the left or right subproblem on each invocation. In this case the algorithm is identical to [[Borůvka's algorithm]] which runs in ''O''(min{''n''<sup>2</sup>, ''m''log''n''}) on a graph with ''n'' vertices and ''m'' edges.
==References==
|