\documentclass[a4paper,11pt]{article}

\usepackage{ngerman}
\usepackage{amsmath,amsfonts,amssymb,amsthm}

\usepackage{tikz}
\usetikzlibrary{arrows,chains,matrix,positioning,scopes}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{math}

\def\O{\mathcal{O}}
\def\sort{\mathrm{sort}}
\def\scan{\mathrm{scan}}
\def\dist{\mathrm{dist}}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}
\def\R{\mathbb{R}}
\def\E{\mathbb{E}}


\begin{document}


\textbf{Aufgabe 2}
\begin{center}
	\begin{tikzpicture}[scale=0.8,every node/.style={circle,inner sep=1mm,minimum size=2mm}]
	\foreach \x in {0,1,2} {\node[draw=black] (a\x) at (3*\x,0) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (a\x)--(a\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (b\x) at (1+2*\x,1) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (b\x)--(b\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (c\x) at (2+\x,2) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (c\x)--(c\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (d\x) at (\x,3) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (d\x)--(d\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (e\x) at (4+\x,3) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (e\x)--(e\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (f\x) at (2+\x,4) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (f\x)--(f\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (g\x) at (1+2*\x,5) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (g\x)--(g\xi);}
	
	\foreach \x in {0,1,2} {\node[draw=black] (h\x) at (3*\x,6) {};}
	\foreach \x [count=\xi from 0] in {1,2} {\draw (h\x)--(h\xi);}
	
	\draw (a0) -- (d0) -- (h0);
	\draw (b0) -- (d1) -- (g0);
	\draw (c0) -- (d2) -- (f0);
	\draw (a1) -- (b1) -- (c1);
	\draw (f1) -- (g1) -- (h1);
	\draw (c2) -- (e0) -- (f2);
	\draw (b2) -- (e1) -- (g2);
	\draw (a2) -- (e2) -- (h2);
	
	\end{tikzpicture}  
\end{center}


\textbf{Aufgabe 3}
\begin{center}
	\begin{tikzpicture}[scale=0.8,every node/.style={circle,inner sep=1mm,minimum size=2mm}]
	\node[draw,circle]      at (0, 0)       (v1) {};
	\node[draw,circle]      at (2, 0)       (v2) {};
	\node[draw,circle]      at (4, 0)       (v3) {};
	\node[draw,circle,fill] at (1.5, 0.816) (v4) {};
	\node[draw,circle,fill] at (2.5, 0.816) (v5) {};
	\node[draw,circle]      at (1, 1.732)   (v6) {};
	\node[draw,circle,fill] at (2, 1.732)   (v7) {};
	\node[draw,circle]      at (3, 1.732)   (v8) {};
	\node[draw,circle]      at (2, 3.464)   (v9) {};
	
	\tikzstyle{every node}=[pos=0.5,above,scale=0.8,font=\small] 
	\draw (v1) -- (v2)  node{};
	\draw (v1) -- (v6)  node{};
	\draw (v2) -- (v3)  node{};
	\draw (v2) -- (v4)  node{};
	\draw (v2) -- (v5)  node{};
	\draw (v3) -- (v8)  node{};
	\draw (v4) -- (v5)  node{};
	\draw (v4) -- (v6)  node{};
	\draw (v4) -- (v7)  node{};
	\draw (v5) -- (v7)  node{};
	\draw (v5) -- (v8)  node{};
	\draw (v6) -- (v7)  node{};
	\draw (v6) -- (v9)  node{};
	\draw (v7) -- (v8)  node{};
	\draw (v8) -- (v9)  node{};
	\end{tikzpicture}  
\end{center}


\end{document}