\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 1}
\begin{center}
	\begin{tikzpicture}
	[scale=0.8,auto=left,every node/.style={circle,fill=none,draw=black!80,line width=1pt,minimum size=.8cm}]
	\node (a) at (2,4) {$a$};
	\node (b) at (4,4) {$b$};
	\node (c) at (1,2) {$c$};
	\node (d) at (3,2) {$d$};
	\node (e) at (5,2) {$e$};
	\node (f) at (2,0) {$f$};
	\node (g) at (4,0) {$g$};
	\node[draw=none] at (3,-1) {Graph 1};
	
	\node (h) at (10,4) {$a$};
	\node (i) at (8,2) {$b$};
	\node (j) at (12,2) {$c$};
	\node (k) at (10,0) {$d$};
	\node[draw=none] at (10,-1) {Graph 2};
	
	\tikzstyle{ev}=[draw=none, fill=none, outer sep=-5pt]
	\foreach \from/\to/\val in {a/d/1,b/d/2,c/d/3,e/d/4,f/d/5,g/d/6,h/i/1,h/j/4,h/k/2,i/k/3,j/k/1}
	\draw (\from) edge node[ev] {$\val$} (\to);
	\end{tikzpicture}
\end{center}


\textbf{Aufgabe 2}
\begin{center}
	\begin{tikzpicture}[scale=0.8,auto,every node/.style={fill,circle,inner sep=1pt,minimum size=1pt},font=\large]
	%Knoten
	\foreach \x in {0,...,5}
	\foreach \y in {0,...,5}
	{\node[draw=black]  (\x\y) at (0.5*\x,0.5*\y) {};}
	% Kantenzug
	\foreach \z in {0,...,5}
	{\draw (0,0.5*\z) -- (2.5,0.5*\z);}
	\draw (2.5,0) -- (2.5,2.5);
	\end{tikzpicture}
\end{center}


\end{document}