\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{listings}
\usepackage[usenames,dvipsnames]{color}
\lstset{
    language=python,
    basicstyle=\tt\small,
    commentstyle=\color{Green},
    keywordstyle=\color{blue},
    stringstyle=\color{Orange},
    keepspaces=true,
    showstringspaces=false,
    emphstyle=\color{Maroon},
    emph={__name__}
}

\setlength{\parindent}{0pt}
\setlength{\parskip}{4pt}


\begin{document}

\large
CS 228, HW \#6 \hfill Due: 3/7/2014

\textbf{Name:} your name here

\textbf{e-ID:} your e-ID here

\textbf{Acknowledgement statement:}


\hrule
\normalsize

\bigskip
Unless otherwise specified, the exercises listed below are from the
textbook \emph{Discrete Mathematics and Its Applications, 7th Ed.}, by
Kenneth H.~Rosen. \textbf{Please show all of your work and explain
  your reasoning; don't just give the final answer.} Submit your
\texttt{hw6.tex} and \texttt{hw6.pdf} files via Canvas before 1:00 PM
on the due date. As a reminder, late work will NOT be accepted.


\subsection*{Relatively Prime}
\textit{The probability that two randomly chosen integers are relatively prime is $6 / \pi^2 \approx 0.6079$. Your task is to verify this theorem empirically by implementing the \texttt{test} function below. As a hint, you may want to review the Euclidean Algorithm (see Page 269).}

\medskip
\begin{lstlisting}
import random

def test(n, t):
    """Estimates and returns the probability that two random integers between
    0 and n are relatively prime by generating and checking t random pairs."""

if __name__ == "__main__":
    print test(1000000, 1000000)
\end{lstlisting}


\section*{Section 7.3 (page 475)}

\subsection*{Exercise 4}

\subsection*{Exercise 8}

\section*{Section 9.1 (page 581)}

\subsection*{Exercise 4: a, b, d}

\subsection*{Exercise 32}

\subsection*{Exercise 34: a, c, e}


\end{document}

