From: Martin Mares Date: Mon, 21 Apr 2008 13:47:03 +0000 (+0200) Subject: Fix overflowing lines. X-Git-Tag: printed~56 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=55c1a7d3c5c439a7475393dba7a1bef73e4f583e;p=saga.git Fix overflowing lines. --- diff --git a/adv.tex b/adv.tex index dc4e70f..d614c25 100644 --- a/adv.tex +++ b/adv.tex @@ -438,10 +438,10 @@ However the choice of the parameter~$t$ can seem mysterious, the following lemma makes the reason clear: \lemma\id{ijphase}% -The $i$-th phase of the Iterated Jarn\'\i{}k's algorithm runs in time~$\O(m)$. +Each phase of the Iterated Jarn\'\i{}k's algorithm runs in time~$\O(m)$. \proof -During the phase, the heap always contains at most~$t_i$ elements, so it takes +During the $i$-th phase, the heap always contains at most~$t_i$ elements, so it takes time~$\O(\log t_i)=\O(m/n_i)$ to delete an~element from the heap. The trees~$R_i^j$ are edge-disjoint, so there are at most~$n_i$ \'s over the course of the phase. Each edge is considered at most twice (once per its endpoint), so the number @@ -667,7 +667,7 @@ As for every~$i$ the path $T[v,T_e[i+1]]$ is contained within $T[v,T_e[i]]$, the edges of~$P_e$ must have non-increasing weights, that is $w(P_e[i+1]) \le w(P_e[i])$. -\alg $\(u,p,T_p,P_p)$ --- process all queries in the subtree rooted +\alg $\(u,p,T_p,P_p)$ --- process all queries located in the subtree rooted at~$u$ entered from its parent via an~edge~$p$. \id{findpeaks} @@ -1026,7 +1026,7 @@ determines whether~$T$ is minimum and finds all $T$-light edges in~$G$ in time $ \proof Implement the Koml\'os's algorithm from Theorem \ref{verify} with the data structures developed in this section. -According to Lemma \ref{verfh}, it runs in time $\sum_e \O(\log\vert T_e\vert + q_e) +According to Lemma \ref{verfh}, the algorithm runs in time $\sum_e \O(\log\vert T_e\vert + q_e) = \O(\sum_e \log\vert T_e\vert) + \O(\sum_e q_e)$. The second sum is $\O(m)$ as there are $\O(1)$ query paths per edge, the first sum is $\O(\#\hbox{comparisons})$, which is $\O(m)$ by Theorem \ref{verify}. diff --git a/appl.tex b/appl.tex index 1b3b3da..13455b1 100644 --- a/appl.tex +++ b/appl.tex @@ -11,7 +11,7 @@ on various special cases of our problem and also to several related problems tha frequently arise in practice. \paran{Graphs with sorted edges} -When the edges are already sorted by their weights, we can use the Kruskal's +When the edges of the given graph are already sorted by their weights, we can use the Kruskal's algorithm to find the MST in time $\O(m\timesalpha(n))$ (Theorem \ref{kruskal}). We however can do better: As the minimality of a~spanning tree depends only on the order of weights and not on the actual values (The Minimality Theorem, \ref{mstthm}), we can diff --git a/dyn.tex b/dyn.tex index f22d5d0..c0d97e6 100644 --- a/dyn.tex +++ b/dyn.tex @@ -225,7 +225,7 @@ $AuvBvuC$ (with no~$u$ nor~$v$ in~$B$) splits to two sequences $AuC$ and $vBv$. If there was only a~single occurrence of~$v$, then $v$~was a~leaf and thus the sequence transforms from $AuvuC$ to $AuC$ and $v$~alone. -\em{Changing the root} of the tree~$T$ from~$v$ to~$w$ changes the sequence from $vAwBwCv$ to $wBwCvAw$. +\em{Changing the root} of the tree~$T$ from~$v$ to~$w$ changes its ET-sequence from $vAwBwCv$ to $wBwCvAw$. If $w$~was a~leaf, the sequence changes from $vAwCv$ to $wCvAw$. If $vw$ was the only edge of~$T$, the sequence $vw$ becomes $wv$. Note that this works regardless of the possible presence of~$w$ inside~$B$. @@ -461,7 +461,7 @@ to attach two lists of edges attached to vertices instead of one, or by using a~ \::Insert $f$ to~$F_0,\ldots,F_{\ell(f)}$. \endalgo -\algn{$\(uv,i)$ -- Search for an~replacement edge for~$uv$ at level~$i$} +\algn{$\(uv,i)$ -- Search for replacement for edge~$uv$ at level~$i$} \algo \algin An~edge~$uv$ to replace and a~level~$i$ such that there is no replacement at levels greater than~$i$. @@ -471,8 +471,9 @@ at levels greater than~$i$. \:Enumerate non-tree edges incident with vertices of~$T_1$ and stored in ${\cal E}_i$. For each edge~$xy$, $x\in T_1$, do: \::If $y\in T_2$, remove~$xy$ from~${\cal E}_i$ and return it to the caller. -\::Otherwise increase $\ell(xy)$ by one. This includes deleting~$xy$ from~${\cal E}_i$ - and inserting it to~${\cal E}_{i+1}$. +\::Otherwise increase $\ell(xy)$ by one. + \hfil\break + This includes deleting~$xy$ from~${\cal E}_i$ and inserting it to~${\cal E}_{i+1}$. \:If $i>0$, call $\(xy,i-1)$. \:Otherwise return \. \algout The replacement edge. @@ -497,7 +498,7 @@ ET-trees. Additionally, we call \ up to $L$ times. The initialization o \ costs $\O(\log n)$ per call, the rest is paid for by the edge level increases. -To bring the complexity of \ from $\O(\log n)$ down to $\O(\log n/\log\log n)$, +To bring the complexity of the operation \ from $\O(\log n)$ down to $\O(\log n/\log\log n)$, we apply the trick from Example \ref{accel} and store~$F_0$ in a~ET-tree with $a=\max(\lfloor\log n\rfloor,2)$. This does not hurt the complexity of insertions and deletions, but allows for faster queries. \qed @@ -613,7 +614,7 @@ updated in time $\O(\log^2 n)$ amortized per operation. The decremental MSF algorithm can be turned to a~fully dynamic one by a~blackbox reduction whose properties are summarized in the following theorem: -\thmn{MSF dynamization, Henzinger et al.~\cite{henzinger:twoec}, Holm et al.~\cite{holm:polylog}} +\thmn{MSF dynamization, Holm et al.~\cite{holm:polylog}} Suppose that we have a~decremental MSF algorithm with the following properties: \numlist\ndotted \:For any $a$,~$b$, it can be initialized on a~graph with~$a$ vertices and~$b$ edges. @@ -636,7 +637,7 @@ Delete of a~non-tree edge is performed on all $A_i$'s containing it and the repl sought among the replacement edges found in these structures. The unused replacement edges then have to be reinserted back to the structure. -The original reduction of Henzinger et al.~handles these reinserts by a~mechanism of batch insertions +The original reduction of Henzinger et al.~\cite{henzinger:twoec} handles these reinserts by a~mechanism of batch insertions supported by their decremental structure, which is not available in our case. Holm et al.~have replaced it by a~system of auxiliary edges inserted at various places in the structure. We refer to the article \cite{holm:polylog} for details. diff --git a/mst.tex b/mst.tex index d5a6911..63bd080 100644 --- a/mst.tex +++ b/mst.tex @@ -206,14 +206,14 @@ Another useful consequence is that whenever two graphs are isomorphic and the isomorphism preserves the relative order of weights, the isomorphism applies to their MST's as well: \defn -A~\df{monotone isomorphism} of two weighted graphs $G_1=(V_1,E_1,w_1)$ and +A~\df{monotone isomorphism} between two weighted graphs $G_1=(V_1,E_1,w_1)$ and $G_2=(V_2,E_2,w_2)$ is a bijection $\pi: V_1\rightarrow V_2$ such that for each $u,v\in V_1: uv\in E_1 \Leftrightarrow \pi(u)\pi(v)\in E_2$ and for each $e,f\in E_1: w_1(e)We can call $\(j,1,n,[n])$ for the unranking problem on~$[n]$, i.e., to get $L^{-1}(j,[n])$. +\>We can call $\(j,1,n,[n])$ for the unranking problem on~$[n]$, i.e., to calculate $L^{-1}(j,[n])$. \para The most time-consuming parts of the above algorithms are of course operations @@ -168,7 +168,7 @@ of all, we will make sure that the ranks are large numbers, so the word size of machine has to be large as well: \obs -$\log n! = \Theta(n\log n)$, therefore the word size~$W$ must be~$\Omega(n\log n)$. +$\log n! = \Theta(n\log n)$, therefore the word size must be~$\Omega(n\log n)$. \proof We have $n^n \ge n! \ge \lfloor n/2\rfloor^{\lfloor n/2\rfloor}$, so $n\log n \ge \log n! \ge \lfloor n/2\rfloor\cdot\log \lfloor n/2\rfloor$. @@ -448,7 +448,7 @@ If there is a~polynomial-time algorithm for lexicographic ranking of permutation a~set of restrictions which is a~part of the input, then $P=\#P$. \proof -We will show that a~polynomial-time ranking algorithm would imply a~polynomial-time +We will show that a~polynomial-time ranking algorithm would imply a~po\-ly\-nom\-ial-time algorithm for computing the permanent of an~arbitrary zero-one matrix, which is a~$\#P$-complete problem.