Dijkstra algorithm is typical greedy algorithm.
 |
Dijkstra algorithm run time, cited from Wikipedia |
Therefore, Dijkstra algorithm has the weakness of greedy, which not the path calculated this algorithm is always the shortest path.
But, the shortest pathway problem is NP (non-deterministic polynomial) problem, so this algorithm is really attractive.
No comments:
Post a Comment