Given an undirected weighted graph which contains many nodes, how to compute a subset of the all pairs shortest path?
A subset means some of the nodes in graph, not all of them(The subset of vertices of the graph, may be appointed manually, or from some clustering algorithm. The count of the selected vertices may be 1%~5% of the total vertices).
Either Dijkstra or Floyd-Warshall may compute extra nodes, which may not be efficient enough for my application.
Is there algorithms which compute all pair shortest path between specific nodes and result good performance?
n/100should be consideredTheta(n), and you should use Floyd-Warshall or something like that. If it is rather small (n<=1000 or so), and n/100 ends up being considered as a constant, then I don't think you can do really better than Dijkstra several times... In between (which is rather vague, I agree) lies the complicated part... - gdelab