Question: Description Dijkstra's algorithm is to find and to store shortest paths in a kind of rooted spanning tree. We can denote the result by its

Description
Dijkstra's algorithm is to find and to store shortest paths in a kind of rooted spanning tree. We can denote the result by its edges set T subeE. In Dijkstra's algorithm, we divide vertices to 2 groups, visited group V' and unvisited group U.
If we want to move a vertex viinU to V', we should apply our operation by a bridge edge eb=(sb,vi,wb)inE and sbinV'.
V'larr{s},UlarrV??V',Tlarr{(s,s,0)}.
Find the minimum bridge edge eb between V' and U.
Find bridged node erinT that tr=sb with minimal wb+wr.
4 Make an edge eb'=(sb,tb,wb+wr).
Update information V'larrV'U{tb},U=U??{tb},TlarrT{eb',}.
Repeat step 2 to step 5 until U=O?.
Questions
1 Analyze the time complexity when implement step 2 by sequential searching whole adjacency list.
2 Analyze the time complexity when implement step 2 by a priority queue that maintained the bridge edges.
2.1 Implement the priority queue by double-linked list.
2.2 Implement the priority queue by Min-heap.
3 Design an algorithm to reconstruct the path from spanning tree T(the result).
4 How to find the unreachable (have no path from s) set?
Can you describe the answers. And please use cpp programs for the implementations of the algorithms
 Description Dijkstra's algorithm is to find and to store shortest paths

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!