-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
42 lines (30 loc) · 1.38 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\documentclass{homework}
\author{Shu Wan}
\class{CSE 691: Topics in Reinforcement Learning}
\date{\today}
\title{Homework Assignment 1}
%\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}