We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# CS502 Fundamentals of Algorithms GDB Fall 2019 Solution & Discussion

CS502 Fundamentals of Algorithms GDB Fall 2019 Solution & Discussion

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 588

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

### Replies to This Discussion

Share the GDB Question & Discuss Here....

gdb question

GDB Topic:

Consider that a tourist wants to travel between Karachi and Hunza cities in minimum possible span. The road map available has marked distance between each pair of adjacent cities. The time available to the tourist has limited and he/she require to find the shortest possible route between Karachi and Hunza.

In the given scenario, the possible solution may be adopted from the following set of algorithms.

• Bellman ford’s Algorithm
• Flyod Warshal’s Algorithm
• Dijkstra''s Algorithm

You are required to select the possible and most reasonable algorithm for the given scenario. Support you answer with solid reasons.

Consider that a tourist wants to travel between Karachi and Hunza cities in minimum possible span. The road map available has marked distance between each pair of adjacent cities. The time available to the tourist has limited and he/she require to find the shortest possible route between Karachi and Hunza.

In the given scenario, the possible solution may be adopted from the following set of algorithms.

• Bellman ford’sAlgorithm
• Flyod Warshal’s Algorithm
• Dijkstra''s Algorithm

You are required to select the possible and most reasonable algorithm for the given scenario. Support you answer with solid reasons. SOLUTION PLZ

solution plz

CS502 GDB 2019-2020
Dijkstra's algorithm belongs to a class of algorithms known as greedy algorithms. A greedy algorithm makes the decision that seems the most promising at a given time and then never reconsiders that decision.
In Dijkstra's algorithm time complexity is quadratic but in Floyd-Warshall algorithm it is cubic. So there is less time complexity in Dukstra's algorithm then Floyd-Warshall algorithm.
In the above-given scenario, the time availability is limited and we have to find the shortest path as soon as possible so we will use Dijkstra's Algorithm as it is possible to get an even lower time complexity by using more complicated and memory intensive internal data structures.
So Dijkstra's algorithm will be the most reasonable algorithm for the given scenario.

CS502 GDB Solution Fall 2019&-2020.
Solution:
In my point of view dijkstra''s Algorithm is the best suitable algorithm for the given scenario.
Dijkstra''s Algorithm:
Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956.
Dijkstra’s Algorithm stands out from the rest due to its ability to find the shortest path from one node to every other node within the same graph data structure.
This means, that rather than just finding the shortest path from the starting node to another specific node, the algorithm works to find the shortest path to every single reachable node – provided the graph doesn’t change.
For example, if you want to go from A to B in the shortest way possible, but you know that some roads are heavily congested, blocked, undergoing works, and so on, when using Dijkstra, the algorithm will find the shortest path while avoiding any edges with larger weights, thereby finding you the shortest route.

## Latest Activity

35 minutes ago
41 minutes ago
Tayyaba Ahmad. joined + M.Tariq Malik's group

### ENG502 Introduction to Linguistics

53 minutes ago
55 minutes ago
Tayyaba Ahmad. joined + M.Tariq Malik's group

1 hour ago

1 hour ago
1 hour ago
1 hour ago
1 hour ago
1 hour ago
1 hour ago
1 hour ago

1

2

3