2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00

Einige Inhalte hinzugefügt

This commit is contained in:
Martin Thoma 2013-06-11 21:51:30 +02:00
parent a8ab55d4b3
commit e63c4f3335
16 changed files with 539 additions and 33 deletions

View file

@ -1,14 +1,173 @@
\subsection{Weitere Aufgaben}
\subsection{Aufgabe 3}
\begin{frame}{Aufgabe 3}
Zeigen Sie: Ein Kreis ist genau dann bipartit, wenn er gerade Länge hat.
\end{frame}
% TODO
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{frame}{Aufgabe 3 - Lösung}
Idee: Knoten abwechselnd färben
\tikzstyle{selected edge} = [draw,line width=5pt,-,black!50]
\begin{center}
\adjustbox{max size={\textwidth}{0.8\textheight}}{
\begin{tikzpicture}
\node[vertex] (a) at (0,0) {};
\node[vertex] (b) at (2,0) {};
\node[vertex] (c) at (2,2) {};
\node[vertex] (d) at (0,2) {};
\node[vertex] (e) at (1,4) {};
\draw (a) -- (b) -- (c) -- (e) -- (d) -- (a);
\node<2->[vertex, red] (a) at (0,0) {};
\node<3->[vertex, blue] (b) at (2,0) {};
\node<4->[vertex, red] (c) at (2,2) {};
\node<5->[vertex, blue] (e) at (1,4) {};
\node<6->[vertex, red] (d) at (0,2) {};
\begin{pgfonlayer}{background}
\path<3->[selected edge] (a.center) edge node {} (b.center);
\path<4->[selected edge] (b.center) edge node {} (c.center);
\path<5->[selected edge] (c.center) edge node {} (e.center);
\path<6->[selected edge] (e.center) edge node {} (d.center);
\path<7->[selected edge,lime] (d.center) edge node {} (a.center);
\end{pgfonlayer}
\end{tikzpicture}
}
\end{center}
\end{frame}
\subsection{Aufgabe 4}
\begin{frame}{Aufgabe 4}
Zeigen Sie: Ein Graph $G$ ist genau dann bipartit, wenn er nur Kreise
gerade Länge hat.
\end{frame}
\begin{frame}{Aufgabe 4: Lösung, Teil 1}
\underline{Vor.:} Sei $G = (E, K)$ ein zus. Graph. \pause
\underline{Beh.:} $G$ ist bipartit $\Rightarrow G$ hat keine Kreis ungerader Länge \pause
\underline{Bew.:} durch Widerspruch \pause
\underline{Annahme:} $G$ hat Kreis ungerader Länge \pause
$\xRightarrow[]{A.4}$ Ein Subgraph von $G$ ist nicht bipartit \pause
$\Rightarrow$ Widerspruch zu \enquote{$G$ ist bipartit} \pause
$\Rightarrow$ $G$ hat keinen Kreis ungerader Länge $\blacksquare$
\end{frame}
\begin{frame}{Aufgabe 4: Lösung, Teil 2}
\underline{Vor.:} Sei $G = (E, K)$ ein zus. Graph. \pause
\underline{Beh.:} $G$ hat keinen Kreis ungerader Länge $\Rightarrow G$ ist bipartit \pause
\underline{Bew.:} Konstruktiv \pause
Färbe Graphen mit Breitensuche $\blacksquare$
\end{frame}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{frame}{Aufgabe 4 - Beispiel}
\tikzstyle{selected edge} = [draw,line width=5pt,-,black!50]
\begin{center}
\adjustbox{max size={\textwidth}{0.8\textheight}}{
\begin{tikzpicture}
\node[vertex] (a) at (1,1) {};
\node[vertex] (b) at (2,0) {};
\node[vertex] (c) at (4,0) {};
\node[vertex] (d) at (1,2) {};
\node[vertex] (e) at (2,2) {};
\node[vertex] (f) at (3,2) {};
\node[vertex] (g) at (2,4) {};
\node[vertex] (h) at (3,3) {};
\node[vertex] (i) at (4,2) {};
\node[vertex] (j) at (1,3) {};
\draw (a) -- (b);
\draw (a) -- (d);
\draw (b) -- (e);
\draw (b) -- (c);
\draw (c) -- (f);
\draw (d) -- (e);
\draw (d) -- (j);
\draw (e) -- (f);
\draw (f) -- (i);
\draw (g) -- (j);
\draw (g) -- (h);
\node<2->[vertex, red] (a) at (1,1) {};
\node<3->[vertex, blue] (b) at (2,0) {};
\node<3->[vertex, blue] (d) at (1,2) {};
\node<4->[vertex, red] (c) at (4,0) {};
\node<4->[vertex, red] (e) at (2,2) {};
\node<4->[vertex, red] (j) at (1,3) {};
\node<5->[vertex, blue] (f) at (3,2) {};
\node<5->[vertex, blue] (g) at (2,4) {};
\node<6->[vertex, red] (h) at (3,3) {};
\node<6->[vertex, red] (i) at (4,2) {};
\begin{pgfonlayer}{background}
\path<3->[selected edge] (a.center) edge node {} (b.center);
\path<3->[selected edge] (a.center) edge node {} (d.center);
\path<4->[selected edge] (b.center) edge node {} (c.center);
\path<4->[selected edge] (b.center) edge node {} (e.center);
\path<4->[selected edge] (d.center) edge node {} (j.center);
\path<4->[selected edge] (d.center) edge node {} (e.center);
\path<5->[selected edge] (j.center) edge node {} (g.center);
\path<5->[selected edge] (e.center) edge node {} (f.center);
\path<5->[selected edge] (c.center) edge node {} (f.center);
\path<6->[selected edge] (g.center) edge node {} (h.center);
\path<6->[selected edge] (f.center) edge node {} (i.center);
\end{pgfonlayer}
\end{tikzpicture}
}
\end{center}
\end{frame}
\subsection{Aufgabe 9}
\begin{frame}{Aufgabe 9, Teil 1}
Im folgenden sind die ersten drei Graphen $G_1, G_2, G_3$ einer
Folge $(G_n)$ aus Graphen abgebildet. Wie sieht $G_4$ aus?
\begin{gallery}
\galleryimage{graphs/triangular-1}
\galleryimage{graphs/triangular-2}
\galleryimage{graphs/triangular-3}
\end{gallery}
\end{frame}
\begin{frame}{Aufgabe 9, Teil 2}
Wieviele Ecken / Kanten hat $G_n = (E_n, K_n)$?
\end{frame}
\begin{frame}{Aufgabe 9, Teil 2: Antwort}
Ecken:
\[|E_n| = |E_{n-1}| + (n+1) = \sum_{i=1}^{n+1} = \frac{n^2 + 2n+2}{2}\]
Kanten:
\begin{align}
|K_n| &= |K_{n-1}| + \underbrace{((n+1)-1)+2}_{\text{außen}} + (n-1) \cdot 2\\
&= |K_{n-1}| + n+2+2n-2\\
&= |K_{n-1}| + 3n\\
&= \sum_{i=1}^{n} 3i = 3 \sum_{i=1}^{n} i \\
&= 3 \frac{n^2 + n}{2}
\end{align}
\end{frame}
\subsection{Bildquelle}
\begin{frame}{Bildquelle}
\begin{itemize}
\item \href{http://commons.wikimedia.org/wiki/File:Konigsberg\_bridges.png}{http://commons.wikimedia.org/wiki/File:Konigsberg\_bridges.png}
\item \href{http://commons.wikimedia.org/wiki/File:Unit\_disk\_graph.svg}{http://commons.wikimedia.org/wiki/File:Unit\_disk\_graph.svg}
\item \href{http://goo.gl/maps/WnXRh}{Google Maps} (Grafiken \TCop 2013 Cnes/Spot Image, DigitalGlobe)
\end{itemize}
\end{frame}

View file

@ -28,12 +28,37 @@ Kantenmenge bezeichnet.
\end{frame}
\framedgraphic{Modellierung, Flüsse, Netzwerke}{../images/Unit_disk_graph.png}
\framedgraphic{Karten}{../images/map.png}
\begin{frame}{Isomorphe Graphen}
\begin{center}
\href{http://www.martin-thoma.de/uni/graph.html}{martin-thoma.de/uni/graph.html}
\end{center}
\end{frame}
\begin{frame}{Grad einer Ecke}
\begin{block}{Grad einer Ecke}
Der \textbf{Grad} einer Ecke ist die Anzahl der Kanten, die von dieser Ecke
ausgehen.
\end{block}
\begin{block}{Isolierte Ecke}
Hat eine Ecke den Grad 0, so nennt man ihn \textbf{isoliert}.
\end{block}
\begin{gallery}
\galleryimage{graphs/graph-1}
\galleryimage{graphs/graph-2}
\galleryimage{graphs/k-3-3}
\galleryimage{graphs/k-5}\\
\galleryimage{graphs/k-16}
\galleryimage{graphs/graph-6}
\galleryimage{graphs/star-graph}
\galleryimage{graphs/tree}
\end{gallery}
\end{frame}
\begin{frame}{Aufgabe 1}
Zeichnen Sie alle Graphen mit genau vier Ecken.
@ -45,10 +70,10 @@ Zeichnen Sie alle Graphen mit genau vier Ecken.
\galleryimage{aufgabe-1/graph-11} % zwei Kanten -------------
\galleryimage{aufgabe-1/graph-12} % drei Kanten: umgedrehtes u
\galleryimage{aufgabe-1/graph-5} % drei Kanten
\galleryimage[red]{aufgabe-1/graph-4} % drei Kanten:
\galleryimage[red]{aufgabe-1/graph-4} % drei Kanten: S3 - fehlt im Buch
\galleryimage{aufgabe-1/graph-10} % vier Kanten: Viereck
\galleryimage[red]{aufgabe-1/graph-2}
\galleryimage{aufgabe-1/graph-3} % vier Kanten: Dreieck mit Spitze
\galleryimage[red]{aufgabe-1/graph-2} % fünf kanten - fehlt im Buch
\galleryimage{aufgabe-1/graph-9} % fünf Kanten: nur Diagonale fehlt
\galleryimage{aufgabe-1/graph-1} % sechs Kanten: K_4
\end{gallery}

View file

@ -18,7 +18,7 @@
\begin{block}{Eulerscher Kreis}
Sei $G$ ein Graph und $A$ ein Kreis in $G$.
$A$ heißt \textbf{eulerscher Kreis} $:\Leftrightarrow \forall_{e \in E}: e \in A$.
$A$ heißt \textbf{eulerscher Kreis} $:\Leftrightarrow \forall_{k \in K}: k \in A$.
\end{block}
\begin{block}{Eulerscher Graph}
@ -26,6 +26,22 @@ Ein Graph heißt \textbf{eulersch}, wenn er einen eulerschen Kreis enthält.
\end{block}
\end{frame}
\begin{frame}{Hamiltonkreis}
ACHTUNG, VERWECHSLUNGSGEFAHR:
\begin{block}{Hamiltonkreis}
Sei $G$ ein Graph und $A$ ein Kreis in $G$.
$A$ heißt \textbf{Hamilton-Kreis} $:\Leftrightarrow \forall_{e \in E}: e \in A$.
\end{block}
\begin{block}{Eulerscher Kreis}
Sei $G$ ein Graph und $A$ ein Kreis in $G$.
$A$ heißt \textbf{eulerscher Kreis} $:\Leftrightarrow \forall_{k \in K}: k \in A$.
\end{block}
\end{frame}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{frame}{Eulerscher Kreis}
@ -62,6 +78,55 @@ Ein Graph heißt \textbf{eulersch}, wenn er einen eulerschen Kreis enthält.
\end{center}
\end{frame}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{frame}{Hamilton-Kreis, kein EK}
\begin{center}
\adjustbox{max size={\textwidth}{0.8\textheight}}{
\begin{tikzpicture}
\node (a)[vertex] at (0,0) {};
\node (b)[vertex] at (2,0) {};
\node (c)[vertex] at (2,2) {};
\node (d)[vertex] at (0,2) {};
\foreach \from/\to in {a/b,b/c,c/d,d/a,a/c,b/d}
\draw[line width=2pt] (\from) -- (\to);
\node<2->[vertex,red] (a) at (0,0) {};
\node<3->[vertex,red] (b) at (2,0) {};
\node<4->[vertex,red] (c) at (2,2) {};
\node<5->[vertex,red] (d) at (0,2) {};
\begin{pgfonlayer}{background}
\path<3->[selected edge,black!50] (a.center) edge node {} (b.center);
\path<4->[selected edge,black!50] (b.center) edge node {} (c.center);
\path<5->[selected edge,black!50] (c.center) edge node {} (d.center);
\path<6->[selected edge,black!50] (d.center) edge node {} (a.center);
\end{pgfonlayer}
\end{tikzpicture}
}
\end{center}
\end{frame}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{frame}{Eulerkreis, kein HK}
\begin{center}
\adjustbox{max size={\textwidth}{0.8\textheight}}{
\begin{tikzpicture}
\node (a)[vertex] at (0,0) {};
\node (b)[vertex] at (2,0) {};
\node (c)[vertex] at (2,2) {};
\node (d)[vertex] at (0,2) {};
\node (e)[vertex] at (1,1) {};
\foreach \from/\to in {a/b,b/c,c/d,d/a,b/e,e/d}
\draw[line width=2pt] (\from) -- (\to);
\draw[line width=2pt] (b) to[bend right] (d);
\end{tikzpicture}
}
\end{center}
\end{frame}
\subsection{Satz von Euler}
\begin{frame}{Satz von Euler}
\begin{block}{Satz von Euler}
@ -99,7 +164,7 @@ ist $G$ eulersch.
\pause
$m=1$: Es gibt keinen Graphen in dem jede Ecke geraden Grad hat. \cmark\\
\pause
$m=2$: Nur ein zus. Graph möglich. Dieser ist eulersch. \cmark\\ % Anzeichnen
$m=2$: Nur ein Graph möglich. Dieser ist eulersch. \cmark\\ % Anzeichnen
\pause
\underline{I.V.:} Sei $m \in \mathbb{N}_0$ beliebig, aber fest und
@ -109,11 +174,35 @@ denen jede Ecke geraden Grad hat, ist $G$ eulersch.
\pause
\underline{I.S.:} Jede Ecke von $G$ hat min. Grad 2.
\underline{I.S.:} Sei $G=(E,K)$ mit $2 \leq m = |K|$. $G$ ist zus. \pause
$\Rightarrow$ Jede Ecke von $G$ hat min. Grad 2. \pause
$\xRightarrow[]{A. 5}$ Es gibt einen Kreis $C$ in $G$.\pause
\dots
\end{frame}
\begin{frame}{Umkehrung des Satzes von Euler}
\begin{block}{Umkehrung des Satzes von Euler}
Wenn in einem zusammenhängenden Graphen $G$ jede Ecke geraden Grad hat, dann
ist $G$ eulersch.
\end{block}
\dots
Sei
\[G_C = (E_C, K_C) \]
Graph zu Kreis $C$ und
\[G^* = (E, K \setminus K_C).\] \pause
$\Rightarrow$ Alle Knoten jeder Zusammenhangskomponente in $G^*$ haben geraden Grad\\
\pause
$\xRightarrow[]{IV}$ Alle $n$ Zhsgk. haben Eulerkreise $C_1, \dots, C_n$\\
\pause
$\Rightarrow$ $C_1, \dots, C_n$ können in $C$ \enquote{eingehängt} werden\\
\pause
$\Rightarrow G$ ist eulersch\pause $\Rightarrow $ Beh.
\end{frame}
\begin{frame}{Offene eulersche Linie}
\begin{block}{Offene eulersche Linie}
Sei $G$ ein Graph und $A$ ein Weg, der kein Kreis ist.
@ -141,10 +230,13 @@ Sei $G=(E, K)$ ein zusammenhängender Graph und $L = (e_0, \dots, e_s)$ eine off
eulersche Linie. \pause
Sei $G^* = (E, K \cup \Set{e_s, e_0})$. \pause
Es gibt einen Eulerkreis in $G^*$ \pause \\
$\xRightarrow{\text{Satz von Euler}}$ In $G^*$ hat jede Ecke geraden Grad \pause \\
$\xLeftrightarrow{\text{Satz von Euler}}$ In $G^*$ hat jede Ecke geraden Grad \pause \\
Der Grad von nur zwei Kanten wurde um jeweils 1 erhöht \pause \\
$\Rightarrow$ in $G$ haben genau 2 Ecken ungeraden Grad $\blacksquare$
$\Leftrightarrow$ in $G$ haben genau 2 Ecken ungeraden Grad. Diese heißen $e_0, e_s$. $\blacksquare$
\end{block}
\pause
Rückrichtung analog
\end{frame}
\pgfdeclarelayer{background}

View file

@ -1,7 +1,6 @@
SOURCE = Graphentheorie-I
make:
#latexmk -pdf -pdflatex="pdflatex -interactive=nonstopmode" -use-make $(SOURCE).tex
pdflatex -shell-escape $(SOURCE).tex -output-format=pdf # shellescape wird fürs logo benötigt
pdflatex -shell-escape $(SOURCE).tex -output-format=pdf # nochmaliges ausführen wegen Inhaltsverzeichnissen
make clean

View file

@ -149,25 +149,3 @@ Es ex. ein Kantenzug, der $e_1$ und $e_2$ verbindet
\galleryimage[Green]{graphs/tree}
\end{gallery}
\end{frame}
\begin{frame}{Grad einer Ecke}
\begin{block}{Grad einer Ecke}
Der \textbf{Grad} einer Ecke ist die Anzahl der Kanten, die von dieser Ecke
ausgehen.
\end{block}
\begin{block}{Isolierte Ecke}
Hat eine Ecke den Grad 0, so nennt man ihn \textbf{isoliert}.
\end{block}
\begin{gallery}
\galleryimage{graphs/graph-1}
\galleryimage{graphs/graph-2}
\galleryimage{graphs/k-3-3}
\galleryimage{graphs/k-5}\\
\galleryimage{graphs/k-16}
\galleryimage{graphs/graph-6}
\galleryimage{graphs/star-graph}
\galleryimage{graphs/tree}
\end{gallery}
\end{frame}

View file

@ -0,0 +1,21 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
% Define arrow style
pil/.style={->,thick}
}
\begin{document}
\begin{tikzpicture}
\node (a)[vertex] at (0,8) {$a$};
\node (b)[vertex] at (0,4) {$b$};
\node (c)[vertex] at (0,0) {$c$};
\node (d)[vertex] at (4,4) {$d$};
\foreach \from/\to/\pos in {a/b/20,a/b/-20,a/d/0,b/c/20,b/c/-20,b/d/0,c/d/0}
\draw[line width=2pt] (\from) to [bend left=\pos] (\to);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,22 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
% Define arrow style
pil/.style={->,thick}
}
\begin{document}
\begin{tikzpicture}
\node (a)[vertex] at (0,0) {};
\node (b)[vertex] at (2,0) {};
\node (c)[vertex] at (2,2) {};
\node (d)[vertex] at (0,2) {};
\node (d)[vertex] at (1,1) {};
\foreach \from/\to in {a/b,b/c,c/d,d/a,b/e,e/d}
\draw[line width=2pt] (\from) -- (\to);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,21 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
% Define arrow style
pil/.style={->,thick}
}
\begin{document}
\begin{tikzpicture}
\node (a)[vertex] at (0,0) {};
\node (b)[vertex] at (0,1) {};
\node (c)[vertex] at (1,0) {};
\node (d)[vertex] at (0,1) {};
\foreach \from/\to in {a/b,b/c,c/d,d/a,a/c,b/d}
\draw[line width=2pt] (\from) -- (\to);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,19 @@
% A complete graph
% Author: Quintin Jean-Noël
% <http://moais.imag.fr/membres/jean-noel.quintin/>
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage[nomessages]{fp}% http://ctan.org/pkg/fp
\usepackage{tikz}
\usetikzlibrary[topaths]
\begin{document}
\newcommand\n{5}
\begin{tikzpicture}
\node[vertex] (N1) at (0,0) {};
\node[vertex] (N2) at (2,0) {};
\node[vertex] (N3) at (1,1) {};
\draw (N1) -- (N3) -- (N2) -- (N1);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,21 @@
% A complete graph
% Author: Quintin Jean-Noël
% <http://moais.imag.fr/membres/jean-noel.quintin/>
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage[nomessages]{fp}% http://ctan.org/pkg/fp
\usepackage{tikz}
\usetikzlibrary[topaths]
\begin{document}
\begin{tikzpicture}
\node[vertex] (N1) at (0,0) {};
\node[vertex] (N2) at (2,0) {};
\node[vertex] (N3) at (4,0) {};
\node[vertex] (N4) at (1,1) {};
\node[vertex] (N5) at (3,1) {};
\node[vertex] (N6) at (2,2) {};
\draw (N1) -- (N4) -- (N2) -- (N5) -- (N4) -- (N6) -- (N5) -- (N3) -- (N2) -- (N1);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,25 @@
% A complete graph
% Author: Quintin Jean-Noël
% <http://moais.imag.fr/membres/jean-noel.quintin/>
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage[nomessages]{fp}% http://ctan.org/pkg/fp
\usepackage{tikz}
\usetikzlibrary[topaths]
\begin{document}
\begin{tikzpicture}
\node[vertex] (N1) at (0,0) {};
\node[vertex] (N2) at (2,0) {};
\node[vertex] (N3) at (4,0) {};
\node[vertex] (N4) at (6,0) {};
\node[vertex] (N5) at (1,1) {};
\node[vertex] (N6) at (3,1) {};
\node[vertex] (N7) at (5,1) {};
\node[vertex] (N8) at (2,2) {};
\node[vertex] (N9) at (4,2) {};
\node[vertex] (N10) at (3,3) {};
\draw (N1) -- (N5) -- (N2) -- (N6) -- (N3) -- (N7) -- (N6) -- (N5) -- (N8) -- (N6) -- (N9) -- (N8) -- (N10) -- (N9) -- (N7) -- (N4) -- (N3) -- (N2) -- (N1);
\end{tikzpicture}
\end{document}