Bellman-ford

The Bellman–Ford algorithm computes single-source shortest paths in a weighted digraph

Dijkstra

Dijkstra's algorithm, conceived by Dutch computer scientist Edsger Dijkstra is a graph search algorithm that solves the single-source shortest path problem for a connected graph with nonnegative edge path costs, producing a shortest path tree

Circumstances situation approach

Quality Example
Approach better

"Surely there is some situation in which the bellman-ford approach is better than the dijkstra approach"

from question "Bellman-Ford vs Dijkstra: Under what circumstances is Bellman-Ford better?"

Better

"But under what circumstances is the bellman-ford algorithm better than the dijkstra algorithm"

from question "Bellman-Ford vs Dijkstra: Under what circumstances is Bellman-Ford better?"

Better choice

"However if g is guaranteed to have only non-negative weights g is non-positive weights then dijkstra s algorithm could be better choice over bellman-ford"

from question "Dijkstra for longest path in a DAG"

Others

Quality Example
Algorithm more

"After a lot of googling i ve found that most sources say that the dijkstra algorithm is more efficient than the bellman-ford algorithm"

from question "Bellman-Ford vs Dijkstra: Under what circumstances is Bellman-Ford better?"

Faster

"Since a proper implementation of dijkstra is faster than bellman-ford use dijkstra unless there are negative weight edges in the graph"

from question "Dijkstra vs BellFord algorithm"

Slower

"Bellman-ford as suggested in your question tends to be slower than either dijkstra s or a - it is primarily used when there are negative edge-weights which there are not here"

from question "Dijkstra algorithm alternatives - shortest path in graph, bus routes"

"The only issue with applying that technique for the single source shortest path problem is that reweighting with bellman-ford takes o mn time which is slower than dijkstra s o m log n"

from question "Does Dijkstra's algorithm apply even if there is only one negative weight edge?"

More similar

"In fact i think it is fair to say that bellman-ford is more similar to dijkstra because of its use of iterative relaxation"

from question "How does Bellman-Ford SSSP operate 'globally'?"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0