\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,amsthm,enumitem}
\usepackage[margin=1in]{geometry}

\title{\bf Assignment 7 \\[2ex]
\rm\normalsize CS 350 \\ Due: December 2, 2019}
\date{}
\author{}

\begin{document}
\maketitle

\begin{center}
    \fbox{\fbox{\parbox{5.5in}{\centering
    Your solutions must be typed (preferably typeset in \LaTeX ) and submitted as a hard-copy at the beginning of class on the day its due. The answers that you provide should clearly demonstrate that you understand the assignment and should provide enough information to clearly explain your solution to a peer.
    }}}
\end{center}

\section{Interval Scheduling}

\paragraph{} Consider the following problem:

\begin{quote}
  Given a set $S = \{(s_i, f_i) \;|\; s_i < f_i \}$ where $s_i$ and $f_i$ represent the start and finish times of intervals over the real number line. Find the maximum cardinality subset $S'$ of $S$ such that no pair of intervals in $S'$ overlap.
\end{quote}

For each of the following greedy strategies decide whether the strategy produces an optimal solution. If it does, give a proof that it is correct and describe what data structures and preprocessing you would use to give an efficient solution. If it is not correct, give a counter-example showing the strategy is incorrect and still give a description of an efficient implementation, as a heuristic. (Note: no pseudocode is required for this assignment.)

\subparagraph{(a) [10 points]}
Repeat until $S$ is empty: Select the interval $I$ that overlaps the fewest number of other intervals. Add $I$ to the final solution $S'$. Remove all intervals from $S$ that overlap with $I$.

\subparagraph{(b) [10 points]}
Repeat until $S$ is empty: Select the interval $I$ with the minimum $f_i$, i.e. the earliest finish time. Add $I$ to the final solution $S'$. Remove all intervals from $S$ that overlap with $I$.

\end{document}
