CS502-Designs and Analysis of Algorithms GDB Solution 2020-2021
Posted By:
cluesbook
Category: VU GDBs
CS502-Designs and Analysis of Algorithms GDB Solution 2020-2021
Dijkstra’s algorithm also known as SPF algorithm (Shortest Path First algorithm) is the most reasonable algorithm for the given scenario that to find the shortest distance between two points “Karachi” and “Hunza” as per the give scenario. I quote the following reasons to justify my answer.
- It is the simplest algorithm to find single shortest distance between two nodes on graph by modeling the nodes as roads on map. In our case two nodes are “Karachi” and “Hunaz”.
- It is used in Google Maps.
- The Bellman-Ford algorithm is slower than Dijkstra’s algorithm
- Floyd-Warshall algorithm is being used when there is need to compute the shortest paths among all pairs of vertices or nodes; therefore, it is not fit to the prevailing scenario.
- It only calculate the shortest path between Karchi and Hunza, and stop calculating other meanwhile Breadth-First-Search complete the computation of cycle to reach the shortest path which consume time that not fit to the given scenario.

Sharing is Caring
Facebook
Twitter
LinkedIn
Pinterest
Telegram
Telegram
WhatsApp