Kruskal’s algorithm for finding a minimum spanning tree of a weighted graph with vertices and edges has the time complexity of:
View worked solution
Answer: B;D;E
The standard time complexity of Kruskal’s algorithm for a graph with vertices and edges is dominated by the step of sorting the edges:
- Sorting edges takes time.
- Since , we have , which means .
- The disjoint-set operations (using union by rank and path compression) take time, which is strictly dominated by the sorting step.
Thus, the tightest upper bound for Kruskal's algorithm is (Option D).
By the definition of Big-O notation ( represents an asymptotic upper bound):
- Option D (): This is the standard tight upper bound.
- Option B (): Since for all , we have . Therefore, is also a valid upper bound.
- Option E (): For any connected graph, , which implies . Thus, , making a valid upper bound as well.
Hence, options B, D, and E are all mathematically correct upper bounds.
Free practice · Your answers on this page are not saved.
