
\documentclass[11pt]{article}

\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{0.0in} 
% \setlength{\headheight}{0in}  
% \setlength{\headsep}{0in}    
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9.0in}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.15in}

\usepackage{times}
\usepackage{url}
\usepackage{graphicx}

\usepackage{listings}

\begin{document}

\title{Chapter 3}

\author{}

\date{}

\maketitle

\textbf{1.} 

\begin{verbatim}
paGen <- function(ngen)                                                             
{                                                                                   
   adj <- rbind(0:1,1:0)                                                            
   nverts <- 2  # number of vertices
   for (gen in 1:ngen) {
      # find degrees, normalize to sum to 1
      # ...
      target <- sample(1:nverts,1,prob=degs)
      # form updated/expanded adj matrix   
      # ...
   }                                                                                
   adj 
}                                                                
\end{verbatim}

\end{document}


