Negative cycles: The Bellman-Ford algorithm -
If the length of the edge (E,B) were changed to -4, the graph would have a negative cycle A ? E ? B ? A. There is a path of length 2 from A to E. But going round the cycle, there's also a path of length 1, and going round multiple times, we find the paths of lengths 0,-1,-2 show how that was obtained
.