title: Random Graphs in C
body: <p>I have a homework about random graphs. I can't understand the question. Can anyone please clarify to me what I am supposed to do?</p>
  
  <p>Let <code>N</code> be a positive integer and <code>p</code> be a number between 0 and 1. An <code>(N, p)</code> random graph is a graph generated by the following procedure: </p>
  
  <p>Draw <code>N</code> vertices, denoted by <code>1, 2, . . . , N</code> respectively; for every pair <code>(u, v)</code> of
  different vertices, with probability <code>p</code>, connect the two vertices with an edge. A graph is said to be connected if there is a path between any two vertices.</p>
  
  <p>In this lab, you will write code to generate large random graphs and investigate the connectedness of such graphs.</p>
  
  <p>We will fix <code>N</code> to be <code>500,000</code> but let p vary in <code>{0.05, 0.10, 0.15, ..., 0.95}</code>. For each value of p, you need to create 100 <code>(N, p)</code> random graphs. You need to develop a method (and of course implement it in your program) to determine if a graph is connected. Then for each value of p, you need to count the number <code>M</code> of random graphs that are connected, and investigate the relationship between <code>M</code> (which reflects the probability that a random graph is connected) and <code>p</code>.</p>