Question 280 – Operating-Systems
April 10, 2024Question 11591 – Databases
April 11, 2024Question 11775 – Greedy-approach
In which order the edges of the given graph are chosen while constructing the minimum spanning tree using prim’s algorithm?
Correct Answer: A
Question 2 Explanation:
The Prim’s algorithm operates by building this tree one vertex at a time, from an arbitrary starting vertex, at each step adding the cheapest possible connection from the tree to another vertex.
B cant be the answer because after edge (1,6) is considered then (3,4) cant be taken because vertex 3 or 4 is not connected directly to the tree having edge (1,6).
C cant be the answer. Same reason as B.
D cant be the answer because after edge (3,2) is considered then next cheapest edge is (2,7) and not (4,7).
B cant be the answer because after edge (1,6) is considered then (3,4) cant be taken because vertex 3 or 4 is not connected directly to the tree having edge (1,6).
C cant be the answer. Same reason as B.
D cant be the answer because after edge (3,2) is considered then next cheapest edge is (2,7) and not (4,7).
(1, 6), (6, 5), (5, 4), (4, 3), (3, 2), (2, 7)
(1, 6), (3, 4), (2, 7), (2, 3), (7, 4), (5, 4)
(1, 6), (3, 4), (2, 7), (4, 5), (1, 2), (5, 6)
(1, 6), (6, 5), (5, 4), (4, 3), (3, 2), (4, 7)
Subscribe
Login
0 Comments