From aa08b1f76fe036ec1fb55298ce4939f5572118fd Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 7 Sep 2014 14:41:03 -0400 Subject: Initial commit, ps1 --- hw-template.tex | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ps1/main.tex | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 hw-template.tex create mode 100644 ps1/main.tex 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 -- cgit v1.2.3-70-g09d2