Match List I with List II. List I: (a) Prim's algorithm, (b) Dijkstra's algorithm, (c) Faster all-pairs shortest path, (d) Edmonds-Karp algorithm. List II: (i) O(V³ lg V), (ii) O(VE²), (iii) O(E lg V), (iv) O(V²).
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. (a)-(iii); (b)-(iv); (c)-(i); (d)-(ii)
Explanation
Prim (binary heap) is O(E lg V); Dijkstra with an array is O(V²); repeated-squaring all-pairs is O(V³ lg V); Edmonds–Karp is O(VE²).
More Data Structures and Algorithms questions
- There are many sorting algorithms based on comparison. The running time of heapsort O(n lg n) P Q algorithm is . Like , but unlike , (P, Q)…
- Which of the following is best running time to n n2 − 1 sort integers in the range 0 to ?
- Which of the following is application of depth- first search?
- Consider double hashing of the form h(k, i) = (h (k) + ih (k)) mod m 1 2 h (k) = k mod m where 1 h (k) = 1 + (k mod n) 2 n = m − 1 m = 701…
- Consider the complexity class as the ¯¯¯ L ∈ NP set of languages L such that , and the following two statements : S : P ⊆ CO − NP 1 S NP ≠…
- Consider the following steps : S 1 : Characterize the structure of an optimal solution S 2 : Compute the value of an optimal solution in bo…