\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}