Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are given an undirected graph G = (V,E) with positive weights, and a minimum spanning tree T = (V, E') for G; you might
You are given an undirected graph G = (V,E) with positive weights, and a minimum spanning tree T = (V, E') for G; you might assume that G and T are given to you as adjacency lists. Now suppose that edges weights in , are modified from w(e) to w'(e). You wish to quickly update the minimum spanning tree T to reflect these changes, without recomputing the tree from scratch. Consider the following six distinct scenarios for updates: for each give a O(n+ m)-time algorithm to update the MST 1. Ve E E, update u'(e) w(e)C where C is a positive constant 2. Ve E E, update u'(e)-(e)- C where C' is a positive constant 3. for a single edge e E, update w,(e)-w(e) + C where C is a positive constant 4. for a single edge e E: update w,(e)-w(e)-C where C is a positive constant 5. for a single edge e E E', update w,(e) = w(e)-C where C is a positive constant 6, for a single edge e E', update w,(e) = w(e) + C where C is a positive constant
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started