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

Schlingen hinzugefügt; Textsetzungsprobleme behoben; Aufgabe 'Zeichne alle Graphen' verbessert

This commit is contained in:
Martin Thoma 2013-06-13 11:18:18 +02:00
parent f476b74301
commit 896fb9601e
5 changed files with 93 additions and 12 deletions

View file

@ -60,8 +60,25 @@ Hat eine Ecke den Grad 0, so nennt man ihn \textbf{isoliert}.
\end{gallery}
\end{frame}
\begin{frame}{Schlinge}
\begin{block}{Schlinge}
Sei $G=(E, K)$ ein Graph und $k=\Set{e_1, e_2} \in K$ eine Kante.
$k$ heißt \textbf{Schlinge} $:\Leftrightarrow e_1 = e_2$
\end{block}
Ein Graph ohne Schlingen heißt \enquote{schlingenfrei}
\begin{gallery}
\galleryimage{graphs/graph-1}
\galleryimage{graphs/graph-2-schlinge}
\galleryimage{graphs/k-3-3}
\galleryimage{graphs/k-5-schlinge}
\end{gallery}
\end{frame}
\begin{frame}{Aufgabe 1}
Zeichnen Sie alle Graphen mit genau vier Ecken.
Zeichnen Sie alle schlingenfreien Graphen mit genau vier Ecken.
\only<2>{
\begin{gallery}

View file

@ -0,0 +1,29 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\tikzset{
%Define standard arrow tip
>=stealth',
% Define arrow style
pil/.style={->,thick}
}
\tikzstyle{vertex}=[draw,fill=black,circle,minimum size=10pt,inner sep=0pt]
\begin{document}
\begin{tikzpicture}
\node (a)[vertex] at (0,3) {};
\node (b)[vertex] at (0,1) {};
\node (c)[vertex] at (1,0) {};
\node (d)[vertex] at (2,0) {};
\node (e)[vertex] at (3,0) {};
\node (f)[vertex] at (4,1) {};
\node (g)[vertex] at (4,3) {};
\foreach \from/\to in {b/c,c/d,d/e,e/f}
\draw[line width=2pt] (\from) -- (\to);
\path[line width=2pt] (d) edge[ out=140, in=50
, looseness=0.8, loop
, distance=2cm]
node[above=3pt] {$k$} (d);
\end{tikzpicture}
\end{document}

View file

@ -0,0 +1,28 @@
% 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]
\tikzstyle{vertex}=[draw,fill=black,circle,minimum size=10pt,inner sep=0pt]
\begin{document}
\newcommand\n{5}
\begin{tikzpicture}
%the multiplication with floats is not possible. Thus I split the loop in two.
\foreach \number in {1,...,\n}{
\node[vertex] (N-\number) at ({\number*(360/\n)}:5.4cm) {};
}
\foreach \number in {1,...,\n}{
\foreach \y in {1,...,\n}{
\draw (N-\number) -- (N-\y);
}
\path (N-\number) edge[ out=140, in=50
, looseness=0.8, loop
, distance=2cm]
node[above=3pt] {} (N-\number);
}
\end{tikzpicture}
\end{document}