disciplines, the previous work was not well known and the algorithms had to be
rediscovered several times.
-Recently, several significantly faster algorithms were discovered, most notably the
-$\O(m\timesbeta(m,n))$-time algorithm by Fredman and Tarjan \cite{ft:fibonacci} and
-algorithms with inverse-Ackermann type complexity by Chazelle \cite{chazelle:ackermann}
-and Pettie \cite{pettie:ackermann}.
+In the next 50 years, several significantly faster algorithms were discovered, ranging
+from the $\O(m\timesbeta(m,n))$ time algorithm by Fredman and Tarjan \cite{ft:fibonacci},
+over algorithms with inverse-Ackermann type complexity by Chazelle \cite{chazelle:ackermann}
+and Pettie \cite{pettie:ackermann}, to another algorithm by Pettie \cite{pettie:optimal}
+whose time complexity is provably optimal.
-\FIXME{Write the rest of the history.}
-
-This chapter attempts to survey the important algorithms for finding the MST and it
-also presents several new ones.
+In the upcoming chapters, we will explore this colorful universe of MST algorithms.
+We will meet the standard works of the classics, the clever ideas of their successors,
+various approaches to the problem including randomization and solving of important
+special cases.
%--------------------------------------------------------------------------------
-\section{Basic properties}
+\section{Basic properties}\id{mstbasics}%
In this section, we will examine the basic properties of spanning trees and prove
several important theorems to base the algorithms upon. We will follow the theory
Theorem \ref{mstthm}), so it is the heaviest edge on the cycle $T_{min}[e]+e$.
\qed
+\rem
+The MST problem is a~special case of the problem of finding the minimum basis
+of a~weighted matroid. Surprisingly, when we modify the Red-Blue procedure to
+use the standard definitions of cycles and cuts in matroids, it will always
+find the minimum basis. Some of the other MST algorithms also easily generalize to
+matroids and in some sense matroids are exactly the objects where ``the greedy approach works''. We
+will however not pursue this direction in our work, referring the reader to the Oxley's monograph
+\cite{oxley:matroids} instead.
+
%--------------------------------------------------------------------------------
\section{Classical algorithms}\id{classalg}%
it gives the correct result and finally we discuss the time complexity of various
implementations.
+\paran{Bor\o{u}vka's algorithm}%
+The oldest MST algorithm is based on a~simple idea: grow a~forest in a~sequence of
+iterations until it becomes connected. We start with a~forest of isolated
+vertices. In each iteration, we let each tree of the forest select the lightest
+edge of those having exactly one endpoint in the tree (we will call such edges
+the \df{neighboring edges} of the tree). We add all such edges to the forest and
+pAroceed with the next iteration.
+
\algn{Bor\o{u}vka \cite{boruvka:ojistem}, Choquet \cite{choquet:mst}, Sollin \cite{sollin:mst} and others}
\algo
\algin A~graph~$G$ with an edge comparison oracle.
Follows from the previous lemmata.
\qed
+\paran{Jarn\'\i{}k's algorithm}%
+The next algorithm, discovered independently by Jarn\'\i{}k, Prim and Dijkstra, is similar
+to Bor\o{u}vka's algorithm, but instead of the whole forest it concentrates on
+a~single tree. It starts with a~single vertex and it repeatedly extends the tree
+by the lightest neighboring edge until it spans the whole graph.
+
\algn{Jarn\'\i{}k \cite{jarnik:ojistem}, Prim \cite{prim:mst}, Dijkstra \cite{dijkstra:mst}}\id{jarnik}%
\algo
\algin A~graph~$G$ with an edge comparison oracle.
\qed
\impl\id{jarnimpl}%
-The most important part of the algorithm is finding \em{neighboring edges,} i.e., edges
-of the cut $\delta(T)$. In a~straightforward implementation,
-searching for the lightest neighboring edge takes $\Theta(m)$ time, so the whole
-algorithm runs in time $\Theta(mn)$.
+The most important part of the algorithm is finding \em{neighboring edges.}
+In a~straightforward implementation, searching for the lightest neighboring
+edge takes $\Theta(m)$ time, so the whole algorithm runs in time $\Theta(mn)$.
We can do much better by using a binary
heap to hold all neighboring edges. In each iteration, we find and delete the
Jarn\'\i{}k's algorithm finds the MST of a~given graph in time $\O(m\log n)$.
\rem
-We will show several faster implementations in section \ref{fibonacci}.
+We will show several faster implementations in section \ref{iteralg}.
+
+\paran{Kruskal's algorithm}%
+The last of the three classical algorithms processes the edges of the
+graph~$G$ greedily. It starts with an~empty forest and it takes the edges of~$G$
+in order of their increasing weights. For every edge, it checks whether its
+addition to the forest produces a~cycle and if it does not, the edge is added.
+Otherwise, the edge is dropped and not considered again.
-\algn{Kruskal \cite{kruskal:mst}, the Greedy algorithm}
+\algn{Kruskal \cite{kruskal:mst}}
\algo
\algin A~graph~$G$ with an edge comparison oracle.
-\:Sort edges of~$G$ by their increasing weight.
+\:Sort edges of~$G$ by their increasing weights.
\:$T\=\emptyset$. \cmt{an empty spanning subgraph}
\:For all edges $e$ in their sorted order:
\::If $T+e$ is acyclic, add~$e$ to~$T$.
\impl
Except for the initial sorting, which in general takes $\Theta(m\log m)$ time, the only
-other non-trivial operation is the detection of cycles. What we need is a data structure
+other non-trivial operation is the detection of cycles. What we need is a~data structure
for maintaining connected components, which supports queries and edge insertion.
-(This is also known under the name Disjoint Set Union problem, i.e., maintenance
-of an~equivalence relation on a~set with queries on whether two elements are equivalent
-and the operation of joining two equivalence classes into one.)
-The following theorem shows that it can be done with surprising efficiency.
+This is closely related to the well-known Disjoint Set Union problem:
-\thmn{Incremental connectivity}%
-When only edge insertions and connectivity queries are allowed, connected components
-can be maintained in $\O(\alpha(n))$ time amortized per operation.
+\problemn{Disjoint Set Union (DSU)}
+Maintain an~equivalence relation on a~finite set under a~sequence of operations \<Union>
+and \<Find>. The \<Find> operation tests whether two elements are equivalent and \<Union>
+joins two different equivalence classes into one.
+
+\para
+We can maintain the connected components of our forest~$T$ as equivalence classes. When we want
+to add an~edge~$uv$, we first call $\<Find>(u,v)$ to check if both endpoints of the edge lie in
+the same components. If they do not, addition of this edge connects both components into one,
+so we perform $\<Union>(u,v)$ to merge the equivalence classes.
+
+Tarjan and van Leeuwen have shown that there is a~data structure for the DSU problem
+with surprising efficiency:
+
+\thmn{Disjoint Set Union, Tarjan and van Leeuwen \cite{tarjan:setunion}}\id{dfu}%
+Starting with a~trivial equivalence with single-element classes, a~sequence of operations
+comprising of $n$~\<Union>s intermixed with $m\ge n$~\<Find>s can be processed in time
+$\O(m\timesalpha(m,n))$, where $\alpha(m,n)$ is a~certain inverse of the Ackermann's function
+(see Definition \ref{ackerinv}).
\proof
-Proven by Tarjan and van Leeuwen in \cite{tarjan:setunion}.
-See Chapter~\ref{dynchap} for more context.
+See \cite{tarjan:setunion}.
\qed
-\FIXME{Define Ackermann's function. Use $\alpha(m,n)$?}
+This completes the following theorem:
+
+\thm\id{kruskal}%
+Kruskal's algorithm finds the MST of a given graph in time $\O(m\log n)$.
+If the edges are already sorted by their weights, the time drops to
+$\O(m\timesalpha(m,n))$.
+
+\proof
+We spend $\O(m\log n)$ on sorting, $\O(m\timesalpha(m,n))$ on processing the sequence
+of \<Union>s and \<Find>s, and $\O(m)$ on all other work.
+\qed
\rem
-The cost of the operations on components is of course dwarfed by the complexity
+The cost of the \<Union> and \<Find> operations is of course dwarfed by the complexity
of sorting, so a much simpler (at least in terms of its analysis) data
structure would be sufficient, as long as it has $\O(\log n)$ amortized complexity
per operation. For example, we can label vertices with identifiers of the
-corresponding components and always recolor the smaller of the two components.
-
-\thm\id{kruskal}%
-Kruskal's algorithm finds the MST of a given graph in time $\O(m\log n)$
-or $\O(m\timesalpha(n))$ if the edges are already sorted by their weights.
+corresponding components and always relabel the smaller of the two components.
-\proof
-Follows from the above analysis.
-\qed
+We will study dynamic maintenance of connected components in more detail in Chapter~\ref{dynchap}.
%--------------------------------------------------------------------------------
of vertices and edges of this graph by $n_i$ and $m_i$ respectively.
\lemma\id{contiter}%
-The $i$-th iteration of the algorithm (also called the Bor\o{u}vka step) can be carried
+The $i$-th iteration of the algorithm (also called the \df{Bor\o{u}vka step}) can be carried
out in time~$\O(m_i)$.
\proof
To achieve the linear time complexity, the algorithm needs a very careful implementation,
but we defer the technical details to section~\ref{bucketsort}.
-\para
+\paran{General contractions}%
Graph contractions are indeed a~very powerful tool and they can be used in other MST
algorithms as well. The following lemma shows the gist:
\rem
In the previous algorithm, the role of the mapping~$\pi^{-1}$ is of course played by the edge labels~$\ell$.
-\para
+\paran{A~lower bound}%
Finally, we will show a family of graphs where the $\O(m\log n)$ bound on time complexity
is tight. The graphs do not have unique weights, but they are constructed in a way that
the algorithm never compares two edges with the same weight. Therefore, when two such