From: Martin Mares Date: Wed, 9 Apr 2008 18:27:07 +0000 (+0200) Subject: First bits of ET trees. X-Git-Tag: printed~107 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=8d8b17f0affcab162e84075e5f8b43f07daf7b96;p=saga.git First bits of ET trees. --- diff --git a/biblio.bib b/biblio.bib index 2c1aedd..f5d6355 100644 --- a/biblio.bib +++ b/biblio.bib @@ -1296,3 +1296,13 @@ publisher = {ACM}, address = {New York, NY, USA}, } + +@article{ henzinger:randdyn, + title={{Randomized Fully Dynamic Graph Algorithms with Polylogarithmic Time per Operation}}, + author={Henzinger, M.R. and King, V.}, + journal={Journal of the ACM}, + volume={46}, + number={4}, + pages={502--516}, + year={1999} +} diff --git a/dyn.tex b/dyn.tex index efa1f24..666da7d 100644 --- a/dyn.tex +++ b/dyn.tex @@ -180,12 +180,52 @@ need to change anything) and so is deletion of bridges (we just remove the bridg from the Link-Cut tree, knowing that there is no edge to replace it). The hard part is the search for replacement edges after an~edge of the MSF is deleted. -As this very problem has to be solved by algorithms for fully dynamic connectivity, +This very problem also has to be solved by algorithms for fully dynamic connectivity, we will take a~look on them first. %-------------------------------------------------------------------------------- \section{Eulerian Tour trees} +An~important stop on the road to fully dynamic algorithms has the name \df{Eulerian Tour trees} or +simply \df{ET-trees}. It is a~representation of forests introduced by Henzinger and King +\cite{henzinger:randdyn} in their randomized dynamic algorithms. It is similar to the one by Sleator +and Tarjan, but without orientation and without the path operations. Their advantage lies in +simplicity and also in their ease of extension to contain various auxiliary data attached to +vertices and edges of the original tree. + +\defn\id{eulseq}% +The \df{Eulerian Tour sequence} $\Eul(T)$ of a~rooted tree~$T$ is the sequence of vertices of~$T$ as visited +by the depth-first traversal of~$T$. More precisely, it is generated by the following algorithm $\(v)$ +when it is invoked on the root of the tree: +\algo +\:Record~$v$ in the sequence. +\:For each son~$w$ of~$v$: +\::Call $\(w)$ recursively. +\::Record~$w$. +\endalgo +\>One of the occurrences of each vertex is defined as its \df{designated occurrence} and it will +be used to store auxiliary data associated with the vertex. + +\obs +The ET sequence contains a~vertex of degree~$d$ exactly $d$~times except for the root which +occurs $d+1$ times. The whole sequence therefore contains $2n-1$ elements. It indeed describes the +order vertices on an~Eulerian tour in the tree with all edges doubled. Let us observe what happens +to the ET sequence when we modify the tree. + +When we \em{delete} an~edge $uv$ from the tree~$T$ (let $u$~be the parent of~$v$), the sequence +$\Eul(T) = Au_iv_1Bv_du_{i+1}C$ splits to two ET sequences $AuC$ and $v_1Bv_d$, Here $v_1$~is +the first occurrence of~$v$ in $\Eul(T)$ and $v_d$~is the last one. If there was only a~single +occurrence, $v$~was a~leaf and thus the second sequence will consists of $v$~alone. If $v_1$~or~$v_d$ +was the designated occurrence of~$v$, we redirect it to the new occurrence. + +\em{Changing the root} of the tree~$T$ from~$v$ to~$w$ changes $\Eul(T) = vAw_1Bw_dCv$ +to $w_1Bw_dCvAw_{d+1}$. + +\em{Joining} the roots of two trees by a~new edge, their ET sequences +$vAv$ and~$wBw$ combine to $vAvwBwv$. + + + \endpart diff --git a/macros.tex b/macros.tex index b350a78..6d063a7 100644 --- a/macros.tex +++ b/macros.tex @@ -54,6 +54,7 @@ \def\E{{\bb E}} \def\crpt{\mathbin{\Uparrow}} \def\C{{\cal C}} +\def\Eul{{\cal E}} \def\brk{\hfil\break} diff --git a/notation.tex b/notation.tex index 8693a5d..daba11c 100644 --- a/notation.tex +++ b/notation.tex @@ -92,6 +92,7 @@ \n{$a(x,n)$}{The inverse of the $x$-th row of the Ackermann's function \[ackerinv]} \n{$a(n)$}{The diagonal inverse of the Ackermann's function \[ackerinv]} \n{$\alpha(m,n)$}{$\alpha(m,n) := \min\{ x\ge 1 \mid A(x,4\lceil m/n\rceil) > \log n \}$ \[ackerinv]} +\n{$\Eul(T)$}{The Eulerian tour sequence for a~tree~$T$ \[eulseq]} } %--------------------------------------------------------------------------------