Programming, Data Structures and Algorithms using Python, Quiz 2
Which of the following statements is true about Dijkstra's algorithm to find the shortest path?
Which of the following statements is true about Dijkstra's algorithm to find the shortest path? Let G = (V, E) be an undirected graph having distinct positive edge weights. Let V be partitioned into two non-empty sets X and Y. Let e = (s, t) be the minimum cost edge, with s belonging to X and t belonging to Y. Which of the following statement(s) is/are true? 1. The edge e must belong to each path from s to t. 2. The edge e must belong to the minimum cost spanning tree of G. Which of the following statements about the Floyd-Warshall algorithm is correct?