\ProvidesClass{problemset}
\DeclareOption*{\PassOptionsToClass{final}{article}}
\DeclareOption{worksheet}{\providecommand{\@solutionvis}{0}}
\DeclareOption{expand}{\providecommand{\@expand}{1}}
\ProcessOptions\relax
\LoadClass[10pt,letterpaper]{article}
\RequirePackage[ top=0.85in,
bottom=1in,
left=1in,
right=1in
]{geometry}
\RequirePackage{pgfkeys} \RequirePackage{tabularx} \RequirePackage{float} \RequirePackage{graphicx} \RequirePackage{enumerate} \RequirePackage{mathtools} \RequirePackage{amsthm} \RequirePackage{amssymb} \RequirePackage{booktabs} \RequirePackage{esdiff} \RequirePackage{mathtools} \RequirePackage{fancyhdr} \RequirePackage{lastpage} \RequirePackage{xcolor} \RequirePackage[ obeyFinal, color=@todoclr,
linecolor=red
]{todonotes} \RequirePackage[ colorlinks=true,
linkcolor=navy,
urlcolor=black
]{hyperref} \RequirePackage{url} \RequirePackage[all]{hypcap}
\definecolor{@todoclr}{gray}{0.80} \definecolor{navy}{RGB}{0,0,150} \setlength{\parskip}{1.5ex} \setlength{\parindent}{0pt}
\let\VERBATIM\verbatim
\def\verbatim{ \def\verbatim@font{\small\ttfamily}\VERBATIM}
\usepackage[small]{caption}
\usepackage[footnotesize]{subcaption}
\captionsetup[table]{labelformat=simple, labelsep=period, labelfont=bf}
\captionsetup[figure]{labelformat=simple, labelsep=period, labelfont=bf}
\captionsetup[subtable]{labelformat=parens, labelsep=space, labelfont=bf}
\captionsetup[subfigure]{labelformat=simple, labelsep=period, labelfont=bf}
\def\TRUE{1}
\def\FALSE{0}
\def\SHOW{1}
\def\HIDE{0}
\providecommand{\heading}[5][]{
\thispagestyle{empty}
\listoftodos
\clearpage
\pagenumbering{arabic}
\providecommand{\shortname}{#1}
\providecommand{\authorname}{#2}
\providecommand{\coursename}{#3}
\providecommand{\assignment}{#4}
\providecommand{\duedate}{#5}
\begin{minipage}{0.5\textwidth}
\begin{flushleft}
\hypertarget{@assignment}{
\textbf{\assignment}
}\\
\authorname
\end{flushleft}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{flushright}
\coursename\\
\duedate\\
\end{flushright}
\end{minipage}
\thispagestyle{empty}
}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.5pt}
\pagestyle{fancyplain}
\fancyhf{}
\lfoot{\fancyplain{}{ \hyperlink{@assignment}{ \small{ \color{black}{ \assignment
}
}
}
}
}
\cfoot{\fancyplain{}{ \small{ \coursename
}
}
}
\rfoot{\fancyplain{}{ \small{\shortname~\thepage~of~\pageref{LastPage}}
}
}
\newcounter{theproblem}
\providecommand{\problem}[1][]{ \addtocounter{theproblem}{1} \setcounter{table}{0} \setcounter{figure}{0} \setcounter{equation}{0} \noindent \textbf{ Problem~\arabic{theproblem}.}~\textit{\small{#1}}
}
\providecommand{\@expand}{\HIDE} \providecommand{\qqed}{\hfill\rule{2mm}{2mm}\ifnum\@expand=\SHOW\\\pagebreak\fi}
\providecommand{\@solutionvis}{1} \providecommand{\solution}[2][\@solutionvis]{
\vspace{0.5em}\noindent\textbf{Solution.}
\ifnum#1=\SHOW#2
\hfill\qqed\vspace{0.1em}
\else\pagebreak\fi
}
\providecommand{\chap}[2][0]{
\ifnum#1=0\else\setcounter{section}{#1}\addtocounter{section}{-1}\fi\vspace{-1.75em}\section{#2}
}
\providecommand{\sect}[2][0]{
\ifnum#1=0\else\setcounter{subsection}{#1}\addtocounter{subsection}{-1}\fi\vspace{-0.5em}\subsection{#2}
}
\providecommand{\subsect}[1]{\noindent\textbf{#1.}}
\providecommand{\insertgraphic}[2][0.5\textwidth]{
\vspace{-1em}
\begin{center}
\includegraphics[width=#1]{#2}
\end{center}
\vspace{-1em}
}
\renewcommand{\thetable}{\arabic{theproblem}.\arabic{table}}
\renewcommand{\thefigure}{\arabic{theproblem}.\arabic{figure}}
\renewcommand{\theequation}{\arabic{theproblem}.\arabic{equation}}
\newcounter{formula}
\newenvironment{formula}[1][Formula \arabic{formula}]
{
\addtocounter{formula}{1}
\begin{displaymath}
\tag*{\parbox{5em}{\textbf{\small{#1}}}}
}{
\end{displaymath}\\
}
\newif\ifcaption
\pgfkeys
{
/mypkg/title/.store in=\Caption, /mypkg/title= , /mypkg/label/.store in=\Label, /mypkg/label= , /mypkg/caption/.is if=caption, }
\newenvironment{mathtable}[2][]{
\pgfkeys{/mypkg/.cd, #1} \vspace{-1em} \begin{table}[ht!] \small \begin{center} \begin{displaymath} \begin{array}{#2} \toprule
}{
\bottomrule
\end{array} \end{displaymath} \ifcaption \vspace{-1em}\caption{\Caption}\label{\Label} \fi \end{center} \end{table} \vspace{-1em}}
\providecommand{\double}[2]{ \multicolumn{1}{c}{ \genfrac{}{}{0pt}{}{\text{#1}}{\text{#2}}
}
}
\theoremstyle{plain} \newtheorem{thm}{Theorem}[section] \newtheorem{lma}[thm]{Lemma}
\newtheorem{crl}[thm]{Corollary}
\newtheorem{prp}[thm]{Proposition}
\newtheorem{cnj}[thm]{Conjecture}
\newtheorem{alg}[thm]{Algorithm}
\newenvironment{theorem}[2][]{\begin{thm}[#1]\label{#2}}{\end{thm}}
\newenvironment{lemma}[2][]{\begin{lma}[#1]\label{#2}}{\end{lma}}
\newenvironment{corollary}[2][]{\begin{crl}[#1]\label{#2}}{\end{thm}}
\newenvironment{proposition}[2][]{\begin{prp}[#1]\label{#2}}{\end{crl}}
\newenvironment{conjecture}[2][]{\begin{cnj}[#1]\label{#2}}{\end{cnj}}
\newenvironment{algorithm}[2][]{\begin{alg}[#1]\label{#2}}{\end{alg}}
\theoremstyle{remark} \newtheorem{rmk}{Remark}[section] \newtheorem*{note}{Note} \newtheorem*{caveat}{Caveat} \newtheorem*{warning}{Warning}
\theoremstyle{definition} \newtheorem{dfn}{Definition}[section] \newtheorem{exm}{Example}[section] \newtheorem{smm}{Summary}[subsection] \newtheorem*{question}{Question} \newtheorem*{speculation}{Speculation}
\newenvironment{remark}[2][]{\begin{rmk}[#1]\label{#2}}{\end{rmk}}
\newenvironment{definition}[2][]{\begin{dfn}[#1]\label{#2}}{\end{dfn}}
\newenvironment{example}[2][]{\begin{exm}[#1]\label{#2}}{\end{exm}}
\newenvironment{summary}[2][]{\begin{smm}[#1]\label{#2}}{\end{smm}}
\renewcommand{\a}{\ensuremath{\alpha}}
\renewcommand{\b}{\ensuremath{\beta}}
\renewcommand{\c}{\ensuremath{\gamma}}
\newcommand{\ch}{\ensuremath{\chi}}
\renewcommand{\d}{\ensuremath{\delta}}
\newcommand{\ep}{\ensuremath{\epsilon}}
\newcommand{\et}{\ensuremath{\eta}}
\newcommand{\ve}{\ensuremath{\varepsilon}}
\renewcommand{\r}{\ensuremath{\rho}}
\newcommand{\s}{\ensuremath{\sigma}}
\renewcommand{\t}{\ensuremath{\tau}}
\newcommand{\f}{\ensuremath{\psi}}
\newcommand{\w}{\ensuremath{\omega}}
\newcommand{\h}{\ensuremath{\phi}}
\newcommand{\m}{\ensuremath{\mu}}
\renewcommand{\l}{\ensuremath{\lambda}}
\renewcommand{\k}{\ensuremath{\kappa}}
\renewcommand{\v}{\ensuremath{\nu}}
\renewcommand{\i}{\ensuremath{\iota}}
\renewcommand{\o}{\ensuremath{\theta}}
\newcommand{\z}{\ensuremath{\zeta}}
\providecommand{\NN}{\ensuremath{\mathbb{N}}}
\providecommand{\ZZ}{\ensuremath{\mathbb{Z}}}
\providecommand{\QQ}{\ensuremath{\mathbb{Q}}}
\providecommand{\RR}{\ensuremath{\mathbb{R}}}
\providecommand{\CC}{\ensuremath{\mathbb{C}}}
\providecommand{\pd}{\partial} \providecommand{\dd}{\mathrm{d}} \providecommand{\x}{\times}
\providecommand{\n}{\scalebox{0.6}[1.0]{\ensuremath{-}}}
\providecommand{\Sum}[3][n]{\ensuremath{\sum_{{#1}={#2}}^{#3}}} \providecommand{\infsum}[2][n]{\ensuremath{\sum_{{#1}={#2}}^\infty}} \providecommand{\Int}[4][x]{\ensuremath{\int_{#3}^{#4}\!{#2}\,\mathrm{d}{#1}}} \providecommand{\Lim}[3][\infty]{\ensuremath{\displaystyle \lim_{{#2}\to{#1}}\!\!{#3}}} \providecommand{\Frac}[2]{\ensuremath{\,^{#1}\!/\!_{#2}}} \providecommand{\eval}[3]{\ensuremath{\left[ #1 \right \vert_{#2}^{#3}}}
\renewcommand{\L}{\left} \providecommand{\R}{\right} \providecommand{\D}{\diff} \providecommand{\PD}{\diffp} \providecommand{\full}{\displaystyle} \providecommand{\Deg}{\ensuremath{^\circ}} \providecommand{\abs}[1]{\left\vert #1 \right\vert} \providecommand{\norm}[1]{\left \Vert #1 \right \Vert} \providecommand{\e}[1]{\ensuremath{\times 10^{#1}}} \providecommand{\E}[1]{\ensuremath{10^{#1}}} \renewcommand{\u}[1]{\text{ #1}} \providecommand{\mc}{\text{,}\hspace{1em}} \providecommand{\mtxt}[2][]{#1\hspace{0.5em}\text{#2}\hspace{0.5em}}
\providecommand{\prob}[1]{\ensuremath{P\!\left(#1\right)} }
\providecommand{\cndprb}[2]{\ensuremath{P\!\left(#1 \left\vert #2 \right. \right)} }
\providecommand{\cov}[1]{\ensuremath{\text{Cov}\!\left(#1\right)} }
\providecommand{\ex}[1]{\ensuremath{E\!\left[#1\right]} }
\providecommand{\twovector}[3][r]{\left(\begin{array}{#1} #2 \\ #3\end{array}\right)}
\providecommand{\threevector}[4][r]{\left(\begin{array}{#1} #2 \\ #3 \\ #4\end{array}\right)}
\providecommand{\fourvector}[5][r]{\left(\begin{array}{#1} #2 \\ #3 \\ #4 \\ #5 \end{array}\right)}
\providecommand{\vecs}[1]{\ensuremath{\vec{\bm{#1}}} } \providecommand{\vect}[1]{\ensuremath{\vec{\textbf{#1}}} } \providecommand{\unitvecs}[1]{\bm{\hat{#1}}}
\providecommand{\unitvect}[1]{\hat{\textbf{#1}}}
\providecommand{\Div}[1]{\vecs{\del} \cdot \vect{#1}}
\providecommand{\Curl}[1]{\vecs{\del} \times \vect{#1}}
\providecommand{\Grad}{\vecs{\del}}