w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how is bellman ford algorithm useful in networks?

The Bellman-Ford algorithm is used by DVR protocols like RIP and RIPv2.

From the wiki

Negative edge weights are found in various applications of graphs, hence the usefulness of this algorithm.[2] If a graph contains a "negative cycle", i.e., a cycle whose edges sum to a negative value, then there is no cheapest path, because any path can be made cheaper by one more walk through the negative cycle. In such a case, the Bellman–Ford algorithm can detect negative cycles and report their existence, but it cannot produce a correct "shortest path" answer if a negative cycle is reachable from the source

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.