parent
ae6433feb3
commit
7bb41f24d8
@ -0,0 +1,174 @@
|
||||
\documentclass[11pt]{scrartcl}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{enumerate}
|
||||
\usepackage{latexsym}
|
||||
%\usepackage{amssymb}
|
||||
\usepackage{multicol}
|
||||
%\usepackage{booktabs}
|
||||
%\usepackage{pstricks}
|
||||
%\usepackage{pst-node}
|
||||
\usepackage[paper=a4paper,left=30mm,right=20mm,top=20mm,bottom =25mm]{geometry}
|
||||
\usepackage[
|
||||
pdftitle={Uebungsblatt 5: Graphentheorie II - AlgoDS2},
|
||||
pdfsubject={Algorithmen und Datenstrukturen 2; Uebungsblatt 5: Graphentheorie II},
|
||||
pdfauthor={Thomas Battermann},
|
||||
pdfkeywords={Uebungsblatt 5: Graphentheorie II - AlgoDS2},
|
||||
pdfborder={0 0 0}
|
||||
]{hyperref}
|
||||
|
||||
\usepackage{listings}
|
||||
|
||||
|
||||
\lstset{
|
||||
language=Java,
|
||||
basicstyle=\ttfamily,
|
||||
keywordstyle=\color{red},
|
||||
commentstyle=\color{blue},
|
||||
stringstyle=\color{darkgreen},
|
||||
backgroundcolor=\color{lightgray},
|
||||
morecomment=[s][\color{blue}]{/*}{*/},
|
||||
emphstyle=\textbf,
|
||||
frame=single,
|
||||
showstringspaces=true,
|
||||
breaklines=true,
|
||||
numberstyle=\textcolor{grey},
|
||||
numbers=left,
|
||||
morekeywords={Merge,ExtractMinimum,Union,NIL,return,and,InvertChildren,then,to},
|
||||
tabsize=4,
|
||||
captionpos=b
|
||||
}
|
||||
|
||||
\usepackage{tabularx}
|
||||
\usepackage{graphicx}
|
||||
\usepackage[usenames,dvipsnames]{color}
|
||||
\usepackage{lastpage}
|
||||
\usepackage{fancyhdr}
|
||||
\setlength{\parindent}{0ex}
|
||||
\setlength{\parskip}{2ex}
|
||||
\setcounter{secnumdepth}{4}
|
||||
\setcounter{tocdepth}{4}
|
||||
\usepackage{multirow}
|
||||
\usepackage[table]{xcolor}
|
||||
|
||||
\pagestyle{fancy} %eigener Seitenstil
|
||||
\fancyhf{} %alle Kopf- und Fußzeilenfelder bereinigen
|
||||
\fancyhead[L]{Übungsblatt 5\\Graphentheorie II} %Kopfzeile links
|
||||
\fancyhead[C]{} %zentrierte Kopfzeile
|
||||
\fancyhead[R]{\textsc{Algorithmen \& Datenstrukturen 2}\\26. Januar 2011} %Kopfzeile rechts
|
||||
\renewcommand{\headrulewidth}{0.4pt} %obere Trennlinie
|
||||
\fancyfoot[C]{Seite \thepage\ von \pageref{LastPage}}
|
||||
\renewcommand{\footrulewidth}{0.4pt} %untere Trennlinie
|
||||
|
||||
|
||||
\title{Übung Graphentheorie II -- AlgoDS2}
|
||||
\author{Thomas Battermann}
|
||||
\date{26. Januar 2011}
|
||||
|
||||
\begin{document}
|
||||
\pagestyle{fancy}
|
||||
|
||||
\section*{Aufgabe 1}
|
||||
\addcontentsline{toc}{section}{Aufgabe 1}
|
||||
|
||||
\subsection*{a)}
|
||||
\addcontentsline{toc}{subsection}{a)}
|
||||
|
||||
\begin{tabular}{rlc}
|
||||
\textbf{Kante} & \textbf{Knoten} & (Gewicht)\\
|
||||
& \(\{a\},\{b\},\{d\},\{f\},\{g\},\{h\},\{k\}\) & \\
|
||||
\((g,k)\) & \(\{a\},\{b\},\{d\},\{f\},\{g,k\},\{h\}\) & 12\\
|
||||
\((g,h)\) & \(\{a\},\{b\},\{d\},\{f\},\{g,k,h\}\) & 15\\
|
||||
\((a,b)\) & \(\{a,b\},\{d\},\{f\},\{g,k,h\}\) & 15\\
|
||||
\((a,h)\) & Bereits in einer Menge. & 18\\
|
||||
\((a,f)\) & \(\{a,b,f\},\{d\},\{g,k,h\}\) & 20\\
|
||||
\((a,d)\) & \(\{a,b,d,f\},\{g,k,h\}\) & 22\\
|
||||
\((d,g)\) & \(\{a,b,d,f,g,k,h\}\) & 23\\
|
||||
\end{tabular}
|
||||
|
||||
\subsection*{b)}
|
||||
\addcontentsline{toc}{subsection}{b)}
|
||||
|
||||
\begin{tabular}{c||c|c|c|c|c|c|c}
|
||||
\( d \) & \( a \) & \( b \) & \( d \) & \( f \) & \( g \) & \( h \) & \( k \) \\\hline
|
||||
\( \pi(d) \) & \( - \) & \( a \) & \( a \) & \( a \) & \( d \) & \( g \) & \( g \)
|
||||
\end{tabular}
|
||||
|
||||
\subsection*{c)}
|
||||
\addcontentsline{toc}{subsection}{c)}
|
||||
|
||||
\begin{tabular}{c|c||c|c|c|c|c|c|c}
|
||||
& & \( a \) & \( b \) & \( d \) & \( f \) & \( g \) & \( h \) & \( k \) \\
|
||||
\hline
|
||||
& \( \pi \) & \cellcolor{green} \( - \) & \( - \) & \( - \) & \( - \) & \( - \) & \( - \) & \( - \)\\
|
||||
& \( d \) & \cellcolor{green} \( 0 \) & \( \infty \) & \( \infty \) & \( \infty \) & \( \infty \) & \( \infty \) & \( \infty \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{a} & \( \pi \) & \( - \) & \cellcolor{green} \( a \) & \cellcolor{green} \( a \) & \cellcolor{green}\( a \) & \cellcolor{green} \( a \) & \( - \) & \( - \)\\
|
||||
& \( d \) & \( 0 \) & \cellcolor{green} \( 16 \) & \cellcolor{green} \( 22 \) & \cellcolor{green}\( 20 \) & \cellcolor{green} \( 29 \) & \( \infty \) & \( \infty \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{b} & \( \pi \) & \( - \) & \( a \) & \( a \) & \( a \) & \( a \) & \cellcolor{green} \( b \) & \( - \)\\
|
||||
& \( d \) & \( 0 \) & \( 16 \) & \( 22 \) & \( 20 \) & \( 29 \) & \cellcolor{green} \( 47 \) & \( \infty \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{f} & \( \pi \) & \( - \) & \( a \) & \( a \) & \( a \) & \( a \) & \( b \) & \cellcolor{green} \( f \)\\
|
||||
& \( d \) & \( 0 \) & \( 16 \) & \( 22 \) & \( 20 \) & \( 29 \) & \( 47 \) & \cellcolor{green} \( 45 \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{d} & \( \pi \) & \( - \) & \( a \) & \( a \) & \( a \) & \( a \) & \( b \) & \( f \)\\
|
||||
& \( d \) & \( 0 \) & \( 16 \) & \( 22 \) & \( 20 \) & \( 29 \) & \( 47 \) & \( 45 \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{g} & \( \pi \) & \( - \) & \( a \) & \( a \) & \( a \) & \( a \) & \cellcolor{green} \( g \) & \cellcolor{green} \( g \)\\
|
||||
& \( d \) & \( 0 \) & \( 16 \) & \( 22 \) & \( 20 \) & \( 29 \) & \cellcolor{green} \( 44 \) & \cellcolor{green} \( 41 \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{k} & \( \pi \) & \( - \) & \( a \) & \( a \) & \( a \) & \( a \) & \( g \) & \( g \)\\
|
||||
& \( d \) & \( 0 \) & \( 16 \) & \( 22 \) & \( 20 \) & \( 29 \) & \( 44 \) & \( 41 \)\\
|
||||
\hline
|
||||
\multirow{2}{*}{h} & \( \pi \) & \( - \) & \( a \) & \( a \) & \( a \) & \( a \) & \( g \) & \( g \)\\
|
||||
& \( d \) & \( 0 \) & \( 16 \) & \( 22 \) & \( 20 \) & \( 29 \) & \( 44 \) & \( 41 \)\\
|
||||
\hline
|
||||
\hline
|
||||
|
||||
\end{tabular}
|
||||
|
||||
|
||||
\section*{Aufgabe 2}
|
||||
\addcontentsline{toc}{section}{Aufgabe 2}
|
||||
|
||||
\begin{tabular}{cc|c|c|c|c}
|
||||
\multicolumn{2}{c|}{Runde} & 1 & 2 & 3 & 4 \\
|
||||
\hline
|
||||
\((s,t)\) & \( 6\) & \(t: 6/s\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((s,y)\) & \( 7\) & \(y: 7/s\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((t,x)\) & \( 5\) & \(x: 11/t\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((t,y)\) & \( 8\) & \(-\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((t,z)\) & \(-4\) & \(z: 2/t\) & \(-\) & \(z: 2/t\) & \(-\) \\
|
||||
\((x,t)\) & \(-2\) & \(-\) & \(t: 2/x\) & \(-\) & \(-\) \\
|
||||
\((y,z)\) & \( 9\) & \(-\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((y,x)\) & \(-3\) & \(x: 4/a\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((z,s)\) & \( 2\) & \(-\) & \(-\) & \(-\) & \(-\) \\
|
||||
\((z,x)\) & \( 7\) & \(-\) & \(-\) & \(-\) & \(-\) \\
|
||||
\end{tabular}
|
||||
|
||||
\((t: d[t]/\pi[t])\)
|
||||
|
||||
\textbf{Rundenergebnisse:}
|
||||
|
||||
\begin{tabular}{cc|ccccc}
|
||||
&& \(s\) & \(t\) & \(x\) & \(y\) & \(z\) \\
|
||||
\hline
|
||||
\multirow{2}{*}{Runde 1} & d & \( 0 \) & \( 6 \) & \( 4 \) & \( 7 \) & \( 2 \) \\
|
||||
& \(\pi\) & \( - \) & \( s \) & \( y \) & \( s \) & \( t \) \\
|
||||
\hline
|
||||
\multirow{2}{*}{Runde 2} & d & \( 0 \) & \( 2 \) & \( 4 \) & \( 7 \) & \( 2 \) \\
|
||||
& \(\pi\) & \( - \) & \( x \) & \( y \) & \( s \) & \( t \) \\
|
||||
\hline
|
||||
\multirow{2}{*}{Runde 3} & d & \( 0 \) & \( 2 \) & \( 4 \) & \( 7 \) & \( -2 \) \\
|
||||
& \(\pi\) & \( - \) & \( x \) & \( y \) & \( s \) & \( t \) \\
|
||||
\hline
|
||||
\multirow{2}{*}{Runde 4} & d & \( 0 \) & \( 2 \) & \( 4 \) & \( 7 \) & \( -2 \) \\
|
||||
& \(\pi\) & \( - \) & \( x \) & \( y \) & \( s \) & \( t \) \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
|
||||
Runde 3 ist identisch mit Runde 4
|
||||
|
||||
\end{document}
|
Loading…
Reference in new issue