Match List - I with List - II.
|
List - I
|
List - II
|
|
A.
|
Dijkstra's Algorithms
|
I.
|
Find the shortest path between all pairs of vertices in a graph with positive or negative edge weights.
|
|
B.
|
Floyd-Warshall Algorithms
|
II.
|
Finds the shortest path in a weighted graph with non-negative edge weights.
|
|
C.
|
Bellman-frod Algorithms
|
III.
|
Sorts elements by repeatedly moving them post neighboring elements that are smaller.
|
|
D.
|
Prim's Algorithms
|
IV.
|
Determines the strongest connected components in a directed graph.
|
Choose the correct answer from the options given below:
1.(A) - (II), (B) - (I), (C) - (III), (D) - (IV)
2.(A) - (II), (B) - (I), (C) - (IV), (D) - (III) ✓ Correct
3.(A) - (I), (B) - (II), (C) - (III), (D) - (IV)
4.(A) - (III), (B) - (II), (C) - (IV), (D) - (I)
Solution
Solution Explanation
The correct answer is A - II, B - I, C - IV, D - III
Key Points
- Dijkstra's Algorithm:
- It is used to find the shortest path in a weighted graph with non-negative edge weights. Thus, A matches with II.
- Floyd-Warshall Algorithm:
- This algorithm finds the shortest path between all pairs of vertices in a graph with positive or negative edge weights. Thus, B matches with I.
- Bellman-Ford Algorithm:
- This algorithm is used to determine the strongest connected components in a directed graph. Thus, C matches with IV.
- Prim's Algorithm:
- This algorithm sorts elements by repeatedly moving them post neighboring elements that are smaller. Thus, D matches with III.
Therefore, the correct option is A - II, B - I, C - IV, D - III. So, the correct option is 2).