blatt 3
This commit is contained in:
parent
a8d90ff810
commit
894bd78856
11 changed files with 269 additions and 0 deletions
Binary file not shown.
BIN
übung_3/agt26-blatt03.pdf
Normal file
BIN
übung_3/agt26-blatt03.pdf
Normal file
Binary file not shown.
BIN
übung_3/agt_übung_3.pdf
Normal file
BIN
übung_3/agt_übung_3.pdf
Normal file
Binary file not shown.
18
übung_3/agt_übung_3.tex
Normal file
18
übung_3/agt_übung_3.tex
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
\documentclass{ngexrcs}
|
||||
\usepackage{hyperref}
|
||||
\setkeys{Gin}{pagebox=artbox, width=0.2\textwidth}
|
||||
|
||||
\title{3. Übungsblatt}
|
||||
\subject{Algorithmische Graphentheorie}
|
||||
\author{Jasper Gude \and Pia Röttgers}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\points[\qquad]{25}
|
||||
|
||||
\input{aufgabe_1.tex}
|
||||
\input{aufgabe_2.tex}
|
||||
\input{aufgabe_3.tex}
|
||||
\input{aufgabe_4.tex}
|
||||
|
||||
\end{document}
|
||||
6
übung_3/aufgabe_1.tex
Normal file
6
übung_3/aufgabe_1.tex
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
\section{Triangulierungen und Dynamische Programmierung}
|
||||
\begin{tasks}
|
||||
\item
|
||||
\item
|
||||
\item
|
||||
\end{tasks}
|
||||
6
übung_3/aufgabe_2.tex
Normal file
6
übung_3/aufgabe_2.tex
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
% vim: ft=tex
|
||||
\section{TSP mit Wiederholungen}
|
||||
\begin{tasks}
|
||||
\item
|
||||
\item
|
||||
\end{tasks}
|
||||
5
übung_3/aufgabe_3.tex
Normal file
5
übung_3/aufgabe_3.tex
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
\section{Metrisches TSP}
|
||||
\begin{tasks}
|
||||
\item
|
||||
\item
|
||||
\end{tasks}
|
||||
6
übung_3/aufgabe_4.tex
Normal file
6
übung_3/aufgabe_4.tex
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
\section{Längste Wege}
|
||||
\begin{tasks}
|
||||
\item
|
||||
\item
|
||||
\item
|
||||
\end{tasks}
|
||||
BIN
übung_3/figures.pdf
Normal file
BIN
übung_3/figures.pdf
Normal file
Binary file not shown.
75
übung_3/ngexrcs.cls
Normal file
75
übung_3/ngexrcs.cls
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
% vim: set filetype:tex
|
||||
|
||||
% Identification %
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesClass{ngexrcs}[2021/12/21 ADS Exercise class]
|
||||
|
||||
% Handle options %
|
||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
|
||||
\ProcessOptions\relax
|
||||
|
||||
% More declarations %
|
||||
\LoadClass{scrartcl}
|
||||
|
||||
\KOMAoptions{mpinclude=true}
|
||||
\recalctypearea
|
||||
|
||||
\RequirePackage{enumitem}
|
||||
\RequirePackage{ngutils}
|
||||
|
||||
% define fonts
|
||||
\RequirePackage{fontspec}
|
||||
%\RequirePackage{tgpagella}
|
||||
%\RequirePackage{tgheros}
|
||||
%\RequirePackage{euler-math}
|
||||
\RequirePackage[math-style=upright]{unicode-math}
|
||||
\setmainfont{TeX Gyre Pagella}
|
||||
\setsansfont{TeX Gyre Heros}
|
||||
\setmonofont{TeX Gyre Cursor}
|
||||
\setmathfont{Euler Math}
|
||||
|
||||
\setlength{\marginparwidth}{1.5\marginparwidth}
|
||||
\setlength{\fboxrule}{\heavyrulewidth}
|
||||
|
||||
|
||||
%
|
||||
% \renewcommand\theenumi{\@alph\c@enumi}
|
||||
% \renewcommand\theenumii{\@arabic\c@enumii}
|
||||
%\renewcommand\theenumiii{\@roman\c@enumiii}
|
||||
%\renewcommand\theenumiv{\@Alph\c@enumiv}
|
||||
|
||||
% \renewcommand\labelenumi{\theenumi)}
|
||||
% \renewcommand\labelenumii{\theenumii.}
|
||||
%\renewcommand\labelenumiii{\theenumiii.}
|
||||
%\renewcommand\labelenumiv{\theenumiv.}
|
||||
|
||||
% Use sansfont for all title elements
|
||||
\addtokomafont{titlehead}{\sffamily}
|
||||
\addtokomafont{subject}{\normalfont \sffamily \itshape}
|
||||
\addtokomafont{title}{\sffamily}
|
||||
\addtokomafont{subtitle}{\sffamily}
|
||||
\addtokomafont{author}{\sffamily}
|
||||
\addtokomafont{date}{\sffamily}
|
||||
\addtokomafont{publishers}{\sffamily}
|
||||
|
||||
% Use serif font for headings
|
||||
\addtokomafont{disposition}{\rmfamily}
|
||||
|
||||
% Let sections be formated as in: Aufgabe 1 -- Section title
|
||||
\renewcommand*{\sectionformat}{Aufgabe \thesection\autodot\enskip--\enskip}
|
||||
|
||||
% Let points of an exercise be printed as in: [__ / 2]
|
||||
\newkomafont{points}{\sffamily}
|
||||
\newcommand\points[2][\quad]{\marginline{\framebox{{\usekomafont{points}#1 \textbf{/} #2}}}}
|
||||
|
||||
\newenvironment{tasks}[1][1em]
|
||||
{
|
||||
\setlist{leftmargin=*}
|
||||
\renewcommand\theenumi{\@alph\c@enumi}
|
||||
\renewcommand\theenumii{\@arabic\c@enumii}
|
||||
\renewcommand\labelenumi{\theenumi)}
|
||||
\renewcommand\labelenumii{\theenumii.}
|
||||
\begin{enumerate}
|
||||
}{%
|
||||
\end{enumerate}
|
||||
}
|
||||
153
übung_3/ngutils.sty
Normal file
153
übung_3/ngutils.sty
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{ngutils}[2025/12/24 Never's LaTeX utils]
|
||||
|
||||
\RequirePackage[ngerman]{babel}
|
||||
\RequirePackage{graphicx}
|
||||
\RequirePackage{tabularx}
|
||||
\RequirePackage{booktabs}
|
||||
\RequirePackage{listings}
|
||||
|
||||
|
||||
\lstnewenvironment{pseudocode}[1][] %defines the algorithm listing environment
|
||||
{
|
||||
\renewcommand{\lstlistingname}{Algorithmus}
|
||||
\lstset{ %this is the stype
|
||||
mathescape=true,
|
||||
columns=fullflexible,
|
||||
basicstyle=\normalfont,
|
||||
identifierstyle=\scshape,
|
||||
keywordstyle=\bfseries,
|
||||
keywords={, new, if, then, else, while, for, in, to, up, down, foreach, do, return},
|
||||
commentstyle=\itshape,
|
||||
comment=[l]//,
|
||||
delim=[is][\normalfont]{|}{|},
|
||||
tabsize=3,
|
||||
frame=tb,
|
||||
framerule=1pt,
|
||||
#1 % this is to add specific settings to an usage of this environment (for instnce, the caption and referable label)
|
||||
}
|
||||
}
|
||||
{}
|
||||
|
||||
\newcommand{\seilpmi}{\ensuremath{\Longleftarrow}}
|
||||
|
||||
\newcommand\NN{\ensuremath{\mathbb{N}}}
|
||||
\newcommand\ZZ{\ensuremath{\mathbb{Z}}}
|
||||
\newcommand\QQ{\ensuremath{\mathbb{Q}}}
|
||||
\newcommand\RR{\ensuremath{\mathbb{R}}}
|
||||
\newcommand\CC{\ensuremath{\mathbb{C}}}
|
||||
\newcommand\PP{\ensuremath{\mathbb{P}}}
|
||||
|
||||
\newcommand\Oh{\ensuremath{\mathcal{O}}}
|
||||
\newcommand\oh{\ensuremath{\scriptstyle{\mathcal{O}}}}
|
||||
\newcommand\Eh{\ensuremath{\mathrm{E}}}
|
||||
\newcommand\Var{\ensuremath{\mathrm{Var}}}
|
||||
\newcommand\argmax{\ensuremath{\mathrm{arg\,max}}}
|
||||
\newcommand\argmin{\ensuremath{\mathrm{arg\,min}}}
|
||||
|
||||
\newcommand\parens[1]{\ensuremath{\left(#1\right)}}
|
||||
\newcommand\brackets[1]{\ensuremath{\left[#1\right]}}
|
||||
\newcommand\braces[1]{\ensuremath{\left\{#1\right\}}}
|
||||
\newcommand\angled[1]{\ensuremath{\left\langle#1\right\rangle}}
|
||||
|
||||
\newcommand\tup[1]{\parens{#1}}
|
||||
\newcommand\ivl[1]{\brackets{#1}}
|
||||
\newcommand\set[1]{\braces{#1}}
|
||||
\newcommand\arr[1]{\angled{#1}}
|
||||
\newcommand\abs[1]{\ensuremath{\lvert#1\rvert}}
|
||||
\newcommand\norm[1]{\ensuremath{\lVert#1\rVert}}
|
||||
\newcommand\ceil[1]{\ensuremath{\lceil#1\rceil}}
|
||||
\newcommand\floor[1]{\ensuremath{\lfloor#1\rfloor}}
|
||||
|
||||
\newcommand\alg[2]{{\normalfont\scshape#1}{\normalfont(#2)}}
|
||||
\newcommand\algt[1]{{\normalfont\scshape#1}}
|
||||
\newcommand\com[1]{{\normalfont\itshape/\!\!/ #1}}
|
||||
|
||||
|
||||
\newenvironment{algorithmic}[1][1em]{
|
||||
\begin{minipage}[t]{\dimexpr\linewidth}
|
||||
\bfseries
|
||||
\begin{tabbing}
|
||||
\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\kill
|
||||
}{%
|
||||
\end{tabbing}
|
||||
\end{minipage}
|
||||
}
|
||||
|
||||
% \newenvironment{algorithm}[1][1em]{
|
||||
% \begin{center}
|
||||
% \begin{minipage}[t]{\dimexpr\linewidth}
|
||||
% \bfseries
|
||||
% \begin{tabbing}
|
||||
% \hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\hspace{#1}\=\kill
|
||||
% }{%
|
||||
% \end{tabbing}
|
||||
% \end{minipage}
|
||||
% \end{center}
|
||||
% }
|
||||
|
||||
\makeatletter
|
||||
\newcounter{algorithm}% the counter
|
||||
\renewcommand*\thealgorithm{\arabic{algorithm}}% the default format for the counter
|
||||
\newcommand*\fps@algorithm{tbp}% default floating options
|
||||
\newcommand*\ftype@algorithm{4}% float type number, needs to be a power of 2; % \ftype@figure=1, \ftype@table=2
|
||||
\newcommand*\ext@algorithm{loa}% extension of file for the list of schemes
|
||||
\newcommand*\fnum@algorithm{\algorithmname\nobreakspace\thealgorithm}% used in caption
|
||||
\newcommand*\algorithmname{Algorithmus}% the name
|
||||
\newcommand*\listalgorithmname{Algorithmenverzeichnis}% the name of the list
|
||||
\newenvironment{algorithm}{\@float{algorithm}}{\end@float}% the environment
|
||||
\newenvironment{algorithm*}{\@dblfloat{algorithm}}{\end@dblfloat}% the starred % version for twocolumn documents
|
||||
\newcommand*\listofalgorithms{% the list of schemes
|
||||
\section*{\listalgorithmname}
|
||||
\@mkboth
|
||||
{\MakeUppercase\listalgorithmname}
|
||||
{\MakeUppercase\listalgorithmname}
|
||||
\@starttoc{\ext@algorithm} }
|
||||
\let\l@algorithm\l@figure % layout of list is the same as for figures
|
||||
\makeatother
|
||||
|
||||
\newlength{\theoremskip}
|
||||
\setlength{\theoremskip}{6em}
|
||||
|
||||
\newcommand{\theoremfont}{\normalfont\bfseries}
|
||||
\newcommand{\definitionfont}{\normalfont\bfseries}
|
||||
|
||||
\newenvironment{theoremic}[2][\theoremfont]{
|
||||
{#1 #2}
|
||||
\hfill
|
||||
\begin{minipage}[t]{\the\dimexpr\linewidth-\theoremskip\relax}
|
||||
}{
|
||||
\end{minipage}
|
||||
}
|
||||
|
||||
\newenvironment{theorem}{
|
||||
\begin{theoremic}{Satz.}
|
||||
}{
|
||||
\end{theoremic}
|
||||
}
|
||||
|
||||
\newenvironment{lemma}{
|
||||
\begin{theoremic}{Lemma.}
|
||||
}{
|
||||
\end{theoremic}
|
||||
}
|
||||
|
||||
\newenvironment{proof}{
|
||||
\begin{theoremic}{Beweis.}
|
||||
}{
|
||||
\end{theoremic}
|
||||
}
|
||||
|
||||
\newenvironment{definition}{
|
||||
\begin{theoremic}[\definitionfont]{Definition.}
|
||||
}{
|
||||
\end{theoremic}
|
||||
}
|
||||
|
||||
\newenvironment{example}{
|
||||
\begin{theoremic}[\definitionfont]{Beispiel.}
|
||||
}{
|
||||
\end{theoremic}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue