ex3 - CSE5311 Design and Analysis of Algorithms Exercise...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE5311 Design and Analysis of Algorithms Exercise Problems 3 1. Let G = (V,E) be an (undirected) graph with costs c e 0 on the edges e E . Assume you are given a minimum-cost spanning tree T in G . Now assume that a new edge is added to G , connecting two nodes v, w V with cost c . a. Give an efficient algorithm to test if T remains the minimum-cost spanning tree with the new edge added to G (but not to the tree T ). Make your algorithm run in time O ( E ). Can you do it in O( V ) time? b. Suppose T is no longer the minimum-cost spanning tree. Give a linear- time algorithm (time O ( E )) to update the tree T to the new minimum- cost spanning tree. 2. Let G = ( V , E ) be a connected undirected weighted graph. Assume for simplicity that the weights are positive and distinct. Let e be an edge of G . Denote by T ( e ) the spanning tree of G that has minimum cost among all spanning trees of G that contains e . Design an algorithm to find T ( e ) for all edges
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/18/2009.

Page1 / 2

ex3 - CSE5311 Design and Analysis of Algorithms Exercise...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online