From: Martin Mares Date: Wed, 4 Jun 2008 10:37:53 +0000 (+0200) Subject: Pruning... X-Git-Tag: phd-final~12 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b68ca76d2929272b032a6e6e43db02e4a070546c;p=saga.git Pruning... --- diff --git a/abstract.tex b/abstract.tex index 5e1afff..cbf1c3d 100644 --- a/abstract.tex +++ b/abstract.tex @@ -474,28 +474,8 @@ A~good choice of the stopping condition is to place a~limit on the size of the h We start with an~arbitrary vertex, grow the tree as usually and once the heap gets too large, we conserve the current tree and start with a~different vertex and an~empty heap. When this process runs out of vertices, it has identified a~sub-forest of the MST, so we can -contract the edges of~this forest and iterate. - -\algn{Iterated Jarn\'\i{}k; Fredman and Tarjan \cite{ft:fibonacci}}\id{itjar}% -\algo -\algin A~graph~$G$ with an edge comparison oracle. -\:$T\=\emptyset$. \cmt{edges of the MST} -\:$\ell(e)\=e$ for all edges~$e$. \cmt{edge labels as usually} -\:$m_0\=m$. -\:While $n>1$: \cmt{We will call iterations of this loop \df{phases}.} -\::$F\=\emptyset$. \cmt{forest built in the current phase} -\::$t\=2^{\lceil 2m_0/n \rceil}$. \cmt{the limit on heap size} -\::While there is a~vertex $v_0\not\in F$: -\:::Run the Jarn\'\i{}k's algorithm from~$v_0$, stop when: -\::::all vertices have been processed, or -\::::a~vertex of~$F$ has been added to the tree, or -\::::the heap has grown to more than~$t$ elements. -\:::Denote the resulting tree~$R$. -\:::$F\=F\cup R$. -\::$T\=T\cup \ell[F]$. \cmt{Remember MST edges found in this phase.} -\::Contract all edges of~$F$ and flatten~$G$. -\algout Minimum spanning tree~$T$. -\endalgo +contract the edges of~this forest and iterate. This improves the time complexity +significantly: \thm\id{itjarthm}% The Iterated Jarn\'\i{}k's algorithm finds the MST of the input graph in time @@ -611,9 +591,7 @@ and on the peak-finding algorithm of the previous section, yields the following \thm The KKT algorithm runs in time $\O(\min(n^2,m\log n))$ in the worst case on the RAM. - -\thm -The expected time complexity of the KKT algorithm on the RAM is $\O(m)$. +The expected time complexity is $\O(m)$. \chapter{Approaching Optimality}\id{optchap}% @@ -637,20 +615,6 @@ the expense of \df{corrupting} a~fraction of the inserted elements by raising their values (the values are however never lowered). This allows for a~trade-off between accuracy and speed, controlled by a~parameter~$\varepsilon$. -\defnn{Soft heap interface}% -The \df{soft heap} contains a~set of distinct items from a~totally ordered universe and it -supports the following operations: -\itemize\ibull -\:$\(\varepsilon)$ --- Create an~empty soft heap with the given accuracy parameter~$\varepsilon$. -\:$\(H,x)$ --- Insert a~new item~$x$ into the heap~$H$. -\:$\(P,Q)$ --- Merge two heaps into one, more precisely move all items of a~heap~$Q$ - to the heap~$P$, destroying~$Q$ in the process. Both heaps must have the same~$\varepsilon$. -\:$\(H)$ --- Delete the minimum item of the heap~$H$ and return its value - (optionally signalling that the value has been corrupted). -\:$\(H)$ --- Destroy the heap and return a~list of all items contained in it - (again optionally marking those corrupted). -\endlist - \>In the thesis, we describe the exact mechanics of the soft heaps and analyse its complexity. The important properties are characterized by the following theorem: @@ -663,10 +627,9 @@ heap contains at most $\varepsilon n$ corrupted items. \section{Robust contractions} Having the soft heaps at hand, we would like to use them in a~conventional MST -algorithm in place of a~normal heap. The most efficient specimen of a~heap-based -algorithm we have seen so far is the Jarn\'\i{}k's algorithm. -We can try implanting the soft heap in it, preferably in the earlier -version without Fibonacci heaps as the soft heap lacks the \ operation. +algorithm in place of a~normal heap. We can for example try implanting the soft heap +in the Jarn\'i{}k's algorithm, preferably in the earlier +version without Fibonacci heaps as the soft heaps lack the \ operation. This brave, but somewhat simple-minded attempt is however doomed to fail because of corruption of items inside the soft heap. While the basic structural properties of MST's no longer hold in corrupted graphs, @@ -686,8 +649,8 @@ of contractible subgraphs: \lemman{Generalized contraction} When~$C\subseteq G$ is a~contractible subgraph, then $\msf(G)=\msf(C) \cup \msf(G/C)$. -We can now bring corruption back to the game and state a~``robust'' version -of this lemma. A~notation for corrupted graphs will be handy: +Let us bring corruption back to the game and state a~``robust'' version +of this lemma. \nota\id{corrnota}% When~$G$ is a~weighted graph and~$R$ a~subset of its edges, we will use $G\crpt @@ -800,18 +763,7 @@ We will describe the algorithm as a~recursive procedure: \endalgo \>Correctness of this algorithm immediately follows from the Partitioning theorem (\ref{partthm}) -and from the proofs of the respective algorithms used as subroutines. As for time complexity: - -\lemma\id{optlemma}% -The time complexity $T(m,n)$ of the Optimal algorithm satisfies the following recurrence: -$$ -T(m,n) \le \sum_i c_1 D(C_i) + T(m/2, n/4) + c_2 m, -$$ -where~$c_1$ and~$c_2$ are some positive constants and $D$~is the decision tree complexity -from the previous section. - -It turns out that the recurrence is satisfied by the decision tree complexity function -$D(m,n)$ itself, so we can prove the following theorem by induction: +and from the proofs of the respective algorithms used as subroutines. As for time complexity, we prove: \thm The time complexity of the Optimal algorithm is $\Theta(D(m,n))$. @@ -1254,7 +1206,7 @@ $L(\pi,[n])$. \:Return~$\pi$. \endalgo -\>We can call $\(j,1,n,[n])$ for the unranking problem on~$[n]$, i.e., to calculate $L^{-1}(j,[n])$. +\>We can call $\(j,1,n,[n])$ to calculate $L^{-1}(j,[n])$. \paran{Representation of sets}% The most time-consuming parts of the above algorithms are of course operations