Question: [C++]Using a min-heap and priority queue, write Dijkstras Shortest Path Algorithm on the Adjacency Matrix using the source and target vertex. Adjacency Matrix: 0 8

[C++]Using a min-heap and priority queue, write Dijkstras Shortest Path Algorithm on the Adjacency Matrix using the source and target vertex.

Adjacency Matrix:

0 8 2 5 0 0 0 0 8 0 0 2 0 13 0 0 2 0 0 2 5 0 0 0 5 2 2 0 1 6 3 0 0 0 5 1 0 0 1 0 0 13 0 6 0 0 2 3 0 0 0 3 1 2 0 6 0 0 0 0 0 3 6 0

Input/Output Format: Please enter location of graph file to load: graph_1_win.txt Please enter the index of the starting vertex: 0 Please enter the index of the target vertex: 7 The shortest path from vertex 0 to vertex 7 is: 0 to 2: 2 2 to 3: 2 3 to 4: 1 4 to 6: 1 6 to 5: 2 5 to 7: 3 Total path length is 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!