hw8 - round A to an integer matrix, by replacing each entry...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 473 Homework 8 (due April 20, 2010) Spring 2010 CS 473: Undergraduate Algorithms, Spring 2010 Homework 8 Written solutions due Tuesday, April 20, 2010 in class. 1. Suppose you have already computed a maximum ( s , t ) -flow f in a flow network G with integer capacities. Let k be an arbitrary positive integer, and let e be an arbitrary edge in G whose capacity is at least k . (a) Suppose we increase the capacity of e by k units. Describe and analyze an algorithm to update the maximum flow. (b) Now suppose we decrease the capacity of e by k units. Describe and analyze an algorithm to update the maximum flow. For full credit, both algorithms should run in O ( Ek ) time. [Hint: First consider the case k = 1 .] 2. Suppose we are given an array A [ 1.. m ][ 1.. n ] of non-negative real numbers. We want to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: round A to an integer matrix, by replacing each entry x in A with either b x c or d x e , without changing the sum of entries in any row or column of A . For example: 1.2 3.4 2.4 3.9 4.0 2.1 7.9 1.6 0.5 7- 1 4 2 4 4 2 8 1 1 Describe an efcient algorithm that either rounds A in this fashion, or reports correctly that no such rounding is possible. 3. A cycle cover of a given directed graph G = ( V , E ) is a set of vertex-disjoint cycles that cover all the vertices. Describe and analyze an efcient algorithm to nd a cycle cover for a given graph, or correctly report that none exists. [ Hint: Use ipartite atching! ] 1...
View Full Document

Ask a homework question - tutors are online