title: Shortest One-Way Path Through Multiple Nodes
body: <p>I have a series of graph coordinates and I need to find the shortest one-way path through them all. I have no predetermined start/end but each point must only be touched once and returning to the optimal origin is NOT required.</p>
  
  <p>I've tried a couple TSP approaches, but they all seem to be based on returning to the origin at the end which gives terribly inefficient results in this case.</p>
  
  <p>Example</p>
  
  <p>1, 13<br>
  3, 0<br>
  3, 7<br>
  2, 21<br>
  2, 11<br>
  3, 12<br>
  1, 19<br>
  3, 6  </p>
  
  <p>would resolve to</p>
  
  <p>3, 0<br>
  3, 6<br>
  3, 7<br>
  3, 12<br>
  2, 11<br>
  1, 13<br>
  1, 19<br>
  2, 21</p>
  
  <p>Notes: </p>
  
  <p>Yes I tried the search function, there is a basically identical question
  <a href="https://stackoverflow.com/questions/2501732/algorithm-shortest-path-between-all-points">Algorithm: shortest path between all points</a>
  however the only real answer is a TSP, which once again, closed circuit is inefficient for this.</p>
  
  <p>It does not need to be 100% accurate, I already have a permutations method but its far too slow, I need to handle at least ~25-30 points, settling with a good approximation works for me</p>
  
  <p>Thanks in advance.</p>
  
  <p>Edit to clarify, TSP tends to solve as in img #1, my desired result is img #2<br>
  img 3 is the above sample solved via a TSP and img #4 is the desired (x coords shifted back -.5 for visibility)<br>
  <img src="https://i.stack.imgur.com/0CxCJ.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/VeCsg.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/805iK.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/mMQQ4.png" alt="enter image description here"><br>
  Couple more for good measure #1 = TSP, #2 = desired<br>
  <img src="https://i.stack.imgur.com/U2UCv.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/UroOL.png" alt="enter image description here"><br>
  Basically i want the shortest chain connecting n points, using whichever start and end point is most efficient</p>