Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3. (20 points) You are given an undirected graph G = (V, E) with positive weights, and a minimum spanning tree T = (V,E')

image text in transcribed

Problem 3. (20 points) 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 G are modified from w(e) to u'(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. VeE E. update w,(e) = w(e) + C where C is a positive constant 2. Ve e E, update u'(e) - w(e) - C where C is a positive constant 3. for a single edge e E', update u'(e) = w(e) + C where C is a positive constant 4, for a single edge E', update w,(e)-w(e)-C where C is a positive constant 5. for a single edge e E. update w'(e) = w(e)-C where C is a positive constant 6, for a single edge e E E. update w,(e) = w(e) + C where C is a positive constant Problem 3. (20 points) 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 G are modified from w(e) to u'(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. VeE E. update w,(e) = w(e) + C where C is a positive constant 2. Ve e E, update u'(e) - w(e) - C where C is a positive constant 3. for a single edge e E', update u'(e) = w(e) + C where C is a positive constant 4, for a single edge E', update w,(e)-w(e)-C where C is a positive constant 5. for a single edge e E. update w'(e) = w(e)-C where C is a positive constant 6, for a single edge e 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

Absence of disparate impact

Answered: 1 week ago