\documentclass[12pt]{exam}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{fullpage, paralist}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{multirow,array}


\newcommand{\Z}{{\mathbb Z}}
\newcommand{\Q}{{\mathbb Q}}
\newcommand{\R}{{\mathbb R}}
\newcommand{\C}{{\mathbb C}}

\newcommand{\A}{{\mathcal A}}
\newcommand{\I}{{\mathcal I}}


\newcommand{\ds}{\displaystyle}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\newtheorem{thm}{Theorem}[section]

\theoremstyle{remark}
\newtheorem*{nnremark}{Remark}

\printanswers
%\noprintanswers
\unframedsolutions


\begin{document}

\parskip=\medskipamount \thispagestyle{empty}


\centerline{Math 36 --- Daily Homework}

\centerline{Assigned: 10/18} 

\centerline{Due: 10/20}
  

\begin{questions}

\question 

In class we wrote code to sample from $G(n,p)$, which creates random graphs where the expected number of edges is $p {n\choose 2}$. Modify the code you wrote or use the code I wrote in class (available under the resources tab) to sample from $G(n,m)$, the random graphs that have \emph{exactly} $m$ edges.

When writing your code, make sure that each edge is equally likely. The edge between 0 and 1 should be just as likely as the edge between 98 and 99.

The only thing you need to submit is your (well-commented) code.


\end{questions}


\end{document}







%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: