Shortest Path Algorithm Viterbi vs Dijkstra

The Viterbi and Dijkstra algorithms look similar, the difference between the two:

  1. Dijkstra's algorithm adapts to a wider range. Viterbi's algorithm is used in special directed acyclic graphs, while Dijkstra's algorithm can be used in most graph structures (directed and undirected, cyclic and acyclic can be used).

  2. The search process is similar, but the search order is different. Dijkstra selects the shortest node to search at each step, while Viterbi searches layer by layer in topological order.

  3. Dijkstra is based on a greedy idea, while Viterbi is a dynamic programming idea.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325291918&siteId=291194637