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 e € E is modified from w(e) to a new value 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 E' and wŵ(e) > w(e). (b) e E' and w(e) < w(e). (c) e E E' and w(e) < w(e). (d) e E' and wŵ(e) > w(e).
Note, you are given the tree T and the edge e = (y, z) whose weight is changed; you are told its old weight w(e) and its new weight w~(e) (which you type in latex by widetilde{w}(e) surrounded by double dollar signs).
In each case specify if the tree might change. And if it might change then give an
Part (a): e ∉ T and w~(e) > w(e):
[Blank space for the answer]
Part (b): e ∉ T and w~(e) < w(e):
[Blank space for the answer]
Part (c): e ∈ T and w~(e) < w(e):
[Blank space for the answer]
Part (d): e ∈ T and w~(e) > w(e):
[Blank space for the answer]
![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 w(e) (which you type in latex by \widehat{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 T and ŵ(e) > w(e):
Part (b): e T and w(e) < w(e):
Part (c): e E T and w(e) < w(e):
Part (d): e € T and ŵ(e) > w(e):](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F05295cc1-71f0-4e3b-b6f8-2c1731c6d617%2Fe785dc73-6974-4bc1-a557-c01c715e3b43%2F7768dw_processed.png&w=3840&q=75)
![=
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 e ← E is modified from w(e) to a new value 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
E' and w(e) > w(e).
(b) e
E' and w(e) < w(e).
(c) e € E' and w(e) < w(e).
(d) e € E' and w(e) > w(e).](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F05295cc1-71f0-4e3b-b6f8-2c1731c6d617%2Fe785dc73-6974-4bc1-a557-c01c715e3b43%2Fao648sl_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)