%
% This is the LaTeX template file for lecture notes for CS267,
% Applications of Parallel Computing.  When preparing
% LaTeX notes for this class, please use this template.
%
% To familiarize yourself with this template, the body contains
% some examples of its use.  Look them over.  Then you can
% run LaTeX on this file.  After you have LaTeXed this file then
% you can look over the result either by printing it out with
% dvips or using xdvi.
%

\documentclass{article}
%% \setlength{\oddsidemargin}{-0.25 in}
%% %% \setlength{\evensidemargin}{-0.25 in}
%% \setlength{\topmargin}{-0.6 in}
%% \setlength{\textwidth}{6.5 in}
%% \setlength{\textheight}{8.5 in}
\usepackage[margin=1in]{geometry}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}
\topmargin -2cm
%
% ADD PACKAGES here:
%

\usepackage{amsmath,amsfonts,graphicx}

%
% The following commands set up the lecnum (lecture number)
% counter and make various numbering schemes work relative
% to the lecture number.
%
\newcounter{lecnum}
\renewcommand{\thepage}{\thelecnum-\arabic{page}}
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
\renewcommand{\theequation}{\thelecnum.\arabic{equation}}
\renewcommand{\thefigure}{\thelecnum.\arabic{figure}}
\renewcommand{\thetable}{\thelecnum.\arabic{table}}
\usepackage{color}
\newcommand{\todo}[1]{\textcolor{red}{[TODO: #1]}}

%
% The following macro is used to generate the header.
%
\newcommand{\lecture}[4]{
  \pagestyle{myheadings}
   \thispagestyle{plain}
   \newpage
   \setcounter{lecnum}{#1}
   \setcounter{page}{1}
   \noindent
   \begin{center}
     \framebox{
       \vbox{\vspace{2mm}
     \hbox to 6.28in { {\bf COMPSCI 311: Introduction to Algorithms
                \hfill Fall 2018} }
       \vspace{4mm}
       \hbox to 6.28in { {\Large \hfill Homework #1  \hfill} }
       \vspace{2mm}
       \hbox to 6.28in { \textbf{Name:} \todo{Your name} \hfill \textbf{Collaborators}: \todo{Your Collaborators}} 
       \vspace{2mm}
       \hbox to 6.28in { Released 10/4/2018 \hfill Due 10/18/2018 11:59pm in Gradescope}
       %% \hbox to 6.28in { {\it Lecturer: #3 \hfill Scribes: #4} }
      \vspace{2mm}}
    }
   \end{center}
   \markboth{Homework #1}{Homework #1}

   \vspace*{4mm}
 }
 %
 % Convention for citations is authors' initials followed by the year.
 % For example, to cite a paper by Leighton and Maggs you would type
 % \cite{LM89}, and to cite a paper by Strassen you would type \cite{S69}.
 % (To avoid bibliography problems, for now we redefine the \cite command.)
 % Also commands that create a suitable format for the reference list.
\renewcommand{\cite}[1]{[#1]}
\def\beginrefs{\begin{list}%
  {[\arabic{equation}]}{\usecounter{equation}
         \setlength{\leftmargin}{2.0truecm}\setlength{\labelsep}{0.4truecm}%
         \setlength{\labelwidth}{1.6truecm}}}
\def\endrefs{\end{list}}
\def\bibentry#1{\item[\hbox{[#1]}]}

  %Use this command for a figure; it puts a figure in wherever you want it.
  %usage: \fig{NUMBER}{SPACE-IN-INCHES}{CAPTION}
  \newcommand{\fig}[3]{
    \vspace{#2}
                        \begin{center}
                          Figure \thelecnum.#1:~#3
                        \end{center}
        }
        % Use these for theorems, lemmas, proofs, etc.
\newtheorem{theorem}{Theorem}[lecnum]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{proof}{{\bf Proof:}}{\hfill\rule{2mm}{2mm}}

% **** IF YOU WANT TO DEFINE ADDITIONAL MACROS FOR YOURSELF, PUT THEM HERE:

\begin{document}
\lecture{3}
%\footnotetext{These notes are partially based on those of Nigel Mansell.}

% **** YOUR NOTES GO HERE:

\renewcommand\theenumii{\alph{enumii}}

\begin{enumerate}

\item \textbf{(20 points) Recurrences}

\textbf{a)}

\textbf{b)}

\textbf{c)}

\newpage

\item \textbf{(15 points) Divide and Conquer the Tree}

\newpage
  
\item \textbf{(20 points) Decimal to Binary}

\newpage

\item \textbf{(15 points) Almost Balanced Trees}

\newpage

\item \textbf{(10 points) Discrete Optimization} (K\&T Ch5 Ex6).

\newpage

\item \textbf{(20 points) Honest or Liar?}

\textbf{a)}

\textbf{b)}

\vfill

\item \textbf{(0 points).} How long did it take you to complete this assignment?

\end{enumerate}

\end{document}
