Bellman Ford Flashcards
1
Q
At most how many iterations are used in the Bellman Ford Algorithm?
A
At most N, where N is the number of nodes
2
Q
When can we stop the Bellman Ford Algorithm?
A
When we have reached N iterations
Or
When the distances do not change between iterations
3
Q
What is the complexity of the Bellman Ford Algorithm?
A
O( V * E )
The number of vertices times the number of edges
4
Q
How can I detect a negative weight cycle using the Bellman Ford Algorithm?
A
If the estimation of the distances still changes in the V-th Round.
The algorithm is taking longer than V-1 iterations.