From: Martin Mares Date: Thu, 17 Jan 2008 21:20:36 +0000 (+0100) Subject: Classical ones. X-Git-Tag: printed~294 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=36a205a5091f23520c7cb9bd0cb05f7205cdee2b;p=saga.git Classical ones. --- diff --git a/biblio.bib b/biblio.bib index 71b6009..446a327 100644 --- a/biblio.bib +++ b/biblio.bib @@ -303,3 +303,41 @@ year={1889}, pages={376--378} } + +@article{ dijkstra:mst, + title={{A note on two problems in connexion with graphs}}, + author = "Dijkstra, E. W.", + journal={Numerische Mathematik}, + volume={1}, + number={1}, + pages={269--271}, + year={1959}, + publisher={Springer} +} + +@article{ prim:mst, + author = "Prim, R. C.", + title = "Shortest connection networks and some generalizations", + journal = "Bell System Technical Journal", + volume = "36", + year = "1957", + pages={567--574}, +} + +@article{ choquet:mst, + title={{Etude de certains r{\'e}seaux de routes (in French)}}, + author={Choquet, Gustave}, + journal={Comptes-rendus de l'Académie des Sciences}, + volume={206}, + pages={310}, + year={1938} +} + +@incollection { sollin:mst, + title={{Le trace de canalisation (in French)}}, + author={Sollin, M.}, + booktitle={Programming, Games, and Transportation Networks}, + editor={Berge, C. and Ghouilla-Houri, A.}, + publisher={Wiley, New York}, + year={1965} +} diff --git a/mst.tex b/mst.tex index 61ab3f8..f5d935c 100644 --- a/mst.tex +++ b/mst.tex @@ -271,8 +271,68 @@ are colored, so by the Blue lemma all blue edges are in~$T_{min}$ and by the Red lemma all other (red) edges are outside~$T_{min}$, so the blue edges are exactly~$T_{min}$. \qed +\section{Classical algorithms} +The three classical MST algorithms can be easily stated in terms of the Red-Blue meta-algorithm. +\algn{Kruskal \cite{kruskal:mst}} +\algo +\algin A~graph~$G$ with an edge comparison oracle. +\:Sort edges of~$G$ by their increasing weight. +\:$T\=\emptyset$. \cmt{an empty spanning subgraph} +\:For all edges $e$ in their sorted order: +\::If $T+e$ is acyclic, add~$e$ to~$T$. +\::Otherwise drop~$e$. +\algout Minimum spanning tree~$T$. +\endalgo + +\proof +During the course of the algorithm, $T$ is a forest with all edges blue. Adding~$e$ to~$T$ +in step~4 applies the Blue rule on the cut separating two components of~$T$ ($e$ is the lightest, +because all other edges of the cut have not been considered yet). Dropping~$e$ in step~5 corresponds +to the red rule on the cycle found ($e$~must be the heaviest, since all other edges of the +cycle have been already processed). At the end of the algorithm, all edges have been colored, +so~$T$ must be the~MST. +\qed + +\algn{Jarn\'\i{}k \cite{jarnik:ojistem}, Prim \cite{prim:mst}, Dijkstra \cite{dijkstra:mst}} +\algo +\algin A~graph~$G$ with an edge comparison oracle. +\:$T\=$ a single-vertex tree containing any vertex of~$G$. +\:While there are vertices outside $T$: +\::Pick the lightest edge $uv$ such that $u\in V(T)$ and $v\not\in V(T)$. +\::$T\=T+uv$. +\algout Minimum spanning tree~$T$. +\endalgo + +\proof +In every step of the algorithm, $T$ is always a blue tree. Step~4 corresponds to applying +the Blue rule to a cut between~$T$ and the rest of the given graph. We need not care about +the remaining edges, since for a connected graph the algorithm always stops with the right +number of blue edges. +\qed + +\algn{Bor\accent23uvka \cite{boruvka:ojistem}, Choquet \cite{choquet:mst}, Sollin \cite{sollin:mst} and others} +\algo +\algin A~graph~$G$ with an edge comparison oracle. +\:$T\=$ a forest consisting of vertices of~$G$ and no edges. +\:While $T$ is not connected: +\::For each component $T_i$ of~$T$, choose the lightest edge $e_i$ from the cut + separating $T_i$ from the rest of~$T$. +\::Add all $e_i$'s to~$T$. +\algout Minimum spanning tree~$T$. +\endalgo + +\proof +Again $T$ is a blue forest, because every addition of some edge~$e_i$ to~$T$ is a straightforward +application of the Blue rule. It remains to show that adding the edges simultaneously does not +produce a cycle. +\FIXME{Finish} +\qed + +\algn{Contracting version of Bor\accent23uvka's algorithm} + +% G has to be connected % mention Steiner trees % mention matroids % sorted weights