139k views
4 votes
Can you come up with a scenario where an increase in the cost of a link has caused a count-to-infinity problem for Bellman-Ford? Please describe the reasoning and/or provide an example for your answer.

User Jcuenod
by
8.7k points

1 Answer

5 votes

Final answer:

An increase in the cost of a link can cause a count-to-infinity problem for Bellman-Ford algorithm.

Step-by-step explanation:

In the context of Bellman-Ford, the count-to-infinity problem occurs when there is a change in the cost of a link that causes the algorithm to enter an endless loop, continuously increasing the cost to reach a destination.

For example, let's say there are three routers A, B, and C connected in a network. Initially, the cost from A to B is 5 and the cost from B to C is 10.

Now, if the cost from B to C suddenly increases to 15, the Bellman-Ford algorithm will continuously update and increase the cost from A to C, leading to the count-to-infinity problem.

User Dymetrius
by
8.1k points