0
$\begingroup$

If I have a graphic

$A\rightarrow B$ weight $10$
$B\rightarrow A\qquad 11$
$B\rightarrow C\qquad 20$
$C\rightarrow D\qquad 5$
$D\rightarrow C\qquad 16$
$D\rightarrow B\qquad 9$
$D\rightarrow A\qquad 7$

then, if start from any one of the node, I want to know the shortest path to another. Does anyone what kind of algorithms can do it?

Thanks.

$\endgroup$

2 Answers 2

0
$\begingroup$

Dijkstra's Algorithm

$\endgroup$
0
$\begingroup$

A lot depends on what sort of solution you need. If you absolutely need a global one regardless of the time needed, use Dynamic programming. If you are happy with a local one, any sort of heuristic algorithms would do (e.g. Evolutionary Algorithms, Simulated Annealing, etc)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .