title: generate a random graph with uniform distribution of edges
body: <p>I'm trying to find an efficient algorithm to generate a simple connected graph with given the number of nodes. Something like:</p>
  
  <pre><code>Input:
      N - size of generated graph
  Output:
      simple connected graph G(v,e) with N vertices and S edges, The number of edges should be uniform distribution.
  </code></pre>