What's the difference between uniform-cost search and Dijkstra's algorithm?

前端 未结 5 630
半阙折子戏
半阙折子戏 2021-01-30 09:53

I was wondering what\'s the difference between uniform-cost search and Dijkstra\'s algorithm. They seem to be the same algorithm.

5条回答
  •  隐瞒了意图╮
    2021-01-30 10:52

    Dijkstra's algorithm, which is perhaps better-known, can be regarded as a variant of uniform-cost search, where there is no goal state and processing continues until all nodes have been removed from the priority queue, i.e. until shortest paths to all nodes (not just a goal node) have been determined

    http://en.wikipedia.org/wiki/Uniform-cost_search#Relationship_to_other_algorithms

提交回复
热议问题