]> mj.ucw.cz Git - ga.git/commitdiff
Slidy k rovinnému kreslení mají i anglickou verzi
authorMartin Mares <mj@ucw.cz>
Thu, 10 Jan 2019 08:34:17 +0000 (09:34 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 10 Jan 2019 08:34:17 +0000 (09:34 +0100)
11-planar/slides/Makefile
11-planar/slides/planar-cs.tex [new file with mode: 0644]
11-planar/slides/planar-en.tex [new file with mode: 0644]
11-planar/slides/planar.tex [deleted file]

index c602f59a51a240b33adb915988bc24e35bd9dfe7..bbc4d6cc328134d83a162e7d825b19c4d0519c7f 100644 (file)
@@ -1,5 +1,7 @@
-all:
-       pdflatex planar.tex
+all: planar-cs.pdf planar-en.pdf
+
+%.pdf: %.tex
+       pdflatex $<
 
 clean:
        rm -f *.{aux,log,nav,out,pdf,snm,toc}
diff --git a/11-planar/slides/planar-cs.tex b/11-planar/slides/planar-cs.tex
new file mode 100644 (file)
index 0000000..c82fbec
--- /dev/null
@@ -0,0 +1,85 @@
+\documentclass{beamer}
+\usepackage[utf8]{inputenc}
+\usepackage[czech]{babel}
+\usepackage{palatino}
+\usetheme{Warsaw}
+\title[Kreslení grafů do roviny]{Kreslení grafů do roviny}
+\author[Martin Mareš]{Martin Mareš\\\texttt{mj@ucw.cz}}
+\institute{Charles University in Prague\\Faculty of Math and Physics\\Department of Applied Mathematics}
+\date{}
+\begin{document}
+\setbeamertemplate{navigation symbols}{}
+\setbeamerfont{title page}{family=\rmfamily}
+
+\begin{frame}{Stavy vrcholů}
+
+Při kreslení vrcholu~$v$ budeme označovat vrcholy v~už nakreslené
+části takto:
+
+~
+
+\begin{itemize}
+
+\item
+Vrchol~$w$ je {\bf externí,} pokud z~něj vede zpětná hrana do~ještě
+nenakreslené části grafu (\uv{nad $v$}), nebo pokud je artikulací,
+pod níž je připojen podgraf obsahující takový vrchol. Ostatní vrcholy
+jsou {\bf interní.}
+
+\item
+Vrchol~$w$ je {\bf živý,} pokud z~něj vede zpětná hrana do~$v$
+nebo pokud je pod ním připojen blok s~živým vrcholem.
+
+\item
+Podobně pro bloky (podle kořene) a zpětné hrany.
+
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{Pravidla obcházení}
+
+{\bf P1:}
+V~každém živém vrcholu zpracováváme:
+\begin{enumerate}
+\item zpětné hrany do~$v$
+\item podřízené živé interní bloky
+\item podřízené živé externí bloky
+\end{enumerate}
+
+~
+
+{\bf P2:}
+Vstoupíme-li do podřízeného bloku, vybereme si směr:
+\begin{enumerate}
+\item k~živému internímu vrcholu
+\item k~živému externímu vrcholu
+\end{enumerate}
+
+Pokud se tento směr liší od~dosavadního, podřízený blok a vše pod ním
+překlopíme.
+
+\end{frame}
+
+\begin{frame}{Algoritmus}
+
+\begin{enumerate}
+\item Pokud má graf více než $3n-6$ hran $\Rightarrow$ {\sc nerovinný.}
+\item Prohledáme graf do hloubky: {\it Enter, Ancestor, LowPoint.}
+\item<3-> Sestrojíme {\it BlockList}y a setřídíme je.
+\item Pro vrcholy~$v$ v~pořadí klesajících {\it Enter\/}ů kreslíme:
+\item Nakreslíme stromové hrany z~$v$ dolů jako triviální bloky (2-cykly).
+\advance\leftskip by 2em
+\item<4-> Označíme živý podgraf.
+\item Pro každého syna vrcholu~$v$ obcházíme hranici v~obou směrech
+      a kreslíme zpětné hrany do~$v$. Řídíme se pravidly {\bf P1} a {\bf P2,}
+      za externím vrcholem se zastavíme.
+\item Zbývá-li nějaká zpětná hrana do~$v$ $\Rightarrow$ {\sc nerovinný.}
+
+\advance\leftskip by -2em
+\item<2-> Zorientujeme seznamy sousedů $\Rightarrow$ hotové nakreslení.
+\end{enumerate}
+
+\end{frame}
+
+\end{document}
diff --git a/11-planar/slides/planar-en.tex b/11-planar/slides/planar-en.tex
new file mode 100644 (file)
index 0000000..e7c1669
--- /dev/null
@@ -0,0 +1,83 @@
+\documentclass{beamer}
+\usepackage[utf8]{inputenc}
+\usepackage{palatino}
+\usetheme{Warsaw}
+\title[Planar embedding of graphs]{Planar embedding of graphs}
+\author[Martin Mareš]{Martin Mareš\\\texttt{mj@ucw.cz}}
+\institute{Charles University in Prague\\Faculty of Math and Physics\\Department of Applied Mathematics}
+\date{}
+\begin{document}
+\setbeamertemplate{navigation symbols}{}
+\setbeamerfont{title page}{family=\rmfamily}
+
+\begin{frame}{Vertex states}
+
+When embedding a~vertex~$v$, we will classify already embedded vertices
+as follows:
+
+~
+
+\begin{itemize}
+
+\item
+A~vertex~$w$ is {\bf external,} if it has a~back edge to a~not-yet-embedded
+ancestor (``above~$v$''), or if it is an~articulation point with a~subordinate
+block containing an~external vertex. All other vertices are {\bf internal.}
+
+\item
+A~vertex~$w$ is {\bf live,} if it has a~back edge to~$v$ or if it has
+a~subordinate block containing a~live vertex.
+
+\item
+Similarly for blocks (by their roots) and back edges.
+
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{Walking rules}
+
+{\bf R1:}
+In each live vertex, we process (in this order):
+\begin{enumerate}
+\item back edges to~$v$
+\item subordinate live internal blocks
+\item subordinate live external blocks
+\end{enumerate}
+
+~
+
+{\bf R2:}
+when we enter a~subordinate block, we choose the walking direction (in this order):
+\begin{enumerate}
+\item to a~live internal vertex
+\item to a~live external vertex
+\end{enumerate}
+
+If this direction differs from the present one, the subordinate block and all
+its descendant blocks will be flipped.
+
+\end{frame}
+
+\begin{frame}{The Boyer-Myrvold algorithm}
+
+\begin{enumerate}
+\item If the graph has more than $3n-6$ edges $\Rightarrow$ {\sc not planar.}
+\item Depth-first search on the graph: {\it Enter, Ancestor, LowPoint.}
+\item<3-> We construct {\it BlockList\/}s and sort them.
+\item We embed vertices~$v$ in order of decreasing {\it Enter\/}s:
+\item Embed tree edges from~$v$ down as trivial blocks (2-cycles):
+\advance\leftskip by 2em
+\item<4-> We mark the live subgraph.
+\item For each child of the vertex~$v$, we walk around the boundary in both directions
+      and we embed back edges to~$v$. We follow the rules {\bf R1} and {\bf R2.}
+      We stop when we visit an external vertex.
+\item If there remains any non-embedded back edge to~$v$ $\Rightarrow$ {\sc not planar.}
+
+\advance\leftskip by -2em
+\item<2-> We orient all lists of neighbors $\Rightarrow$ final embedding.
+\end{enumerate}
+
+\end{frame}
+
+\end{document}
diff --git a/11-planar/slides/planar.tex b/11-planar/slides/planar.tex
deleted file mode 100644 (file)
index 9d53f61..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-\documentclass{beamer}
-\usepackage[latin2]{inputenc}
-\usepackage[czech]{babel}
-\usepackage{palatino}
-\usetheme{Warsaw}
-\title[Kreslení grafů do roviny]{Kreslení grafů do roviny}
-\author[Martin Mareš]{Martin Mareš\\\texttt{mj@ucw.cz}}
-\institute{Charles University in Prague\\Faculty of Math and Physics\\Department of Applied Mathematics}
-\date{}
-\begin{document}
-\setbeamertemplate{navigation symbols}{}
-\setbeamerfont{title page}{family=\rmfamily}
-
-\begin{frame}{Stavy vrcholů}
-
-Při kreslení vrcholu~$v$ budeme označovat vrcholy v~už nakreslené
-části takto:
-
-~
-
-\begin{itemize}
-
-\item
-Vrchol~$w$ je {\bf externí,} pokud z~něj vede zpětná hrana do~ještě
-nenakreslené části grafu (\uv{nad $v$}), nebo pokud je artikulací,
-pod níž je připojen podgraf obsahující takový vrchol. Ostatní vrcholy
-jsou {\bf interní.}
-
-\item
-Vrchol~$w$ je {\bf živý,} pokud z~něj vede zpětná hrana do~$v$
-nebo pokud je pod ním připojen blok s~živým vrcholem.
-
-\item
-Podobně pro bloky (podle kořene) a zpětné hrany.
-
-\end{itemize}
-
-\end{frame}
-
-\begin{frame}{Pravidla obcházení}
-
-{\bf P1:}
-V~každém živém vrcholu zpracováváme:
-\begin{enumerate}
-\item zpětné hrany do~$v$
-\item podřízené živé interní bloky
-\item podřízené živé externí bloky
-\end{enumerate}
-
-~
-
-{\bf P2:}
-Vstoupíme-li do podřízeného bloku, vybereme si směr:
-\begin{enumerate}
-\item k~živému internímu vrcholu
-\item k~živému externímu vrcholu
-\end{enumerate}
-
-Pokud se tento směr liší od~dosavadního, podřízený blok a vše pod ním
-překlopíme.
-
-\end{frame}
-
-\begin{frame}{Algoritmus}
-
-\begin{enumerate}
-\item Pokud má graf více než $3n-6$ hran $\Rightarrow$ {\sc nerovinný.}
-\item Prohledáme graf do hloubky: {\it Enter, Ancestor, LowPoint.}
-\item<3-> Sestrojíme {\it BlockList}y a setřídíme je.
-\item Pro vrcholy~$v$ v~pořadí klesajících {\it Enter\/}ů kreslíme:
-\item Nakreslíme stromové hrany z~$v$ dolů jako triviální bloky (2-cykly).
-\advance\leftskip by 2em
-\item<4-> Označíme živý podgraf.
-\item Pro každého syna vrcholu~$v$ obcházíme hranici v~obou směrech
-      a kreslíme zpětné hrany do~$v$. Řídíme se pravidly {\bf P1} a {\bf P2,}
-      za externím vrcholem se zastavíme.
-\item Zbývá-li nějaká zpětná hrana do~$v$ $\Rightarrow$ {\sc nerovinný.}
-
-\advance\leftskip by -2em
-\item<2-> Zorientujeme seznamy sousedů $\Rightarrow$ hotové nakreslení.
-\end{enumerate}
-
-\end{frame}
-
-\end{document}