PAA/gfx/hamilton.tex
2018-01-29 19:16:29 +01:00

27 lines
861 B
TeX

\begin{tikzpicture}[node distance=4cm, auto]
\def\V{(0,0),(1,-1),(-1,-1.5),(-1,.5),(-2.5,1),(1,1.5),(.5,3),(-1,2.5),(-2.5,2.5)}
\def\E{1/2,1/3,3/4,1/4,1/6,2/6,3/2,3/5,5/4/,5/9,9/8,8/7,6/7,4/9,4/7,1/8}
\def\C{5/4,4/3,3/2,2/1,1/6,6/7,7/8,8/9,9/5}
\def\G{%
\foreach \pos[count=\v] in \V \node[vertex] (v-\v) at \pos {};%
\foreach \u/\v in \E \draw (v-\u) -- (v-\v);%
}%
\node[label={below:Graf $G$}] (G) {
\begin{tikzpicture}
\G
\foreach \u/\v in \C \draw[thick, red] (v-\u) -- (v-\v);
\end{tikzpicture}
};
\node[label={below:Graf $G_1$}, right of=G, anchor=west] (H) {
\begin{tikzpicture}
\G
\node[vertex, label={below:$v_{101}$}] at (-2,-.5) {};
\end{tikzpicture}
};
\draw[->, thick] (G) -- (H);
\end{tikzpicture}