Minimum spanning forest algorithm that greedily deletes edges
The reverse-delete algorithm is an algorithm in graph theory used to obtain a minimum spanning tree from a given connected, edge-weighted graph. It first appeared in , but it should not be confused with Kruskal's algorithm which appears in the same paper. If the graph is disconnected, this algorithm will find a minimum spanning tree for each disconnected part of the graph. The set of these minimum spanning trees is called a minimum spanning forest, which contains every vertex in the graph.
This algorithm is a greedy algorithm, choosing the best choice given any situation. It is the reverse of Kruskal's algorithm, which is another greedy algorithm to find a minimum spanning tree. Kruskal’s algorithm starts with an empty graph and adds edges while the Reverse-Delete algorithm starts with the original graph and deletes edges from it. The algorithm works as follows:
Pseudocode.
 function ReverseDelete(edges[] "E") is
 sort "E" in decreasing order
 Define an index "i" ← 0
 while "i" ; size("E") do
 Define "edge" ← "E"["i"]
 delete "E"["i"]
 if graph is not connected then
 "E"["i"] ← "edge"
 "i" ← "i" + 1
 return edges[] "E"
In the above the graph is the set of edges "E" with each edge containing a weight and connected vertices "v1" and "v2".
Example.
In the following example green edges are being evaluated by the algorithm and red edges have been deleted.
Running time.
The algorithm can be shown to run in "O"("E" log "V" (log log "V")3) time (using big-O notation), where "E" is the number of edges and "V" is the number of vertices. This bound is achieved as follows: 
Proof of correctness.
It is recommended to read the proof of the Kruskal's algorithm first.
The proof consists of two parts. First, it is proved that the edges that remain after the algorithm is applied form a spanning tree. Second, it is proved that the spanning tree is of minimal weight.
Spanning tree.
The remaining sub-graph (g) produced by the algorithm is not disconnected since the algorithm checks for that in line 7. The result sub-graph cannot contain a cycle since if it does then when moving along the edges we would encounter the max edge in the cycle and we would delete that edge. Thus g must be a spanning tree of the main graph G.
Minimality.
We show that the following proposition P is true by induction: If F is the set of edges remained at the end of the while loop, then there is some minimum spanning tree that (its edges) are a subset of "F".