 # Shortest Path Algorithm Essay

1131 Words5 Pages
Shortest Path Algorithm:
Shortest path algorithm is widely use for finding a shortest path when you have several ways to reach the destination. This is the approach by which not only the normal people got facilitate but professional people can also take several advantages for example engineers like civil engineers or software engineers also find the shortest way to solve their problems in short period of time. This algorithm has direct link with time, it reduces the time which to be consumed on a particular thing or a project. This is type of algorithm include two types, one is djikstra’s algorithm and other is Floyd algorithm. Detail or explanations of both types of algorithm are as follows.
Djikstra’s Algorithm:
Djikstra’s algorithm is one
…show more content…
Floyd algorithm for finding the shortest path is used for all node pairs ,It means that it is more efficient than the djikstra’salgo because the djikstra’s algorithm is use to find the shortest path from the starting point to all other point and this is used to find the shortest path from any point to all other point. so that’s why this approach is so widely use.in by using Floyd algorithm we can have more than one links to find the negative cost. Complexity of the floyd’salgo is O (n^3) where represent the number of nodes in the graph. Like djikstra’s algo , Floyd algorithm has direction for each edge and also has length so this is very useful for the city paths. In the Floyd algo there are two inputs which are number of vertices and adjacency matrix. So it is an exhaustive and incremental approach. Thus this type of algorithm (Floyd algorithm) is the more efficient type and most effective type that it can tell you for the shortest path from all point to all other while points that’s why this algorithm is commonly called all pair shortest path