Question

MST For an undirected graph G = (V, E) with weights w(e) > 0 for each edge e ∈ E, you are given a MST T. Unfortunately one of the edges e* = (u, z) which is in the MST T is deleted from the graph G...

MST

For an undirected graph G = (V, E) with weights w(e) > 0 for each edge e ∈ E, you are given a MST T. Unfortunately one of the edges e* = (u, z) which is in the MST T is deleted from the graph G (no other edges change). Give an algorithm to build a MST for the new graph. Your algorithm should start from T.

Note: G is connected, and G − e* is also connected.

Explain your algorithm in words and use the algorithms from class as black-box subroutines.

Clearly state and explain the running time of your algorithm. To receive credit, your algorithm should be correct and faster in O() than building a MST from scratch (so don’t use Prim’s or Kruskal’s, even part of Kruskal’s).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

As the edge e*(u,z) has been deleted, let Tu, Tz be the sub tree of T after deletion of e*.

Now, we can find the set of vertices in Tu and Tv in O(|V|+|E|) time.

Then, find set of edges with one end point in Tu and another end point in Tz, find the edge with smallest weight among those, add that edge(say e) to the MST, this is the modified MST after deletion of e*.

Finding smallest weight edge also takes O(|E|) time, so overall complexity of our algorithm is O(|V|+|E|).

Add a comment
Know the answer?
Add Answer to:
MST For an undirected graph G = (V, E) with weights w(e) > 0 for each edge e ∈ E, you are given a MST T. Unfortunately one of the edges e* = (u, z) which is in the MST T is deleted from the graph G...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You are given an undirected graph G = (V, E) with positive weights on the edges....

    You are given an undirected graph G = (V, E) with positive weights on the edges. If the edge weights are distinct, then there is only one MST, so both Prim’s and Kruskal’s algorithms will find the same MST. If some of the edge weights are the same, then there can be several MSTs and the two algorithms could find different MSTs. Describe a method that forces Prim’s algorithm to find the same MST of G that Kruskal’s algorithm finds.

  • You are given an undirected graph G with weighted edges and a minimum spanning tree T of G.

    You are given an undirected graph G with weighted edges and a minimum spanning tree T of G. Design an algorithm to update the minimum spanning tree when the weight of a single edge is increased. The input to your algorithm should be the edge e and its new weight: your algorithm should modify T so that it is still a MST. Analyze the running time of your algorithm and prove its correctness.

  • You are given an undirected graph G with weighted edges and a minimum spanning tree T of G.

    You are given an undirected graph G with weighted edges and a minimum spanning tree T of G. Design an algorithm to update the minimum spanning tree when the weight of a single edge is decreased. The input to your algorithm should be the edge e and its new weight; your algorithm should modify T so that it is still a MST. Analyze the running time of your algorithm and prove its correctness.

  • 2. Let G = (V, E) be an undirected connected graph with n vertices and with...

    2. Let G = (V, E) be an undirected connected graph with n vertices and with an edge-weight function w : E → Z. An edge (u, v) ∈ E is sparkling if it is contained in some minimum spanning tree (MST) of G. The computational problem is to return the set of all sparkling edges in E. Describe an efficient algorithm for this computational problem. You do not need to use pseudocode. What is the asymptotic time complexity of...

  • Let G=(V, E) be a connected graph with a weight w(e) associated with each edge e....

    Let G=(V, E) be a connected graph with a weight w(e) associated with each edge e. Suppose G has n vertices and m edges. Let E’ be a given subset of the edges of E such that the edges of E’ do not form a cycle. (E’ is given as part of input.) Design an O(mlogn) time algorithm for finding a minimum spanning tree of G induced by E’. Prove that your algorithm indeed runs in O(mlogn) time. A minimum...

  • Let G = (V. E) be an undirected, connected graph with weight function w : E → R

    Problem 4 Let G = (V. E) be an undirected, connected graph with weight function w : E → R. Furthermore, suppose that E 2 |V and that all edge weights are distinct. Prove that the MST of G is unique (that is, that there is only one minimum spanning tree of G).

  • IN JAVA Given is a weighted undirected graph G = (V, E) with positive weights and...

    IN JAVA Given is a weighted undirected graph G = (V, E) with positive weights and a subset of its edges F E. ⊆ E. An F-containing spanning tree of G is a spanning tree that contains all edges from F (there might be other edges as well). Give an algorithm that finds the cost of the minimum-cost F-containing spanning tree of G and runs in time O(m log n) or O(n2). Input: The first line of the text file...

  • Let G = (V, E, W) be a connected weighted graph where each edge e has...

    Let G = (V, E, W) be a connected weighted graph where each edge e has an associated non-negative weight w(e). We call a subset of edges F subset of E unseparating if the graph G' = (V, E\F) is connected. This means that if you remove all of the edges F from the original edge set, this new graph is still connected. For a set of edges E' subset of E the weight of the set is just the...

  • Updating an MST when an edge weight changes. You have a graph G= (V, E) with...

    Updating an MST when an edge weight changes. You have a graph G= (V, E) with edge weights given in the graph (whatever they are). In addition, a minimum spanning tree T= (V, E′) of this graph has also been given to you. Now, say we need to increase the weight of one particular edge e. Does the MST change? If so, show how to compute the new MST in linear time. You should consider two cases: 1). when e∈E′and...

  • Problem 6 (20 points). Let G- (V,E) be a directed Let E' be another set of edges on V with edge l...

    Problem 6 (20 points). Let G- (V,E) be a directed Let E' be another set of edges on V with edge length '(e) >0 for any e EE. Let s,t EV. Design an algorithm runs in O(lV+ E) time to find an edge e'e E' whose addition to G will result in the maximum decrease of the distance from s to t. Explain why your algorithms runs in O(V2+E') time. graph with edge length l(e) >0 for any e E...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT