%%% Do not change from BEGIN to END
%%% BEGIN
\documentclass[a4paper,10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[danish,english]{babel}
\usepackage{graphicx}
\usepackage[a4paper,margin=2.7cm]{geometry}

\usepackage[sc]{mathpazo} 
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{array}

\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}


\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex} 


\renewcommand{\vec}[1]{\ensuremath {\mathbf #1}}

%%% Settings for the Instructor
\newcommand{\courseid}{DM545}
\newcommand{\coursename}{Linear and Integer Programming}
\newcommand{\term}{Spring 2016}
\newcommand{\dept}{Department of Mathematics and Computer Science}

%%% Settings for the Student
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\author{WRITE-HERE-YOUR-EXAM-NR}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\newcommand{\cprnr}{WRITE-HERE-YOUR-CPR-NR}
\makeatletter
\let\runauthor\@author
\let\runtitle\@title
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{listings}
\lstset{language=Python,
  basicstyle=\ttfamily\lst@ifdisplaystyle\footnotesize\fi,%\fontfamily{pzc}\selectfont,%
  stringstyle=\ttfamily,
  commentstyle=\ttfamily,
  showstringspaces=false,
  frame=lines, 
  breaklines=true, tabsize=2,
  extendedchars=true,inputencoding=utf8
}
%\lstavoidwhitepre


\pagestyle{fancy} 
\lhead{{\sc \courseid -- \term }} 
\chead{}
\rhead{Ex.~nr.~\runauthor}
\cfoot{Page \thepage\ of \pageref{LastPage}}

\fancypagestyle{plain}{
\lhead{\dept\\
University of Southern Denmark, Odense}
\chead{}
\rhead{\today\\
\runauthor}
\lfoot{}
\rfoot{}
%\renewcommand{\headrulewidth}{0pt}
}


\title{\begin{flushleft}
\vspace{-4ex}
\courseid~-- \coursename \\[0.2cm]
{\Large Answers to the Written Exam, \term \\[3ex]
\hrule}
\end{flushleft}
}


\date{}

%%% END


\begin{document}
\maketitle





Always insert a \verb=\newpage= after every task.

\bigskip
\bigskip
Template for figure inclusion (see latex source):

\begin{figure}[htb]
\begin{center}
%% uncomment the line below and change the figure file. 
%  \includegraphics[width=1\textwidth]{ex1}
\end{center}
\end{figure}


\bigskip
\bigskip
Template for source code inclusion:

\begin{lstlisting}
import numpy as np

\end{lstlisting}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 1}
\subsection*{Subtask 1.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\newpage
\section*{Task 2}
\subsection*{Subtask 2.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 3}
\subsection*{Subtask 3.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 4}
\subsection*{Subtask 4.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 5}
\subsection*{Subtask 5.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 6}
\subsection*{Subtask 6.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Use the template below and replicate it as needed.

\begin{figure}[h]
\centering
\scalebox{0.96}{
\begin{tabular}{|   m{0.5\textwidth}|  m{0.5\textwidth}  |}
\hline
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}
\setlength\itemsep{0em}
\item Node:  %% your answer here
\item $b=$ %% your answer here
\item  %% your answer here
\item $\underline{z}_A=$ %% your answer here
and $\overline{z}_A=$ %% your answer here
\item $\underline{z}=$ %% your answer here
and $\overline{z}=$ %% your answer here
\item Prune$=$ %% your answer here
\item Open$=$ %% your answer here
\item Status:  %% your answer here
\vspace{-1em}
\end{enumerate}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hline
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}
\setlength\itemsep{0em}
\item Node:  %% your answer here
\item $b=$ %% your answer here
\item  %% your answer here
\item $\underline{z}_k=$ %% your answer here
and $\overline{z}_k=$ %% your answer here
\item $\underline{z}=$ %% your answer here
and $\overline{z}=$ %% your answer here
\item Prune$=$ %% your answer here
\item Open$=$ %% your answer here
\item Status:  %% your answer here
\vspace{-1em}
\end{enumerate}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hline
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}
\setlength\itemsep{0em}
\item Node:  %% your answer here
\item $b=$ %% your answer here
\item  %% your answer here
\item $\underline{z}_k=$ %% your answer here
and $\overline{z}_k=$ %% your answer here
\item $\underline{z}=$ %% your answer here
and $\overline{z}=$ %% your answer here
\item Prune$=$ %% your answer here
\item Open$=$ %% your answer here
\item Status:  %% your answer here
\vspace{-1em}
\end{enumerate}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hline
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}
\setlength\itemsep{0em}
\item Node:  %% your answer here
\item $b=$ %% your answer here
\item  %% your answer here
\item $\underline{z}_k=$ %% your answer here
and $\overline{z}_k=$ %% your answer here
\item $\underline{z}=$ %% your answer here
and $\overline{z}=$ %% your answer here
\item Prune$=$ %% your answer here
\item Open$=$ %% your answer here
\item Status:  %% your answer here
\vspace{-1em}
\end{enumerate}\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hline
\end{tabular}
}
\caption{}
\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\newpage
\section*{Task 7}
\subsection*{Subtask 7.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 8}
\subsection*{Subtask 8.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Task 9}
\subsection*{Subtask 9.a}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\end{document}
          



