Welcome to Westonci.ca, your ultimate destination for finding answers to a wide range of questions from experts. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

You are given a graph G = (V, E) with positive edge weights, and a minimum spanning tree T = (V, E’) with respect to these weights; you may assume G and T are given as adjacency lists. Now suppose the weight of a particular edge e ∈ E is modified from w(e) to a new value ŵ(e). You wish to quickly update the minimum spanning tree T to reflect this change, without recomputing the entire tree from scratch. There are four cases. In each case give a linear-time algorithm for updating the tree.
(a) e ∉ E’ and ŵ(e) > w(e).
(b) e ∉ E' and ŵ (e) < w(e).
(c) e ∈ E' and ŵ (e) < w(e).
(d) e ∈ E' and ŵ (e) > w (e)


Sagot :

C vraiment très facile
Si tu a besoin d’aide recontacter moi