\documentclass{homework}
\author{Musa Al`Khwarizmi}
\class{CS 3141: Prof. Kamil's Algorithm Analysis}
\date{\today}
\title{Overleaf Homework Template}
\address{Bayt El-Hikmah}
\graphicspath{{./media/}}
\begin{document} \maketitle
\question Write down sets in order of containment.
We pretend that equivalence classes are just numbers.
\[
\C \supset \R \supset \Q \supset \Z \supset \N \supset
\P \not\supset (\GF[7] = \modulo[7]) \supset \{\nil\}
\]
\question Find roots of $x^2- 8x = 9$.
We proceed by factoring,
\begin{align*}
x^2- 8x - 9 & = 9-9 & & \text{Subtract 9 on both sides.} \\
x^2- x + 9x - 9 & = 0 & & \text{Breaking the middle term.} \\
(x - 1)(x + 9) & = 0 & & \text{Pulling out common } (x - 1). \\
x & \in \{1, -9\} & & f(x)g(x) = 0 \Ra f(x) = 0 \vee g(x) = 0. \\
\end{align*}
\fig[0.3]{cipher.png, diagram.jpg}{Cipher wheels.}{wheel}
\question Figure \ref{wheel} shows two cipher wheels. The left one is from Jeffrey Hoffstein, et al. \cite{hoffstein2008introduction} (pg. 3). Write a Python 3 program that uses it to encrypt: \texttt{FOUR SCORE AND SEVEN YEARS AGO}.
\lstinputlisting[language=Python, caption={Python 3 implementing figure \ref{wheel} left wheel.}, label=gcd]{code/prog.py}
We get: \texttt{KTZW XHTWJ FSI XJAJS DJFWX FLT}.
% citations
\bibliographystyle{plain}
\bibliography{citations}
\end{document}