title: Undirected graph generation with given connectivity
body: <p>I want to find an algorithm to generate an undirected graph with a given size and a given connectivity, where each vertex has exactly the specified number of edges coming from it. The closest thing I've found so far is this:</p>
  
  <p><a href="https://stackoverflow.com/questions/2041517/random-simple-connected-graph-generation-with-given-sparseness">Random simple connected graph generation with given sparseness</a></p>
  
  <p>The difference here being that I'm less interested in the total number of edges in the graph (though that can easily be computed too) -- what I'm looking for is a guarantee that each vertex has exactly the given number of connections.</p>
  
  <p>For example:</p>
  
  <pre><code>Input: Size - 6   Connectivity - 4
  Output: Undirected graph with 6 verteces and (6*4/2)=12 edges, where each vertex has 4 connnections.
  </code></pre>
  
  <p>I am assuming that my inputs will have a valid output.</p>