summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2014-09-07 14:41:03 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2014-09-07 14:41:03 -0400
commitaa08b1f76fe036ec1fb55298ce4939f5572118fd (patch)
tree14871d5a8f020c0836515c8638c3129905201ca3
downloadcs224-aa08b1f76fe036ec1fb55298ce4939f5572118fd.tar.gz
Initial commit, ps1
-rw-r--r--hw-template.tex59
-rw-r--r--ps1/main.tex59
2 files changed, 118 insertions, 0 deletions
diff --git a/hw-template.tex b/hw-template.tex
new file mode 100644
index 0000000..9ad9153
--- /dev/null
+++ b/hw-template.tex
@@ -0,0 +1,59 @@
+\documentclass[10pt]{article}
+\usepackage{fullpage}
+\usepackage{amsmath,amsfonts,amsthm}
+
+% these are compressed lists to help fit into a 1 page limit
+\newenvironment{enumerate*}%
+ {\vspace{-2ex} \begin{enumerate} %
+ \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
+ {\end{enumerate}}
+
+\newenvironment{itemize*}%
+ {\vspace{-2ex} \begin{itemize} %
+ \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
+ {\end{itemize}}
+
+\newenvironment{description*}%
+ {\vspace{-2ex} \begin{description} %
+ \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
+ {\end{description}}
+
+\DeclareMathOperator*{\E}{\mathbb{E}}
+\let\Pr\relax
+\DeclareMathOperator*{\Pr}{\mathbb{P}}
+
+\newcommand{\inprod}[1]{\left\langle #1 \right\rangle}
+\newcommand{\eqdef}{\mathbin{\stackrel{\rm def}{=}}}
+
+\newtheorem{theorem}{Theorem}
+\newtheorem{lemma}{Lemma}
+
+\author{Jelani Nelson}
+\title{CS 229r Problem Set 1 -- Solutions}
+
+\begin{document}
+
+\maketitle
+
+Here is a theorem with proof.
+
+\begin{theorem}
+The square root of $2$ is irrational.
+\end{theorem}
+\begin{proof}
+For the sake of contradiction suppose $\sqrt{2}$ is rational. Write $\sqrt{2} = a/b$ with $a,b$ positive integers with gcd $1$. Then $2 = a^2/b^2$, so $a = 2k$ is even. Then $2 = 4k^2/b^2$ so that $b = 2k^2$, implying $b$ is even. This contradicts that $a,b$ have gcd $1$.
+\end{proof}
+
+Some random facts in a list:
+
+\begin{itemize*}
+\item Compared with the ``itemize'' environment in \LaTeX, itemize$^*$ has smaller separation between bullet points.
+\item The $n$th Catalan number is $C_n \eqdef \frac{1}{n+1} \binom{2n}{n}$.
+\item If $\pi(x)$ is the number of primes less than or equal to $x$, then
+$$\lim_{x\rightarrow\infty} \frac{\pi(x)}{x/\ln(x)} = 1 . $$
+\item $$ \sum_{\substack{1\le i\le 2n\\i\ \mathrm{even}}} i = \frac{2n(n+1)}2 .$$
+\end{itemize*}
+
+Have fun on your problem sets.
+
+\end{document} \ No newline at end of file
diff --git a/ps1/main.tex b/ps1/main.tex
new file mode 100644
index 0000000..9ad9153
--- /dev/null
+++ b/ps1/main.tex
@@ -0,0 +1,59 @@
+\documentclass[10pt]{article}
+\usepackage{fullpage}
+\usepackage{amsmath,amsfonts,amsthm}
+
+% these are compressed lists to help fit into a 1 page limit
+\newenvironment{enumerate*}%
+ {\vspace{-2ex} \begin{enumerate} %
+ \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
+ {\end{enumerate}}
+
+\newenvironment{itemize*}%
+ {\vspace{-2ex} \begin{itemize} %
+ \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
+ {\end{itemize}}
+
+\newenvironment{description*}%
+ {\vspace{-2ex} \begin{description} %
+ \setlength{\itemsep}{-1ex} \setlength{\parsep}{0pt}}%
+ {\end{description}}
+
+\DeclareMathOperator*{\E}{\mathbb{E}}
+\let\Pr\relax
+\DeclareMathOperator*{\Pr}{\mathbb{P}}
+
+\newcommand{\inprod}[1]{\left\langle #1 \right\rangle}
+\newcommand{\eqdef}{\mathbin{\stackrel{\rm def}{=}}}
+
+\newtheorem{theorem}{Theorem}
+\newtheorem{lemma}{Lemma}
+
+\author{Jelani Nelson}
+\title{CS 229r Problem Set 1 -- Solutions}
+
+\begin{document}
+
+\maketitle
+
+Here is a theorem with proof.
+
+\begin{theorem}
+The square root of $2$ is irrational.
+\end{theorem}
+\begin{proof}
+For the sake of contradiction suppose $\sqrt{2}$ is rational. Write $\sqrt{2} = a/b$ with $a,b$ positive integers with gcd $1$. Then $2 = a^2/b^2$, so $a = 2k$ is even. Then $2 = 4k^2/b^2$ so that $b = 2k^2$, implying $b$ is even. This contradicts that $a,b$ have gcd $1$.
+\end{proof}
+
+Some random facts in a list:
+
+\begin{itemize*}
+\item Compared with the ``itemize'' environment in \LaTeX, itemize$^*$ has smaller separation between bullet points.
+\item The $n$th Catalan number is $C_n \eqdef \frac{1}{n+1} \binom{2n}{n}$.
+\item If $\pi(x)$ is the number of primes less than or equal to $x$, then
+$$\lim_{x\rightarrow\infty} \frac{\pi(x)}{x/\ln(x)} = 1 . $$
+\item $$ \sum_{\substack{1\le i\le 2n\\i\ \mathrm{even}}} i = \frac{2n(n+1)}2 .$$
+\end{itemize*}
+
+Have fun on your problem sets.
+
+\end{document} \ No newline at end of file