does the rule : 'kth iteration relaxes all nodes that are atmost k edges from source' work for all graphs?

30 Views Asked by At

in the Bellman-ford algo, we know that, at kth iteration, nodes that are at atmost k edges from the source, obtain their best value. but does this rule apply to all possible graphs (all directed)?

see the graph below, doesn't this graph break the above-mentioned rule? if not? then how would it still hold?

reference graph

0

There are 0 best solutions below