Basically, I need to have a shortest path in a graph that covers all of the vertices and returns to the source. Repetition of any vertex is ok so long as it is the shortest path.
My algorithm starts from the source. I run a dijkstra algorithm to find the shortest path. Then I choose the smallest weighted unreached vertex and run the dijkstra again as the chosen vertex as the source and keep doing it until all vertices are done. Then from the last vertex use dijkstra again to find the shortest path back to the original source.
I tried, but it seems to fail and I cannot find the reason.