%
% file: sample.tex
% author: Phil Rogaway
% History:
% 2003.10.14 - created
% 2021.12.27 - Revised
%
% This is LaTeX template to get you started using LaTeX
% for making problem-set solutions.
%
% Everything after a %-sign is a comment. It is ignored
\documentclass[11pt]{article}
\usepackage{amsmath}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-0.5in}
% Sample macros -- how you define new commands
% My own set of frequently-used macros have grown to many hundreds of lines.
% Here are some simple samples.
\newcommand{\Adv}{{\mathbf{Adv}}} %example macro
\newcommand{\getsr}{{\:\stackrel{{\scriptscriptstyle\hspace{0.2em}\$}}{\leftarrow}\:}} % a more complex macro
\newcommand{\Func}[1]{{\mathrm{Fun}[{#1}]}} % These macros take one
\newcommand{\Randd}[2]{{\mathrm{Rand}[{#1},{#2}]}} % and two arguments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\bf Problem Set 1 Solutions}
\date{\today}
\author{\bf Jane P.\ Student}
\begin{document}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Problem 1}
Here you'll put your solution to problem~1.
A most \emph{excellent} solution to problem~1.
Make all of your solutions excellent and you will make
me happy. Don't you want me to be happy?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Problem 2}
One of the most important aspects of \LaTeX\ is its math mode.
Mathematical symbols should look like $a$ or $X_5$ or $A_{ij}^*$;
never write something like x in ordinary text mode---it looks bad,
might be confused with ordinary English text, and
a mathematician will likely assume that
x, \texttt{x}, $x$, $X$, and $\cal X$ are all intended to mean different things.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Problem 3}
To produce an offset formula you can write things like:
\begin{eqnarray*}
\sum_{i=1}^n i &=& \frac{n(n+1)}{2} \\
&\in& O(n^2)
\end{eqnarray*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section*{Problem 4}
I won't suggest that becoming good with \LaTeX\ is easy; it isn't.
But CS researchers, grad students, and serious undergrads all use this program---and lots
of other scientists and non-scientists do, too.
I would even say that LaTeX is the program of choice for all your college
essays; the quality of output is a world apart from that you'll get from Word,
even when there's not a formula in sight.
\end{document}