Topic: Algorithms
Match the following:
(A) Floyd Warshall (i) shortest path between two vertices
(B) Dijkstra (ii) single source shortest path
(C) Kruskal's (iii) Minimum spanning tree
(D) Bellman ford (iv) solving all pair shortest path
- A. (A)-(iii), (B)-(ii), (C)-(iv), (D)-(i)
- B. (A)-(iv), (B)-(i), (C)-(iii), (D)-(ii)
- C. (A)-(i), (B)-(ii), (C)-(iii), (D)-(iv)
- D. (A)-(ii), (B)-(iii), (C)-(i), (D)-(iv)
Answer: B. (A)-(iv), (B)-(i), (C)-(iii), (D)-(ii)
Explanation: Floyd Warshall is an algorithm for finding all pair shortest paths (iv). Dijkstra is commonly used to find the shortest path from one node to all others or just between two vertices (i). Kruskal's is for Minimum spanning tree (iii). Bellman-Ford is for single source shortest paths, particularly with negative weights (ii).