blatt 11
This commit is contained in:
parent
1da8b21a53
commit
fe414d1bd9
13 changed files with 287 additions and 0 deletions
Binary file not shown.
BIN
übung_10/agt_übung_10_korr.pdf
Normal file
BIN
übung_10/agt_übung_10_korr.pdf
Normal file
Binary file not shown.
|
|
@ -73,6 +73,8 @@
|
|||
\Oh\parens{n^2 + n^3 + \overbrace{\binom{k^4}{k} \cdotp n}^\text{Für jede Auswahl an Geraden alle Punkte prüfen}}
|
||||
\]
|
||||
Das liegt in FPT.
|
||||
|
||||
Es wäre noch zu zeigen, was im Fall $C \neq \emptyset$ und $k < \sqrt{n}$ passiert. Das jedoch bleibt dem Leser als Übungsaufgabe überlassen.
|
||||
\points{5}
|
||||
|
||||
|
||||
|
|
|
|||
BIN
übung_11/agt26-blatt11.pdf
Normal file
BIN
übung_11/agt26-blatt11.pdf
Normal file
Binary file not shown.
BIN
übung_11/agt_übung_11.pdf
Normal file
BIN
übung_11/agt_übung_11.pdf
Normal file
Binary file not shown.
18
übung_11/agt_übung_11.tex
Normal file
18
übung_11/agt_übung_11.tex
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
\documentclass[parskip=half]{ngexrcs}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{subcaption}
|
||||
\setkeys{Gin}{pagebox=artbox, width=0.8\textwidth}
|
||||
|
||||
\subject{Algorithmische Graphentheorie}
|
||||
\title{11. Übungsblatt}
|
||||
\author{Jasper Gude \and Pia Röttgers}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
\points[2em]{20}
|
||||
|
||||
\input{aufgabe_1.tex}
|
||||
\input{aufgabe_2.tex}
|
||||
\input{aufgabe_3.tex}
|
||||
|
||||
\end{document}
|
||||
14
übung_11/aufgabe_1.tex
Normal file
14
übung_11/aufgabe_1.tex
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
\section{Maximal planare und nicht-planare Graphen}
|
||||
\begin{tasks}
|
||||
\item
|
||||
|
||||
\item
|
||||
Siehe \autoref{fig:1b}.
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[page=1, width=0.33\textwidth]{figures.pdf}
|
||||
\caption{Gegenbeispiel; $K_{3,3}$ hat $9 < 12 = 3 \cdot 6 - 6 $ Kanten und ist nicht planar.}
|
||||
\label{fig:1b}
|
||||
\end{figure}
|
||||
|
||||
\end{tasks}
|
||||
32
übung_11/aufgabe_2.tex
Normal file
32
übung_11/aufgabe_2.tex
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
\section{Planare Zeichnungen}
|
||||
\begin{tasks}
|
||||
\item $G_1$ hat $7$ Knoten, $11 < 15 = 3 \cdotp 7 - 6$ Kanten und die Facetten
|
||||
\[
|
||||
\set{u, x, v, t}, \set{t, v, y, w}, \set{x, y, v}, \set{u, z, t}, \set{t, z, w}
|
||||
\]
|
||||
also $5 < 10 =2 \cdotp 7 - 4$ Facetten. Somit ist der Graph $G_1$ planar.
|
||||
|
||||
$G_2$ kann man sich als das Skelett eines konvexen, beschränkten Polyeders vorstellen.
|
||||
Wenn man sich wie in \autoref{fig:2a} vorstellt, eine Kugel in den Graphen zu legen und sich überlegt, welche Kanten von einer Seite sichtbar sind, dann sieht man schnell, dass der Graph konvex und beschränkt ist und somit planar ist.
|
||||
\points{3}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[page=2]{figures.pdf}
|
||||
\caption{Skelett des konvexen, beschränkten Polyeders.}
|
||||
\label{fig:2a}
|
||||
\end{figure}
|
||||
|
||||
\item Siehe \autoref{fig:2c}.
|
||||
\points{3}
|
||||
|
||||
\item Siehe \autoref{fig:2c}.
|
||||
\points{1}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[page=3]{figures.pdf}
|
||||
\caption{Die Platine kann so gebaut werden. Die durchgezogenen Leitungen verlaufen auf der Oberseite. Die gestrichelten verlaufen auf der Unterseite.}
|
||||
\label{fig:2c}
|
||||
\end{figure}
|
||||
\end{tasks}
|
||||
2
übung_11/aufgabe_3.tex
Normal file
2
übung_11/aufgabe_3.tex
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
\section{Planare Graphen}
|
||||
|
||||
38
übung_11/aufgabe_4.tex
Normal file
38
übung_11/aufgabe_4.tex
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
\section{Längste Wege}
|
||||
\begin{tasks}
|
||||
\item
|
||||
Da $s, t$ in $G'$ adjazent zu jedem Knoten in $G$ ist, können wir
|
||||
einen einfachen $s$-$t$-Weg der Länge $k+2$ erzeugen, indem wir
|
||||
einen einfachen Weg der Länge $k$ in $G$ nehmen, $s$ an das eine Ende und $t$ an das andere Ende hängen.
|
||||
|
||||
Umgekehrt kann man aus einem einfachen $s$-$t$-Weg der Länge $k$
|
||||
in $G'$ einen einfachen Weg der Länge $k-2$ in $G$ konstruieren,
|
||||
indem wir $s$ und $t$ entfernen.
|
||||
\points{2}
|
||||
|
||||
\item
|
||||
Ein Hamiltonweg ist ein Weg der alle Knoten in $G$ beinhaltet
|
||||
und somit Länge $n-1$ besitzt.
|
||||
|
||||
Wie wir oben gezeigt haben, kann ein $s$-$t$-Weg der Länge $n+1$
|
||||
in $G'$ leicht in einen Weg der Länge $n-1$ in $G$ umgewandelt
|
||||
werden. Das heißt, dass wir einen Hamiltonweg in $G$ finden,
|
||||
wenn wir einen $s$-$t$-Weg finden.
|
||||
|
||||
Umgekehrt können wir einen Hamiltonweg leicht in einen $s$-$t$-Weg
|
||||
umwandeln, also finden wir einen $s$-$t$-Weg wenn wir einen
|
||||
Hamiltonweg finden.
|
||||
|
||||
Also finden wir einen Hamiltonweg genau dann, wenn wir einen
|
||||
$s$-$t$-Weg finden.
|
||||
\points{1}
|
||||
|
||||
\item
|
||||
Da wir Hamiltonweg auf \algt{Längster $s$-$t$-Weg} reduziert
|
||||
haben, muss also \algt{Längster $s$-$t$-Weg} $\NPe$-schwer sein, denn
|
||||
wenn es in $\Pe$ liegen würde, könnten wir auch Hamiltonweg in
|
||||
polynomieller Zeit lösen. Da wir nicht von $\Pe = \NPe$ ausgehen,
|
||||
ist das nicht möglich.
|
||||
\points{2}
|
||||
|
||||
\end{tasks}
|
||||
BIN
übung_11/figures.pdf
Normal file
BIN
übung_11/figures.pdf
Normal file
Binary file not shown.
72
übung_11/ngexrcs.cls
Normal file
72
übung_11/ngexrcs.cls
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
% 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{ngutils}
|
||||
|
||||
% define fonts
|
||||
\RequirePackage{fontspec}
|
||||
\RequirePackage[math-style=upright]{unicode-math}
|
||||
\setmainfont{TeX Gyre Pagella}
|
||||
\setsansfont{TeX Gyre Heros}
|
||||
\setmonofont{TeX Gyre Cursor}
|
||||
\setmathfont{Euler Math}
|
||||
\mathitalicsmode=1
|
||||
|
||||
\setlength{\marginparwidth}{1.5\marginparwidth}
|
||||
\setlength{\fboxrule}{\heavyrulewidth}
|
||||
|
||||
% Use sansfont for all title elements
|
||||
\addtokomafont{titlehead}{\sffamily}
|
||||
\addtokomafont{subject}{\sffamily}
|
||||
\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][1em]{\marginline{\framebox{{\usekomafont{points}\hspace{#1} \textbf{/} #2}}}}
|
||||
|
||||
\newcounter{task}
|
||||
\renewcommand{\thetask}{\@alph\c@task)}
|
||||
\newenvironment{tasks}
|
||||
{
|
||||
\begin{list}{\thetask}
|
||||
{
|
||||
\usecounter{task}
|
||||
\setlength{\leftmargin}{1.6em}
|
||||
}
|
||||
}{%
|
||||
\end{list}
|
||||
}
|
||||
|
||||
\DeclareNewTOC
|
||||
[
|
||||
type=algorithm,
|
||||
types=algorithms,
|
||||
float,
|
||||
floattype=4,
|
||||
name=Algorithmus,
|
||||
listname={Algorithmenverzeichnis}
|
||||
]
|
||||
{loa}
|
||||
109
übung_11/ngutils.sty
Normal file
109
übung_11/ngutils.sty
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{ngutils}[2026/06/05 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={, and, or, not, 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{\argmax}{\mathop{\mathrm{arg\,max}}}
|
||||
\newcommand{\argmin}{\mathop{\mathrm{arg\,min}}}
|
||||
\newcommand{\seilpmi}{\Longleftarrow}
|
||||
|
||||
\newcommand{\NN}{\mathbb{N}}
|
||||
\newcommand{\ZZ}{\mathbb{Z}}
|
||||
\newcommand{\QQ}{\mathbb{Q}}
|
||||
\newcommand{\RR}{\mathbb{R}}
|
||||
\newcommand{\CC}{\mathbb{C}}
|
||||
\newcommand{\PP}{\mathbb{P}}
|
||||
|
||||
\newcommand{\pot}{\mathcal{P}}
|
||||
|
||||
\newcommand{\REC}{\mathrm{REC}}
|
||||
\newcommand{\RE}{\mathrm{RE}}
|
||||
\newcommand{\EA}{\mathrm{EA}}
|
||||
\newcommand{\DEA}{\mathrm{DEA}}
|
||||
\newcommand{\NEA}{\mathrm{DEA}}
|
||||
|
||||
\newcommand{\Pe}{\mathrm{P}}
|
||||
\newcommand{\NPe}{\mathrm{NP}}
|
||||
|
||||
\newcommand{\Oh}{\mathcal{O}}
|
||||
\newcommand{\oh}{\mathcal{o}}
|
||||
|
||||
\newcommand{\indeg}{\mathrm{indeg}}
|
||||
\newcommand{\outdeg}{\mathrm{outdeg}}
|
||||
|
||||
\newcommand{\Eh}{\mathrm{E}}
|
||||
\newcommand{\Var}{\mathrm{Var}}
|
||||
|
||||
\newcommand{\parens}[1]{\left(#1\right)}
|
||||
\newcommand{\brackets}[1]{\left[#1\right]}
|
||||
\newcommand{\braces}[1]{\left\{#1\right\}}
|
||||
\newcommand{\angled}[1]{\left\langle#1\right\rangle}
|
||||
|
||||
\newcommand{\suchthat}{\;\middle\vert\;}
|
||||
\newcommand{\set}[1]{\braces{#1}}
|
||||
\newcommand{\tup}[1]{\parens{#1}}
|
||||
\newcommand{\interval}[2][b]{
|
||||
\if\detokenize{a}\detokenize{#1}%
|
||||
\left[#2\right[
|
||||
\fi
|
||||
\if\detokenize{b}\detokenize{#1}%
|
||||
\left[#2\right]
|
||||
\fi
|
||||
\if\detokenize{c}\detokenize{#1}%
|
||||
\left]#2\right[
|
||||
\fi
|
||||
\if\detokenize{d}\detokenize{#1}%
|
||||
\left]#2\right]
|
||||
\fi
|
||||
}
|
||||
\newcommand{\arr}[1]{\angled{#1}}
|
||||
\newcommand{\abs}[1]{\left\vert#1\right\vert}
|
||||
\newcommand{\norm}[1]{\left\Vert#1\right\Vert}
|
||||
\newcommand{\ceil}[1]{\left\lceil#1\right\rceil}
|
||||
\newcommand{\floor}[1]{\left\lfloor#1\right\rfloor}
|
||||
|
||||
\newcommand{\algt}[1]{{\normalfont\scshape#1}}
|
||||
|
||||
\makeatletter
|
||||
\newcommand*{\alg@unstarred}[2]{{\normalfont\scshape#1}{\normalfont(#2)}}
|
||||
\newcommand*{\alg@starred}[1]{{\normalfont\scshape#1}}
|
||||
\newcommand*{\alg}{\@ifstar{\alg@starred}{\alg@unstarred}}
|
||||
\makeatother
|
||||
|
||||
\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}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue