{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw4 - Homework 4 Due Thursday 2/18 before 10:30 CSE 450/598...

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

Homework 4 CSE 450/598 Spring 2010 Arizona State University Due: Thursday 2/18 before 10:30 1. (4.10) Let G = ( V , E ) be an undirected graph with a nonnegative edge cost function c . 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 and w 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 . Make your algorithm run in time O ( | E | ) . Can you do it in O ( | V | ) time? Please note any assumptions you make about what dada structure is used to represent the tree T and the graph G . (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. (4.17) Consider the following variation on the Interval Scheduling Problem. You have a processor that can operate 24 hours a day, every day. People submit requests to run daily jobs on the processor. Each such job comes with a start time and an end time . If the job is accepted to run on the processor, it must run continuously, every day, for the perod between its start and end times. (Note that certain jobs can begin before midnight and

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}