Question: Give an O( m log n ) algorithm to determine if a given minimum spanning tree is unique. The inputs to your algorithm are n

Give an O(m log n) algorithm to determine if a given minimum spanning tree is unique. The inputs to your algorithm are

  • n, the number of vertices in the graph (the vertices are then numbered 0,,n1);
  • the set of edges in the graph and their weights, as an adjacency list or adjacency matrix (specify which one you are using);
  • a subset T of the edges that forms a minimum spanning tree, using the same data structure as the complete set of edges.

You may assume that 1) if the given T is not the unique minimum spanning tree then there is another minimum spanning tree T' that differs from it by one edge; and 2) you can determine the edge of maximum weight (and its weight) on the simple path between any two vertices using edges in T in O(log n) time. Compute the overall asymptotic running time of your algorithm in terms of n (the number of vertices) and m (the number of edges) and explain your result. You need not prove that your algorithm is correct.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!