-2

There is a weighted directed graph.How to get the shortest path in the directed graph that goes through some specified vertices.

Chad Nouis
  • 6,861
  • 1
  • 27
  • 28
  • Possible duplicate of [Algorithm Optimization - Shortest Route Between Multiple Points](http://stackoverflow.com/questions/1511585/algorithm-optimization-shortest-route-between-multiple-points) – navari Mar 22 '16 at 05:57

1 Answers1

0

Actually this problem falls into the class of NP, because Hamiltonian path, the well-known NP problem, can be reduced to this problem. So you might use brute force search or some approximation algorithm.

Ke Yang
  • 218
  • 1
  • 6