]> mj.ucw.cz Git - saga.git/commitdiff
Cleaned up contractions.
authorMartin Mares <mj@ucw.cz>
Mon, 21 Apr 2008 15:08:52 +0000 (17:08 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 21 Apr 2008 15:08:52 +0000 (17:08 +0200)
PLAN
adv.tex
macros.tex
mst.tex
notation.tex

diff --git a/PLAN b/PLAN
index 3375880172a992c39a3fc377d927bbb8fdef3779..891c896dd0d1c0dc049ee143adfb5e21708412a9 100644 (file)
--- a/PLAN
+++ b/PLAN
@@ -82,10 +82,8 @@ Ranking:
 
 Notation:
 
-* impedance mismatch in terminology: contraction of G along e vs. contraction of e.
 - use \delta(X) notation
 - unify use of n(G) vs. n
-* change the notation for contractions -- use double slash instead of the dot?
 - introduce \widehat\O early
 
 Typography:
diff --git a/adv.tex b/adv.tex
index 299da975a8adc90fc9edf9cb42f528fd178ca7ca..1e9f8740c3fd73b383df39431ed37acb8bd0a1af 100644 (file)
--- a/adv.tex
+++ b/adv.tex
@@ -181,7 +181,7 @@ $\deg(v)\le 4\varrho$.
 \:While $n(G)>1$:
 \::While there exists a~vertex~$v$ such that $\deg(v)\le t$:
 \:::Select the lightest edge~$e$ incident with~$v$.
-\:::Contract~$G$ along~$e$.
+\:::Contract~$e$ in~$G$.
 \:::$T\=T + \ell(e)$.
 \::Flatten $G$, removing parallel edges and loops.
 \algout Minimum spanning tree~$T$.
@@ -373,7 +373,7 @@ show a~faster integer algorithm soon.)
 As we already noted, the improved Jarn\'\i{}k's algorithm runs in linear time
 for sufficiently dense graphs. In some cases, it is useful to combine it with
 another MST algorithm, which identifies a~part of the MST edges and contracts
-the graph to increase its density. For example, we can perform several Bor\o{u}vka
+them to increase the density of the graph. For example, we can perform several Bor\o{u}vka
 steps  and find the rest of the MST by the Active Edge Jarn\'\i{}k's algorithm.
 
 \algn{Mixed Bor\o{u}vka-Jarn\'\i{}k}
@@ -404,7 +404,7 @@ 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 graph along the edges of~this forest and iterate.
+contract the edges of~this forest and iterate.
 
 \algn{Iterated Jarn\'\i{}k; Fredman and Tarjan \cite{ft:fibonacci}}\id{itjar}%
 \algo
@@ -423,7 +423,7 @@ contract the graph along the edges of~this forest and iterate.
 \:::Denote the resulting tree~$R$.
 \:::$F\=F\cup R$.
 \::$T\=T\cup \ell[F]$. \cmt{Remember MST edges found in this phase.}
-\::Contract~$G$ along all edges of~$F$ and flatten it.
+\::Contract all edges of~$F$ and flatten~$G$.
 \algout Minimum spanning tree~$T$.
 \endalgo
 
index c6a617ef669a1c49b00a8372bb586a8df0fc4c87..4fcc480fa88fb89fb7aca4c201b32f0899dcce2a 100644 (file)
@@ -67,6 +67,7 @@
 \def\E{{\bb E}}
 \def\crpt{\mathbin{\Uparrow}}
 \def\C{{\cal C}}
+\def\sgc{\mathbin{.}}
 
 \def\brk{\hfil\break}
 
diff --git a/mst.tex b/mst.tex
index 5db046349f89e8333f938f2528adf360184151cb..0cdab6db59aac92ad8fe66c538155ee2f9c01f05 100644 (file)
--- a/mst.tex
+++ b/mst.tex
@@ -544,7 +544,7 @@ We will study dynamic maintenance of connected components in more detail in Chap
 
 While the classical algorithms are based on growing suitable trees, they
 can be also reformulated in terms of edge contraction. Instead of keeping
-a forest of trees, we can keep each tree contracted to a single vertex.
+a~forest of trees, we can keep each tree contracted to a single vertex.
 This replaces the relatively complex tree-edge incidencies by simple
 vertex-edge incidencies, potentially speeding up the calculation at the
 expense of having to perform the contractions.
@@ -584,7 +584,7 @@ lemma applied to a~two-edge cycle, as we will see in \ref{multimst}.)
 \:While $n(G)>1$:
 \::For each vertex $v_k$ of~$G$, let $e_k$ be the lightest edge incident to~$v_k$.
 \::$T\=T\cup \{ \ell(e_k) \}$. \cmt{Remember labels of all selected edges.}
-\::Contract $G$ along all edges $e_k$, inheriting labels and weights.\foot{In other words, we ask the comparison oracle for the edge $\ell(e)$ instead of~$e$.}
+\::Contract all edges $e_k$, inheriting labels and weights.\foot{In other words, we ask the comparison oracle for the edge $\ell(e)$ instead of~$e$.}
 \::Flatten $G$, removing parallel edges and loops.
 \algout Minimum spanning tree~$T$.
 \endalgo
@@ -658,7 +658,7 @@ algorithms as well. The following lemma shows the gist:
 
 \lemman{Contraction of MST edges}\id{contlemma}%
 Let $G$ be a weighted graph, $e$~an arbitrary edge of~$\mst(G)$, $G/e$ the multigraph
-produced by contracting $G$ along~$e$, and $\pi$ the bijection between edges of~$G-e$ and
+produced by contracting~$e$ in~$G$, and $\pi$ the bijection between edges of~$G-e$ and
 their counterparts in~$G/e$. Then: $$\mst(G) = \pi^{-1}[\mst(G/e)] + e.$$
 
 \proof
index ad256d8136b1e8d1847e7ea359409ec513ba184c..7c12dcd1eecebdc61e2eb2cef36f01575f7f9a7e 100644 (file)
@@ -76,7 +76,7 @@
 \n{$G[U]$}{subgraph induced by a~set $U\subset V(G)$}
 \n{$X \choose k$}{the set of all $k$-element subsets of a set~$X$}
 \n{$G/e$}{multigraph contraction \[contract]}
-\n{$G.e$}{simple graph contraction \[simpcont]}
+\n{$G\sgc e$}{simple graph contraction \[simpcont]}
 \n{$G/X$, $G.X$}{contraction by a~set $X$ of vertices or edges \[setcont]}
 \n{$f[X]$}{function applied to a set: $f[X]:=\{ f(x) \mid x\in X \}$}
 \n{$f[e]$}{as edges are two-element sets, $f[e]$ maps both endpoints of an edge~$e$}
@@ -124,7 +124,8 @@ consider multigraphs with no multiple edges nor loops and simple graphs to be
 the same objects, although they formally differ.
 
 \defn\id{contract}%
-Let $G=(V,E,M)$ be a multigraph and $e=xy$ its edge. \df{(Multigraph) contraction of~$G$ along~$e$}
+Let $G=(V,E,M)$ be a multigraph and $e=xy$ its arbitrary edge.
+The \df{(multigraph) contraction of~$e$ in~$G$}
 produces a multigraph $G/e=(V',E',M')$ such that:
 $$\eqalign{
 V' &= (V(G) \setminus \{x,y\}) \cup \{v_e\},\quad\hbox{where $v_e$ is a new vertex,}\cr
@@ -133,25 +134,26 @@ M'(f) &= \{ m(v) \mid v\in M(f) \} \quad\hbox{for every $f=\in E'$, and}\cr
 m(x) &= \cases{v_e & \hbox{for $v=x,y,$}\cr v & \hbox{otherwise.}} \cr
 }$$
 
-Sometimes we need contraction for simple graphs as well. It corresponds to performing
-the multigraph contraction, unifying parallel edges and deleting loops.
+Sometimes we need contraction for simple graphs as well. It is equivalent to performing
+the multigraph contraction and then unifying parallel edges and deleting loops.
 
 \defn\id{simpcont}%
-Let $G=(V,E)$ a simple graph and $e=xy$ its edge. \df{(Simple graph) contraction of~$G$ along~$e$}
-produces a graph $G.e=(V',E')$ such that:
+Let $G=(V,E)$ a simple graph and $e=xy$ its arbitrary edge.
+The \df{(simple graph) contraction of~$e$ in~$G$}
+produces a graph $G\sgc e=(V',E')$ such that:
 $$\eqalign{
 V' &= (V(G) \setminus \{x,y\}) \cup \{v_e\},\quad\hbox{where $v_e$ is a new vertex,}\cr
 E' &= \{ \{m(x),m(y)\} \mid xy\in E \land m(x)\ne m(y) \},\cr
-m(x) &= \cases{v_e & \hbox{for $v=x,y,$}\cr v & \hbox{otherwise.}} \cr
+m(x) &= \cases{v_e & \hbox{for $v=x,y,$}\cr \noalign{\vskip5pt} v & \hbox{otherwise.}} \cr
 }$$
 
 \defn\id{setcont}%
-We can also extend the above definitions to contractions by a~set of vertices or edges.
+We can also extend the above definitions to contractions of a~set of vertices or edges.
 For $F\subseteq E(G)$, the graph $G/F$ is defined as $(G/f_1)/f_2/\ldots/f_k$ where
 $f_1,\ldots,f_k$ are the elements of~$F$ (you can observe that the result
 does not depend on the order of edges). For $U\subseteq V(G)$, we define $G/U$
 as the graph with all vertices of~$U$ merged to a~single vertex, that is $(G\cup U^*)/U^*$,
-where $U^*$ is the complete graph on~$U$. Similarly for $G.F$ and $G.U$.
+where $U^*$ is the complete graph on~$U$. Similarly for $G\sgc F$ and $G\sgc U$.
 
 %--------------------------------------------------------------------------------