title: Random simple connected graph generation with given sparseness
body: <p>I'm trying to find an efficient algorithm to generate a simple connected graph with given sparseness. Something like:</p>
  
  <pre><code>Input:
      N - size of generated graph
      S - sparseness (numer of edges actually; from N-1 to N(N-1)/2)
  Output:
      simple connected graph G(v,e) with N vertices and S edges
  </code></pre>