73 lines
2.4 KiB
TeX
73 lines
2.4 KiB
TeX
\documentclass[12pt,a4paper,german]{article}
|
|
\usepackage{url}
|
|
%\usepackage{graphics}
|
|
\usepackage{times}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage{ngerman}
|
|
\usepackage{float}
|
|
\usepackage{diagbox}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{geometry}
|
|
\usepackage{amsfonts}
|
|
\usepackage{amsmath}
|
|
\usepackage{cancel}
|
|
\usepackage{csquotes}
|
|
\usepackage{graphicx}
|
|
\usepackage{epsfig}
|
|
\usepackage{paralist}
|
|
\usepackage{tikz}
|
|
\geometry{left=2.0cm,textwidth=17cm,top=3.5cm,textheight=23cm}
|
|
|
|
%%%%%%%%%% Fill out the the definitions %%%%%%%%%
|
|
\def \name {Valentin Brandl} %
|
|
\def \matrikel {108018274494} %
|
|
\def \pname {Marvin Herrmann} %
|
|
\def \pmatrikel {108018265436} %
|
|
\def \gruppe {2 (Mi 10-12 Andre)}
|
|
\def \qname {Pascal Brackmann}
|
|
\def \qmatrikel {108017113834} %
|
|
\def \uebung {6} %
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% DO NOT MODIFY THIS HEADER
|
|
\newcommand{\hwsol}{
|
|
\vspace*{-2cm}
|
|
\noindent \matrikel \quad \name \hfill \"Ubungsgruppe: \gruppe \\
|
|
\noindent \pmatrikel \quad \pname \\
|
|
\noindent \qmatrikel \quad \qname \\
|
|
\begin{center}{\Large \bf L\"osung f\"ur \"Ubung \# \uebung}\end{center}
|
|
}
|
|
|
|
\begin{document}
|
|
%Import header
|
|
\hwsol
|
|
|
|
\section*{Aufgabe 6.2}
|
|
|
|
\begin{enumerate}[1.]
|
|
|
|
\item
|
|
\begin{tabular}{|c|ccccccc|}
|
|
\hline
|
|
Queue & $pred[1]$ & $pred[2]$ & $pred[3]$ & $pred[4]$ & $pred[5]$ & $pred[6]$ & $pred[7]$ \\\hline
|
|
$\emptyset$ & $nil$ & $nil$ & $nil$ & $nil$ & $nil$ & $nil$ & $nil$ \\\hline
|
|
\cancel{1} & $nil$ & $nil$ & $nil$ & $nil$ & $nil$ & $nil$ & $nil$ \\\hline
|
|
\cancel{2}, 5 & $nil$ & $1$ & $nil$ & $nil$ & $1$ & $nil$ & $nil$ \\\hline
|
|
\cancel{5}, 3, 6 & $nil$ & $1$ & $2$ & $nil$ & $1$ & $2$ & $nil$ \\\hline
|
|
\cancel{3}, 6 & $nil$ & $1$ & $2$ & $nil$ & $1$ & $2$ & $nil$ \\\hline
|
|
\cancel{6}, 4 & $nil$ & $1$ & $2$ & $3$ & $1$ & $2$ & $nil$ \\\hline
|
|
\cancel{4}, 7 & $nil$ & $1$ & $2$ & $3$ & $1$ & $2$ & $6$ \\\hline
|
|
\cancel{7} & $nil$ & $1$ & $2$ & $3$ & $1$ & $2$ & $6$ \\\hline
|
|
$\emptyset$ & $nil$ & $1$ & $2$ & $3$ & $1$ & $2$ & $6$ \\\hline
|
|
\end{tabular}
|
|
|
|
\item
|
|
Laufzeit Breitensuche mit Adjazenzmatrix: $O(|V|^2)$:
|
|
|
|
Jeder Knoten $v$ wird genau einmal besucht und die Bestimmung der Nachbarschaft $\Gamma(v)$ in einer
|
|
Adjazenzmatrix hat eine Laufzeit von $O(|V|)$
|
|
|
|
\end{enumerate}
|
|
|
|
\end{document}
|