\errorcontextlines=10
\input fleqn.sty

\typeout{}
\typeout{Math problem set style.}
\typeout{Don't forget to set the correct font before printing.}
\typeout{}

%
% Usage: \heading{assignment number}{due date}
%
\newcommand{\heading}[2]{
  \thispagestyle{empty}
  \begin{flushleft}
  \class \hfill Emanuel ``Jay'' Berkenbilt \\
  Assignment #1 \hfill #2
  \end{flushleft}
}

\raggedbottom
\setlength{\topmargin}{0in}
\setlength{\headsep}{0in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.5in}
\setlength{\parskip}{2ex}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0em}
\setlength{\unitlength}{4pt}

\newcommand{\sub}[1]{\mbox{$_{\mbox{\scriptsize #1}}$}}
\newcommand{\mod}[1]{~(\mbox{mod } #1)}

\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}

\newcommand{\be}{\begin{enumerate}}
\newcommand{\ee}{\end{enumerate}}

\newcommand{\qed}{\hspace*{\fill}$\Box$}

\newcommand{\pscref}[1]{\arabic{#1}}

\newcounter{pseudoline}
\newcommand{\pline}{\arabic{pseudoline} \stepcounter{pseudoline}}

\newcommand{\plab}[1]{
\arabic{pseudoline}
\newcounter{#1}
\setcounter{#1}{\value{pseudoline}}
\stepcounter{pseudoline}
}

\newenvironment{pseudocode}{
\setcounter{pseudoline}{1}
\begin{tabbing} 
000 \= aaa \= aaa \= aaa \= aaa \= aaa \= \kill
}{\end{tabbing}}

\newcounter{temp}
\newcommand{\saveenumi}{\setcounter{temp}{\value{enumi}}}
\newcommand{\restoreenumi}{\setcounter{enumi}{\value{temp}}}

\newcounter{seqcounter}
\newcounter{nextcounter}

% \seq{1}{n} generates 1, 2, ..., n
\newcommand{\seq}[2]{
\setcounter{seqcounter}{#1}
\setcounter{nextcounter}{#1}
\stepcounter{nextcounter}
\mbox{$\arabic{seqcounter}, \arabic{nextcounter}, \ldots, #2$}
}

% \subseq{a}{1}{n} generates a_1, a_2, ..., a_n
\newcommand{\subseq}[3]{
\setcounter{seqcounter}{#2}
\setcounter{nextcounter}{#2}
\stepcounter{nextcounter}
\mbox{$#1_{\arabic{seqcounter}}, #1_{\arabic{nextcounter}}, \ldots, #1_{#3}$}
}

%
% To use PSbox, look in the postscript file.  There will be a
% comment about the bounding box.  It will be four numbers, say
% a, b, c, d
% To use this to include the file at full scale, say
% \PSbox{filename}{a}{b}{c}{d}{1}
% The last number is the scale.  If it is other than 1, you will
% have to multiply a, b, c, and d by it yourself.
%
\newlength{\width}
\newlength{\height}
\newlength{\hoff}
\newlength{\voff}
\newcommand{\PSbox}[6]{
\setlength{\width}{#4pt}
\addtolength{\width}{-#2pt}
\setlength{\height}{#5pt}
\addtolength{\height}{-#3pt}
\mbox{\rule{0in}{\height}
\special{psfile=#1 hscale=#6 vscale=#6 
         hoffset=-#2 voffset=-#3}\hspace{\width}}}

\newcommand{\lcm}{\mbox{lcm}}

\newcommand{\binom}[2]{ 
  \left( \!\! \begin{array}{c} #1 \\ #2 \end{array} \!\! \right)
}

\newcommand{\multiset}[2]{ 
  \left\langle \!\! \begin{array}{c} #1 \\ #2 \end{array} \!\! \right\rangle
}

\newcommand{\disparray}[1]{\mbox{$\displaystyle #1$}}

\newenvironment{problem}{\begin{sl}}{\end{sl}}

% order statistics
\newcommand{\xo}[1]{X_{(#1)}}

\newcommand{\zq}[1]{\left({\cal Z}/#1{\cal Z}\right)}
\newcommand{\zqi}[1]{\left({\cal Z}/#1{\cal Z}\right)^*}

\newcommand{\jacob}[2]{ 
  \left(\frac{#1}{#2}\right)
}

\newcommand{\dens}{\mbox{dens}}
