However, as the following theorem shows, this is possible only if the weight
function is not injective.
-\thmn{MST uniqueness}
+\thmn{MST uniqueness}%
If all edge weights are distinct, then the minimum spanning tree is unique.
\proof
We will denote the unique minimum spanning tree of the input graph by~$T_{min}$.
We intend to prove that this is also the output of the procedure.
-\lemman{Blue lemma}
+\lemman{Blue lemma}%
When an edge is colored blue in any step of the procedure, it is contained in the minimum spanning tree.
\proof
$e$ for $e'$ in $T_{min}$ yields an even lighter spanning tree since
$w(e)<w(e')$. \qed
-\lemman{Red lemma}
+\lemman{Red lemma}%
When an edge is colored red in any step of the procedure, it is not contained in the minimum spanning tree.
\proof
\figure{mst-rb.eps}{289pt}{Proof of the Blue (left) and Red (right) lemma}
-\lemman{Black lemma}
+\lemman{Black lemma}%
As long as there exists a black edge, at least one rule can be applied.
\proof
\figure{mst-bez.eps}{295pt}{Configurations in the proof of the Black lemma}
-\thmn{Red-Blue correctness}
+\thmn{Red-Blue correctness}%
For any selection of rules, the Red-Blue procedure stops and the blue edges form
the minimum spanning tree of the input graph.
for maintaining connected components, which supports queries and edge insertion.
The following theorem shows that it can be done with a surprising efficiency.
-\thmn{Incremental connectivity}
+\thmn{Incremental connectivity}%
When only edge insertions and queries are allowed, connected components
can be maintained in $\O(\alpha(n))$ time amortized per operation.
There are two definitions of edge contraction which differ when an edge of a
triangle is contracted. Either we unify the other two edges to a single edge
-or we keep them as two parallel edges, leaving us with a multigraph. We will
+or we keep them as two parallel edges, leaving us with a~multigraph. We will
use the multigraph version and show that we can easily reduce the multigraph
to a simple graph later. (See \thmref{contract} for the exact definitions.)
$m_i$'s are decreasing exponentially.
The number of trees in the non-contracting version of the algorithm decreases
-at least twice in each iteration (Lemma \thmref{boruvkadrop}) and therefore the
-same must hold for the number of vertices in the contracting version. So $n_i\le n/2^i$.
+at least twice in each iteration (Lemma \thmref{boruvkadrop}) and the
+same must hold for the number of vertices in the contracting version.
+Therefore $n_i\le n/2^i$.
However, every $G_i$ is planar, because the class of planar graphs is closed
under edge deletion and contraction. The~$G_i$ is also simple as we explicitly removed multiple edges and
structure will contain a pointer to the corresponding bucket and the vertex list will
define the order of vertices (which can be arbitrary, but has to be fixed).
-Graph contractions are a very powerful tool and they can be used in other MST
+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:
-\lemman{Contraction of MST edges}
+\lemman{Contraction of MST edges}%
Let $G$ be a weighted graph, $e$~an arbitrary edge of~$\mst(G)$, $G/e$ the multigraph
produced by contracting $G$ along~$e$, and $\pi$ the bijection between edges of~$G-e$ and
their counterparts in~$G/e$. Then: $$\mst(G) = \pi^{-1}[\mst(G/e)] + e.$$
(according to Theorem \thmref{mstthm}). If the path $T[f]$ covered by~$f$ does not contain~$e$,
then $\pi[T[f]]$ is a path covered by~$\pi(f)$ in~$T'$. Otherwise $\pi(T[f]-e)$ is such a path.
In both cases, $f$ is $T'$-light, which contradicts the minimality of~$T'$. (We do not have
-a multigraph version of the theorem, but this direction is a straightforward edge exchange,
+a~multigraph version of the theorem, but this direction is a straightforward edge exchange,
which of course works in multigraphs as well.)
\qed
\rem
In the previous algorithm, the role of the mapping~$\pi^{-1}$ is of course played by the edge labels~$\ell$.
+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, so the edge comparison oracle will break
+ties by comparing the edges by their arbitrary identifiers as usually.
+
+\defn
+A~\df{distractor of order~$k$,} denoted by~$D_k$, is a path on $n=2^k$~vertices $v_1,\ldots,v_n$
+where each edge $v_iv_{i+1}$ has its weight equal to the number of trailing zeroes in the binary
+representation of the number~$i$. The vertex $v_1$ is called a~\df{base} of the distractor.
+
+\rem
+Alternatively, we can define~$D_k$ recursively: $D_0$ is a single vertex, $D_k$ consists
+of two disjoint copies of $D_{k-1}$ joined by an edge of weight~$k$.
+
+\FIXME{Picture of a distractor and of a hedgehog.}
+
+\lemma
+A~single iteration of the contractive algorithm reduces~$D_k$ to a graph isomorphic with~$D_{k-1}$.
+
+\proof
+Each vertex~$v$ of~$D_k$ is incident with a single edge of weight~1. The algorithm therefore
+selects all weight~1 edges and contract them. This produces a graph which is
+exactly $D_{k-1}$ with all weights increased by~1, which does not change the relative order of edges.
+\qed
+
+\FIXME{Define isomorphism of weighted graphs.}
+
+\defn
+A~\df{hedgehog}~$H_{a,k}$ is a graph consisting of $a$~distractors $D_k^1,\ldots,D_k^a$ of order~$k$
+together with edges of a complete graph on the bases of the distractors. These additional edges
+have weight $k+1$, i.e., they are heavier than the edges of the distractors.
+
+\lemma
+A~single iteration of the contractive algorithm reduces~$H_{a,k}$ to a graph isomorphic with $H_{a,k-1}$.
+
+\proof
+Each vertex is incident with an edge of some distractor, so the algorithm does not select
+any edge of the complete graph. Contraction therefore reduces each distractor to a smaller
+distractor (modulo an additive factor in weight) and leaves the complete graph intact.
+This is exactly $H_{a,k-1}$ (again modulo a~shift of weights).
+\qed
+
+\thmn{Lower bound for Contractive Bor\o{u}vka}%
+For each $n$ there exists a graph on $\Theta(n)$ vertices and $\Theta(n)$ edges
+such that the Contractive Bor\o{u}vka's algorithm spends time $\Omega(m\log n)$ on it.
+
+\proof
+Consider the hedgehog $H_{a,k}$ for $a=\lceil\sqrt n\rceil$ and $k=\lceil\log_2 a\rceil$.
+It has $a\cdot 2^k = \Theta(n)$ vertices and ${a \choose 2} + a\cdot 2^k = \Theta(a^2) + \Theta(a^2) = \Theta(n)$ edges
+as we wanted.
+
+By the previous lemma, the algorithm proceeds through a sequence of hedgehogs $H_{a,k},
+H_{a,k-1}, \ldots, H_{a,0}$, so it needs a logarithmic number of iterations plus some more
+to finish on the remaining complete graph. Each iteration runs on a graph with $\Omega(n)$
+edges as every $H_{a,k}$ contains a complete graph on~$a$ vertices.
+\qed
+
\section{Minor-closed graph classes}
+The contracting algorithm given in the previous section has been found to preform
+well on planar graphs. On the other hand, the bound $\O(m\log n)$ on general graphs
+is tight.
+
+\cite{nesetril:minors}
+
\section{Using Fibonacci heaps}
\secid{fibonacci}