%==============================================================================
% Homework X, CS1490 (Fall 2009)
%==============================================================================
%\newcommand{\thishw}{\bf Homework X}
%\newcommand{\partnername1}{Person1}
%\newcommand{\partnerlogin1}{login1}
%\newcommand{\partnername2}{Person2}
%\newcommand{\partnerlogin2}{login2}
\newcommand{\thishw}{\bf Homework X}
\newcommand{\partnername}{Partner1}
\newcommand{\partnerlogin}{login1}
\newcommand{\secondpartnername}{Partner2}
\newcommand{\secondpartnerlogin}{login2}



%You can ignore all this mumbo jumbo and skip down to the \begin{document} line
%==============================================================================
% Formatting parameters.
%==============================================================================

\documentclass[11pt]{article} % 10pt article, want AMS fonts.
\makeatletter                    % Make '@' accessible.
\pagestyle{myheadings}                % We do our own page headers.
%\def\@oddhead{\bf CS1490 - \thishw - \ddmmyydate \today\hfill \partnername1 (\partnerlogin1); \partnername2 (\partnerlogin2)} % Here they are.
\def\@oddhead{\bf CS1490 - \thishw - \ddmmyydate \today\hfill \partnername (\partnerlogin); \secondpartnername (\secondpartnerlogin)} % Here they are.

\def\thesection{Problem\hskip-1em\ }        % Section headlines.
\def\thesubsection{Part\hskip-1em\ }
\oddsidemargin=0in                % Left margin minus 1 inch.
\evensidemargin=0in                % Same for even-numbered pages.
\textwidth=6.5in                % Text width (8.5in - margins).
\topmargin=0in                    % Top margin minus 1 inch.
\headsep=0.2in                    % Distance from header to body.
\textheight=8in                    % Body height (incl. footnotes)
\skip\footins=4ex                % Space above first footnote.
\hbadness=10000                    % No "underfull hbox" messages.
\makeatother                    % Make '@' special again.

\usepackage{newalg}
\usepackage{amsmath, amssymb}
\usepackage{latexsym}
\usepackage{psfig}
\usepackage{datetime}

%==============================================================================
% Macros.
%==============================================================================
\newcommand{\problem}[1]{\section{#1}}        % Problem.
\newcommand{\subproblem}[1]{\subsection{#1}}      % Sub Problem
\newcommand{\new}[1]{{\em #1\/}}        % New term (set in italics).
\newcommand{\set}[1]{\{#1\}}            % Set (as in \set{1,2,3})
\newcommand{\setof}[2]{\{\,{#1}|~{#2}\,\}}    % Set (as in \setof{x}{x > 0})
\newcommand{\C}{\mathbb{C}}                    % Complex numbers.
\newcommand{\N}{\mathbb{N}}                     % Positive integers.
\newcommand{\Q}{\mathbb{Q}}                     % Rationals.
\newcommand{\R}{\mathbb{R}}                     % Reals.
\newcommand{\Z}{\mathbb{Z}}                     % Integers.
\newcommand{\compl}[1]{\overline{#1}}        % Complement of ...            

%==============================================================================
% Title.
%==============================================================================

\begin{document}
\centerline{\LARGE\thishw}

\problem{1}

Problem 1 answer.

\subproblem{a}
Subproblem a

\subproblem{b}
Subproblem b

\subproblem{c}

% Please keep newpage commands! It helps the TAs to grade
\newpage 

\problem{2}

Problem 2 answer

\newpage

\problem{3}

Problem 3 answer

\newpage

\problem{4}

Problem 4 answer

\end{document}
