Centralized algorithms are algorithms that revolve around the starting node and create a coordinate system which maps the entire network. The mapping system defines all the nodes and all the edges in the network in relation to the starting node, and iterates through the lists of nodes and edges starting from the closest nodes to the starting node, until it reaches the end node.
Dijkstra's Algorithm is a centralized Link-State algorithm used to find the path of shortest cost between two nodes and is widely used for network routing. It works by retreiving all the costs between the nodes on the network, putting them in lists and iteratively sorting and selecting the smallest cost that is connected to each node starting from the edges connected to the starting node and continuing from there. The algorithm updates a forwarding table, keeping a record of and printing the nodes previously used and the costs of the paths to connect them as it iterates closer to the last node. The table will be populated in order of nodes visited from the first node to the last node and will be the most cost-efficient path possible.
The step-by-step process goes as follows:
To learn how to use this interactive learning tool, go to our Tutorial page.
Decentralized algorithms are algorithms that do not only revolve around the starting node but rather as a coordinate system where each node is responsible only for what edges connect it and the nodes communicate with each other using their local information to coordinate the most cost efficient route together to reach the end node starting from the starting node that is selected.
The Bellman-Ford Algorithm is a decentralized algorithm used to find the path of shortest cost between two nodes and is another type of algorithm used for network routing. It works by storing edge relations to each node, putting them in lists. Starting from the identified start node, the nodes communicate with each other, passing information about what the costs of its edges are and where they connect and through an iterative process coordinate the most cost-efficient path to the destination node. This algorithm also follows the same forwarding table rules as Dijkstra, marking down the nodes and costs associated as it routes from start to finish. Unlike Dijkstra, no back-tracking is done and in addition since Bellman-Ford follows a decentralized model it can handle negative edge costs as well. However, for the purpose of network routing there will not be any contexts that involve a negative edge cost.
The step-by-step process goes as follows:
To learn how to use this interactive learning tool, go to our Tutorial page.