Question: 5 . 2 2 . You are given a graph G = ( V , E ) with positive edge Note, you are given the

5.22. You are given a graph G=(V,E) with positive edge Note, you are given the tree T and the edge e=(y,z) whose weight is changed; you are told it's
old weight w(e) and it's new weight widehat(w)(e)(which you type in latex by Iwidehat {w}(e) surrounded by
double dollar signs).
In each case specify if the tree might change. And if it might change then give an algorithm to find
the weight of the possibly new MST (just return the weight or the MST, whatever's easier). You can
use the algorithms from class (DFS, Explore, BFS, Dijkstra's, SCC, Topological Sort) as black-box
algorithms if you'd like. Explain your algorithm in words. Note the running time of your algorithm
in terms of n and m.
Part (a): e!inT and widehat(w)(e)>w(e) :weights, and a minimum spanning tree5.22. 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 einE is modified from w(e) to a new value hat(w)(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!inE' and hat(w)(e)>w(e).
(b)e!inE' and hat(w)(e)
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 einE is modified from w(e) to a new value hat(w)(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!inE' and hat(w)(e)>w(e).
(b)e!inE' and einE'einE'hat(w)(e)>w(e)hat(w)(e).
(d)einE' and hat(w)(e)>w(e).hat(w)(e).
(c)einE' and hat(w)(e).
(d)einE' and hat(w)(e)>w(e).5.22. 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 einE is modified from w(e) to a new value hat(w)(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!inE' and hat(w)(e)>w(e).
(b)e!inE' and einE'einE'hat(w)(e)>w(e)hat(w)(e).
(d)einE' and hat(w)(e)>w(e).hat(w)(e).
(c)einE' and hat(w)(e).
(d)einE' and hat(w)(e)>w(e).Note, you are given the tree T and the edge e=(y,z) whose weight is changed; you are told it's
old weight w(e) and it's new weight widehat(w)(e)(which you type in latex by Iwidehat {w}(e) surrounded by
double dollar signs).
In each case specify if the tree might change. And if it might change then give an algorithm to find
the weight of the possibly new MST (just return the weight or the MST, whatever's easier). You can
use the algorithms from class (DFS, Explore, BFS, Dijkstra's, SCC, Topological Sort) as black-box
algorithms if you'd like. Explain your algorithm in words. Note the running time of your algorithm
in terms of n and m.
Part (a): e!inT and widehat(w)(e)>w(e) :
 5.22. You are given a graph G=(V,E) with positive edge Note,

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!