Menu

(Solved) : 171 Question Iii Consider Dijkstra S Algorithm Solving Single Source Shortest Path Problem Q33115889 . . .

171 Question III Consider Dijkstras algorithm for solving the single source shortest path problem: Algorithm 8.1 DIJKSTRA Input: A weighted directed graph G (V,E), where V { 1,2, Output: The distance from vertex 1 to every other vertex in G , n} 2. for y← 2 to n 3.if y is adjacent to 1 then Xly]- length[1, y] end if 6. end for 7. for j-1 to n- 1 8. Let y E Y be such that Xly] is minimum (add vertex y to X) (delete vertex y from Y] 11, for each edge (y,u) 12 13 14 15. end for if w e y and λ[y] + lengthly, w] < 시삐 then end for Find the number of element comparisons upon executing Line 13 in the whole algorithm, assuming that it uses a min-heap data structure for keeping track ofA[yl, the current shortest distance from Vertex 1 to Vertex y. Clearly justify your answer. Note that the number is not equal to zero!

171 Question III Consider Dijkstra’s algorithm for solving the single source shortest path problem: Algorithm 8.1 DIJKSTRA Input: A weighted directed graph G (V,E), where V { 1,2, Output: The distance from vertex 1 to every other vertex in G , n} 2. for y← 2 to n 3.if y is adjacent to 1 then Xly]- length[1, y] end if 6. end for 7. for j-1 to n- 1 8. Let y E Y be such that Xly] is minimum (add vertex y to X) (delete vertex y from Y] 11, for each edge (y,u) 12 13 14 15. end for if w e y and λ[y] + lengthly, w] < 시삐 then end for Find the number of element comparisons upon executing Line 13 in the whole algorithm, assuming that it uses a min-heap data structure for keeping track ofA[yl, the current shortest distance from Vertex 1 to Vertex y. Clearly justify your answer. Note that the number is not equal to zero! Show transcribed image text

Expert Answer


Answer to 171 Question Iii Consider Dijkstra S Algorithm Solving Single Source Shortest Path Problem Q33115889 . . .

OR