Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

SHORTEST PATH TRAVELLED

BY AN AIRCRAFT USING
DIFFERENT ALGORITHMS
Members:
Akshay Jaithalia 19BEC0704
Kashyap Bastola 19BCE2529
AIM

 This study is a comparison based project comparing three popular algorithms whose concepts are used in
everyday computing tasks like GPS, aircraft navigation, etc.
 These algorithms all help in finding out the shortest and the most efficient paths in a graph data structure
 This project aims in demonstrating and comparing the time complexity of:
1. Bellman ford algorithm
2. Floyd warshall algorithm
3. Johnson’s algorithm
WHY THE NEED FOR SHORTEST PATH?

 On web mapping websites like MapQuest or Google Maps, shortest path algorithms are used to
automatically find directions between physical locations, such as driving directions.
 Fast specialised algorithms are available for this application.
 A similar concept can be applied to air navigation, which is made up of a haphazard collection of
zones and waypoints which when interconnected will resemble a graph in a data structure with n
number of nodes
 Hence, core concepts from algorithms like Dijkstra’s algorithm, Bellman ford algorithm, Floyd
Warshall algorithm and Johnson’s algorithm etc are used to code the navigation software for max
efficiency.
 It saves time, money, energy, fuel and cost of operation.
BELLMAN FORD ALGORITHM

 Dynamic Programming is used in the Bellman-Ford algorithm.


 It begins with a starting vertex and calculates the distances between
other vertices that a single edge can reach.
 Initialize all vertices at distance= inf except the source vertex
 "V - 1" is used to calculate the number of relaxation times. The Bellman-
Ford algorithm uses the bottom-up approach.
 It can detect the presence of -ve cycles
Sample calculation
FLOYD WARSHALL ALGORITHM

 Each vertex is included one by one and is updated accordingly as more shorter paths are
found
 “V - 1" is used to calculate the number of iterations. Because the shortest distance to an
edge can be adjusted V - 1 time at most, the number of iterations will increase the same
number of vertices.
 After finding all possible shortest paths for the given graph the output is displayed in the
form of an adjacent matrix with the leading diagonal as 0s
 This algorithm does not apply to graphs containing –ve cycle.
Sample calculation
JOHNSON’S ALGORITHM

 It is a combination of Dijkstra and bellman ford algorithm


 It finds all the combination of distances considering every new vertex as the source vertex till all the vertices
are covered as source.
 Since bellman ford concept is also used, it makes it possible to detect the presence of negative cycle in the
graph.
How it works
COMPARSION

SHORTEST PATH ALGORITHMS TIME COMPLEXITIES

Bellman ford Algorithm O(|V|.|E|)


Floyd-Warshall Algorithm O(|V3|)

Johnson’s Algorithm O(|V^2|.log|V|+|V|.|E|)

(Dijkstra)+(Bellman Ford)
ANALYSIS ON TIME COMPLEXITY

Bellman Ford Floyd warshall Johnson algorithm


 Since we are traversing all the  Floyd Warshall Algorithm  The main steps in algorithm are
edges V-1 times, and each time consists of three loops over all Bellman Ford Algorithm called
we are traversing all the E the nodes. once and Dijkstra called V times.
vertices, therefore the time  The inner most loop consists of  Time complexity of Bellman
complexity is O(V.E).
only constant complexity Ford is O(VE) and time
 Where V and E are numbers of operations. complexity of Dijkstra is
vertices and edges respectively.  Hence, the asymptotic O(VLogV). So overall time
complexity is
complexity of Floyd Warshall
algorithm is O(V3). O(V^2log V + VE).
 Here, V is the number of
vertices in the given graph.
CONCLUSION

 We can conclude from the above outputs obtained from the execution of the codes with the same inputs that the Bellman
ford algorithm generates less time complexity than other algorithms.

 Floyd-Warshall algorithm produces a time complexity that is lower than Johnson's but higher than bellman ford’s.

 Bellman ford algorithm is more suited to dense graphs whereas johnsons algorithm is more suited to sparse and large graphs

 In comparison to other algorithms, Johnson's algorithm generates the most time complexity.

 The Bellman–Ford algorithm can detect and report the presence of negative cycles in a graph.

 If negative cycles are present, they are converted to positive edges before the programme is executed in Johnson's algorithm.
This is why it is preferred to Dijkstra's algorithm.
POSSIBLE FUTURE WORKS

 REAL TIME IMPLEMENTATION IN GPS SYSTEMS


 HI TECH AIRCRAFT NAVIGATION SYSTEMS
 OUTPUT PREDICTION PATH SYSTEMS
 CAN BE IMPLEMENTED IN A DRONE OR A ROVER FOR BETTER AND FASTER NAVIGATION
THANKYOU

You might also like