title: Calculate the shortest path between a set of vertices in an undirected weighted graph
body: <p>I have an undirected weighted graph (G) composed of at least 15 vertices. Given a set of vertices (G'), where G' ⊆ G, I need to calculate the shortest path required to traverse G' given a start vertex (v). 
  I am stuck!
  I tried the following:</p>
  
  <pre><code>for (Vertex vx : G'):
      computeShortestPath (v, vx)//using Dijkstra's algo
  </code></pre>
  
  <p>The shortest of all the paths generated between V and any vertex from G' will then constitute the initialized path (P).I then remove all vertices from G' that have been visited in P</p>
  
  <pre><code>G'.remove (P)
  </code></pre>
  
  <p>Recursively compute P until:</p>
  
  <pre><code>G'.size () == 0
  </code></pre>
  
  <p>My algorithm seems inefficient at times though! Any suggestions into different remedies to this problem? </p>
  
  <p>Edit: I need to visit every node in G' only once. </p>