\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{enumitem}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}
\usepackage{amsmath,amsfonts,graphicx,multicol, color}
\newcommand{\todo}{\textcolor{red}}
\newcommand{\red}{\textcolor{red}}
\usepackage{url}
%\def\IsSolution{1} % Uncomment to debug solutions. Note: Makefile generates both discussion and solution automatically.
%
% Define two macros
% \soln{} --- contents appear only in solution
% \thesoln{} --- contents appear only in solution --- starts with bold ``Solution:''
% \notsoln{} --- contents appear only if not solution
\usepackage{etoolbox}
\ifx\IsSolution\undefined
\newcommand{\notsoln}[1]{#1}
\newcommand{\soln}[1]{}
\newcommand{\thesoln}[1]{}
\else
\newcommand{\notsoln}[1]{}
\newcommand{\soln}[1]{#1}
\newcommand{\thesoln}[1]{\textbf{Solution:} #1}
\fi
%
% The following macro is used to generate the header.
%
\newcommand{\header}[4]{
\pagestyle{myheadings}
\thispagestyle{plain}
\newpage
\setcounter{page}{1}
\noindent
\begin{center}
\framebox{
\vbox{\vspace{2mm}
\hbox to 6.28in { {\bf CMPSCI 311: Introduction to Algorithms
\hfill Spring 2017} }
\vspace{4mm}
\hbox to 6.28in { {\Large \hfill Homework #1 \soln{Solutions} \hfill } }
\vspace{3mm}
\hbox to 6.28in { \notsoln{Your Name: \hrulefill \hfill \hfill } }
\vspace{2mm}
\hbox to 6.28in { \notsoln{Collaborators and sources: \hrulefill \hrulefill \hrulefill \hfill } }
%% \hbox to 6.28in { {\it Lecturer: #3 \hfill Scribes: #4} }
\vspace{2mm}}
}
\end{center}
\markboth{Homework #1}{Homework #1}
\vspace*{4mm}
}
\newcounter{problem}
\newcommand{\prob}{\addtocounter{problem}{1}\noindent {\bf Problem \theproblem.} ~}
\begin{document}
\header{2}
\textbf{Instructions.} You make work in groups, but you must write solutions yourself.
List collaborators on your submission.
If you are asked to design an algorithm, please provide: (a) the pseudocode for the algorithm, (b) an explanation of the intuition for the algorithm, (c) a proof of correctness, (d) the running time of your algorithm and (e) justification for your running time analysis.
\textbf{Submission instructions.} This assignment is due by 8:00pm on Friday, Feb 24 in Gradescope (as a pdf file). Please review the course policy about Gradescope submissions on the course website.
\begin{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{(10 points) Graph Properties}
\begin{enumerate}
\item \textbf{(5 points) K\&T Ch. 3 Ex. 7}
\item \textbf{(5 points) DAGs.}
\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{(10 points) Directed Graphs.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{(15 points) K\&T Ch 3, Ex 3}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{(20 points) K\&T Ch 3 Ex 12}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{(25 points) K\&T Ch4.Ex3.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{(20 points) Greedy Algorithms}
\item \textbf{(0 points).} How long did it take you to complete this assignment?
\end{enumerate}
\end{document}