edges with exactly one endpoint in~$C$.} there exists a~path in~$C$ connecting the endpoints
of the edges $e,f$ such that all edges on this path are lighter than either $e$ or~$f$.
-\example
+\example\id{jarniscont}%
Let us see that when we stop the Jarn\'\i{}k's algorithm at some moment and
we take a~subgraph~$C$ induced by the constructed tree, this subgraph is contractible.
Indeed, when we consider any two distinct edges $uv, xy$ ($u,x\in C$ and $v,y\not\in C$),
caused by soft heaps, we can easily make the weights unique.
If~$C$ is a~subgraph of~$G$, we will refer to the edges of~$R$ whose exactly
-one endpoint lies in~$C$ by~$R_C$ (i.e., $R_C = R\cap \delta(C)$).
+one endpoint lies in~$C$ by~$R^C$ (i.e., $R^C = R\cap \delta(C)$).
-\lemman{Robust contraction}
+\lemman{Robust contraction}\id{robcont}%
Let $G$ be a~weighted graph and $C$~its subgraph contractible in~$G\crpt R$
-for some set of edges~$R$. Then $\msf(G) \subseteq \msf(C) \cup \msf((G/C) \setminus R_C) \cup R_C$.
+for some set of edges~$R$. Then $\msf(G) \subseteq \msf(C) \cup \msf((G/C) \setminus R^C) \cup R^C$.
\proof
We will modify the proof of the previous lemma. We will again consider all possible types
of edges which do not belong to the right-hand side and show that they are the
-heaviest edges of certain cycles. Every edge~$g$ of~$G$ lies either in~$C$, or in $H=(G/C)\setminus R_C$,
-or possibly in~$R_C$.
+heaviest edges of certain cycles. Every edge~$g$ of~$G$ lies either in~$C$, or in $H=(G/C)\setminus R^C$,
+or possibly in~$R^C$.
If $g\in C\setminus\msf(C)$, then the same argument as before applies.
If $g\in H\setminus\msf(H)$, we consider the cycle in~$H$ on which $e$~is the heaviest.
When $c$ (the vertex to which we have contracted~$C$) is outside this cycle, we are finished.
Otherwise we observe that the edges $e,f$ adjacent to~$c$ on this cycle cannot be corrupted
-(they would be in~$R_C$ otherwise, which is impossible). By contractibility of~$C$ there exists
+(they would be in~$R^C$ otherwise, which is impossible). By contractibility of~$C$ there exists
a~path~$P$ in~$(G\crpt R)\cup C$ such that all edges of~$P$ are lighter than $e$ or~$f$ and hence
also than~$g$. The weights of the edges of~$P$ in the original graph~$G$ cannot be higher than
in~$G\crpt R$, so the path~$P$ is lighter than~$g$ even in~$G$ and we can again perform the
of non-overlapping contractible subgraphs and put aside the edges which got corrupted in the process.
We recursively compute the MSF of the subgraphs and of the contracted graph. Then we take the
union of these MSF's and add the corrupted edges. According to the previous lemma, this does not produce
-the final MSF, but a~sparser graph containing it on which we can continue. More precisely:
-
-\corn{Gradual robust contraction}\id{gradrc}%
-Suppose that $G$~is a~weighted graph, $R$~a~set of its edges, and $\C=\{C_1,\ldots,C_k\}$ is a~collection
-of subgraphs contractible in~$G\crpt R_\C$, where $R_\C = R_{C_1} \cup \ldots \cup R_{C_k}$. Then:
-$$
-\msf(G) = \msf\left( \bigcup_i \msf(C_i) \cup \msf\biggl( \biggl( G / \bigcup_i C_i \biggr) \setminus R_\C \biggr) \cup R_\C \right).
-$$
-
-\proof
-By iterating the previous lemma and noting that subgraphs contractible in~$G\crpt R^\prime_\C$
-for a~subset~$R^\prime_\C$ of $R_\C$ are also contractible in~$G\crpt R_\C$.
-\qed
+the final MSF, but a~sparser graph containing it, on which we can continue.
We can formulate the exact partitioning algorithm as follows:
\algin A~graph~$G$ with an~edge comparison oracle, a~parameter~$t$ controlling the size of the subgraphs,
and an~accuracy parameter~$\varepsilon$.
\:Mark all vertices as ``live''.
-\:$\C\=\emptyset$, $R_\C\=\emptyset$. \cmt{Start with an~empty collection and no corrupted edges.}
+\:$\C\=\emptyset$, $R^\C\=\emptyset$. \cmt{Start with an~empty collection and no corrupted edges.}
\:While there is a~live vertex~$v_0$:
-\::$K=\{v_0\}$. \cmt{vertices of the tree we currently grow}
-\::$R=\emptyset$. \cmt{edges known to be corrupted}
+\::$T=\{v_0\}$. \cmt{the tree we currently grow}
+\::$K=\emptyset$. \cmt{edges known to be corrupted}
\::\<Create> a~soft heap with accuracy~$\varepsilon$ and \<Insert> the edges adjacent to~$v_0$ in it.
-\::While the heap is not empty and $\vert K\vert \le t$:
-\:::\<DeleteMin> an~edge $uv$ from the heap, assume $u\in K$.
-\:::If $uv$ was corrupted, add it to~$R$.
-\:::If $v\in K$, drop the edge and repeat the previous two steps.
-\:::$K\=K\cup\{v\}$.
+\::While the heap is not empty and $\vert T\vert \le t$:
+\:::\<DeleteMin> an~edge $uv$ from the heap, assume $u\in T$.
+\:::If $uv$ was corrupted, add it to~$K$.
+\:::If $v\in T$, drop the edge and repeat the previous two steps.
+\:::$T\=T\cup\{v\}$.
\:::If $v$ is dead, break out of the current loop.
\:::Insert all edges incident with~$v$ to the heap.
-\::$\C\=\C \cup \{G[K]\}$. \cmt{Record the subgraph.}
-\::\<Explode> the heap and add all remaining corrupted edges to~$R$.
-\::$R_\C\=R_\C \cup \{ R_K \}$. \cmt{Record the ``interesting'' corrupted edges.}
-\::$G\=G\setminus R_K$. \cmt{Remove the corrupted edges from~$G$.}
-\::Mark all vertices of~$K$ as ``dead''.
-\algout The collection $\C$ of contractible subgraphs and the set~$R_\C$ of
+\::$\C\=\C \cup \{G[T]\}$. \cmt{Record the subgraph induced by the tree.}
+\::\<Explode> the heap and add all remaining corrupted edges to~$K$.
+\::$R^\C\=R^\C \cup \{ K^T \}$. \cmt{Record the ``interesting'' corrupted edges.}
+\::$G\=G\setminus K^T$. \cmt{Remove the corrupted edges from~$G$.}
+\::Mark all vertices of~$T$ as ``dead''.
+\algout The collection $\C$ of contractible subgraphs and the set~$R^\C$ of
corrupted edges in the neighborhood of these subgraphs.
\endalgo
-\lemman{Partitioning to contractible subgraphs, Pettie \cite{pettie:optimal}}\id{partlemma}%
+\thmn{Partitioning to contractible subgraphs, Pettie \cite{pettie:optimal}}\id{partthm}%
Given a~weighted graph~$G$ and parameters $\varepsilon$ ($0<\varepsilon\le 1/2$)
and~$t$, the Partition algorithm \ref{partition} constructs a~collection
-$\C=\{C_1,\ldots,C_k\}$ of subgraphs and a~set~$R_\C$ of corrupted edges such that:
+$\C=\{C_1,\ldots,C_k\}$ of subgraphs and a~set~$R^\C$ of corrupted edges such that:
\numlist\ndotted
-\:All the $C_i$'s and the set~$R_\C$ are edge-disjoint.
+\:All the $C_i$'s and the set~$R^\C$ are edge-disjoint.
\:Each $C_i$ contains at most~$t$ vertices.
\:Each vertex of~$G$ is contained in at least one~$C_i$.
\:The connected components of the union of all $C_i$'s have at least~$t$ vertices each,
- except perhaps for those which are equal to a~connected component of~$G\setminus R_\C$.
-\:$\vert R_\C\vert \le 2\varepsilon m$.
-\:$\msf(G) = \msf\Bigl( \bigcup_i \msf(C_i) \cup \msf\bigl((G / \bigcup_i C_i) \setminus R_\C\bigr) \cup R_C \Bigr)$.
+ except perhaps for those which are equal to a~connected component of~$G\setminus R^\C$.
+\:$\vert R^\C\vert \le 2\varepsilon m$.
+\:$\msf(G) \subseteq \bigcup_i \msf(C_i) \cup \msf\bigl((G / \bigcup_i C_i) \setminus R^\C\bigr) \cup R^\C$.
\:The algorithm runs in time $\O(n+m\log (1/\varepsilon))$.
\endlist
\proof
The algorithm grows a~series of trees. A~tree is built from edges adjacent to live vertices
and once it is finished, all vertices of the tree die, so no edge is ever reused in another
-tree. Edges of~$R_\C$ are immediately deleted from the graph, so they never participate
+tree. Edges of~$R^\C$ are immediately deleted from the graph, so they never participate
in any tree. The algorithm stops only if all vertices are dead, so each vertex must have
entered some tree. Each $C_i$ is induced by some tree and the trees have at most~$t$ vertices
each, which limits the size of the $C_i$'s as well. This proves claims 1--3.
in the proof of Lemma \ref{ijsize}: How can a~new tree stop growing? Either it already
has~$t$ vertices, or it joins one of the existing trees (which only increases the
size of the component), or the heap becomes empty (which means that the tree spans
-a~full component of the current graph and hence also of~$G\setminus R_\C$).
+a~full component of the current graph and hence also of~$G\setminus R^\C$).
-Claim~5: The set~$R_\C$ contains a~subset of edges corrupted by the soft heaps over
+Claim~5: The set~$R^\C$ contains a~subset of edges corrupted by the soft heaps over
the course of the algorithm. As every edge is inserted to a~heap at most once
in every direction, the heaps can corrupt at worst $2\varepsilon m$ edges altogether.
-Claim~6 follows from the above Corollary \ref{gradrc} on Gradual robust contraction.
-\FIXME{It does not so far!}
+We will prove the remaining two claims as separate lemmata.
+\qed
+
+\lemman{Correctness of Partition, Claim 6 of Theorem \ref{partthm}}
+$$\msf(G) \subseteq \bigcup_i \msf(C_i) \cup \msf\biggl( \bigl(G / \bigcup_i C_i \bigr) \setminus R^\C\biggr) \cup R^\C.$$
-It remains to calculate the time complexity (claim~7):
-The inner loop (steps 7--13) processes the edges of the current subgraph~$G[K]$ and also
-the edges in its neighborhood $\delta(G[K])$. Steps 6 and~13 insert each such edge to the heap
+\proof
+By iterating the Robust contraction lemma (\ref{robcont}). Let $K_i$ be the set of edges
+corrupted when constructing the subgraph~$C_i$ in the $i$-th phase (iteration of the outer
+loop) of the algorithm, and similarly for the state of the other variables at that time.
+We will use induction on~$i$ to prove that the lemma holds at the end of every phase.
+
+At the beginning, the statement is obviously true, even as an~equality.
+In the $i$-th phase, we construct the subgraph~$C_j$ by running the partial Jarn\'\i{}k's algorithm on the graph
+$G_i = G\setminus\bigcup_{j<i} K_{\smash j}^{\C_j}$.
+If it were not for corruption, the subgraph~$C_i$ would be contractible, as we already know from Example \ref{jarniscont}.
+When the edges in~$K_i$ get corrupted, the subgraph is contractible in some corrupted graph
+$G_i \crpt K_i$. (We have to be careful as the edges are becoming corrupted gradually,
+but it is easy to check that it can only improve the situation.) Since $C_i$~is edge-disjoint
+with the previous trees, it is also a~contractible subgraph of $(G_i / \bigcup_{j<i} C_j) \crpt K_i$.
+Now we can use the Robust contraction lemma to show that:
+$$
+\msf\biggl(\bigl(G / \bigcup_{i<j} \bigr) \setminus \bigcup_{i<j} K_j^{\C_j} \biggr) \subseteq
+\msf(C_i) \cup \msf\biggl(\bigl(G / \bigcup_{i\le j} \bigr) \setminus \bigcup_{i\le j} K_j^{\C_j} \biggr) \cup K_i^{C_i},
+$$
+which completes the induction step.
+\qed
+
+\lemman{Efficiency of Partition, Claim 7 of Theorem \ref{partthm}}
+The Partition algorithm runs in time $\O(n+m\log(1/\varepsilon))$.
+
+\proof
+The inner loop (steps 7--13) processes the edges of the current subgraph~$C_i$ and also
+the edges in its neighborhood $\delta(C_i)$. Steps 6 and~13 insert each such edge to the heap
at most once, so steps 8--12 also visit each edge at most once. For every edge, we spend
$\O(\log(1/\varepsilon))$ time amortized on inserting it and $\O(1)$ on the other operations
(by Theorem \ref{softheap} on performance of the soft heaps).
-Each edge of~$G$ can participate in some $G[K]\cup \delta(G[K])$ only twice, then both of its ends
-are dead. The inner loop therefore processes $\O(m)$ edges total, so we spend $\O(m\log(1/\varepsilon))$
+Each edge of~$G$ can participate in some $C_i\cup \delta(C_i)$ only twice before both its
+ends die. The inner loop therefore processes $\O(m)$ edges total, so we spend $\O(m\log(1/\varepsilon))$
time there. The rest of the algorithm spends $\O(m)$ time on the other operations with subgraphs
and $\O(n)$ on identifying the live vertices.
\qed