152k views
5 votes
Is there a linear time algorithm to find the minimum spanning tree (MST) of a connected, undirected, weighted graph g=(v,e)?

1) Yes
2) No

User Setevoy
by
7.7k points

1 Answer

4 votes

Final answer:

No, there isn't a linear time algorithm to find the minimum spanning tree for a graph; existing algorithms like Kruskal's and Prim's have super-linear time complexities.

Step-by-step explanation:

The question is asking whether there is a linear time algorithm to find the minimum spanning tree (MST) of a connected, undirected, weighted graph g=(v,e). The answer is No. While there are efficient algorithms to find the MST of a graph, such as Kruskal's algorithm and Prim's algorithm, these are not linear time algorithms. Kruskal's algorithm has a time complexity of O(e log e) when using a Disjoint Set Union (DSU) data structure, and Prim's has a time complexity of O(v^2) with a simple binary heap or O(e + v log v) with a Fibonacci heap. Both of these complexities are super-linear because they include logarithmic or quadratic factors.

User Ashish Kamble
by
8.4k points