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

前端 未结 5 643
半阙折子戏
半阙折子戏 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:35

    The main difference is that Dijkstra's algorithm is defined when numbers of vertices is finite. It says to put all the vertices in a queue. But we can not put all the vertices in a queue when numbers of vertices tend to infinite. Uniform Cost Search is defined in a situation like this, where numbers of vertices are unknown.

提交回复
热议问题