aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assignment11.tex85
1 files changed, 85 insertions, 0 deletions
diff --git a/assignment11.tex b/assignment11.tex
new file mode 100644
index 0000000..2bc18bd
--- /dev/null
+++ b/assignment11.tex
@@ -0,0 +1,85 @@
+\documentclass[10pt,a4paper]{article}
+
+\usepackage[margin=2cm,top=1cm]{geometry}
+
+\def\assignment{11}
+
+\usepackage{enumitem}
+\setenumerate[1]{label=\assignment.\arabic*.}
+\setenumerate[2]{label=\textit{\alph*})}
+
+\usepackage{fancyhdr}
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{0pt}
+\fancyhead{}
+\fancyfoot[C]{Copyright {\textcopyright} 2015 Camil Staps}
+\pagestyle{fancy}
+
+\usepackage{amsmath}
+\usepackage{amsthm}
+\usepackage{amsfonts}
+\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n}
+
+\usepackage{tikz}
+\usepackage{array}
+\usepackage{caption}
+\usepackage[hidelinks]{hyperref}
+\usepackage{url}
+
+\parindent0pt
+
+\title{Algoritmen en Datastructuren - assignment \assignment}
+\author{Camil Staps\\\small{s4498062}}
+
+\begin{document}
+
+\maketitle
+\thispagestyle{fancy}
+
+\begin{enumerate}
+ \item \begin{enumerate}
+ \item $19$.
+ \item $2$.
+ \item AE, EF, BF, FG, GH, CG, DG.
+ \end{enumerate}
+
+ \item See \autoref{tab:11.2}.
+
+ \begin{table}[h]
+ \centering
+ \begin{tabular}{l | l | l | l}
+ Added & Priority queue & Predecessors & Keys \\\hline
+ a & e, b, c & -- & c:7, b:5, e:2 \\\hline
+ e & b, c, d & e:a & c:4, b:3, d:5 \\\hline
+ b & c, d & e:a, b:e & c:4, d:5 \\\hline
+ c & d & e:a, b:e, c:e & d:5 \\\hline
+ d & -- & e:a, b:e, c:e, d:c & --
+ \end{tabular}
+ \caption{Running Prim's algorithm}
+ \label{tab:11.2}
+ \end{table}
+
+ \item Sort jobs ascending by finish time. For every activity:
+
+ \begin{itemize}
+ \item If it can be placed in any existing hall, do this.
+ \item If not, add a new hall with just that activity.
+ \end{itemize}
+
+ This is a simple extension to the greedy algorithm seen in the lecture, it is correct by the same argument by contradiction.
+
+ Sorting takes $\pazocal O(n\log n)$, iterating the array $\pazocal O(n)$, so this algorithm uses $\pazocal O(n\log n)$.
+
+ \item \begin{enumerate}
+ \item %todo
+
+ \item %todo
+
+ \end{enumerate}
+
+ \item %todo
+
+\end{enumerate}
+
+\end{document}
+