Docsity

Homework 10 for CMPSC 465, Spring 2009: Maximum Capacity Path in Network Flows, Assignments of Computer Science

Toggle sidebar
bg1
CMPSC 465, Spring 2009, Homework 10
Due: Saturday,April 27, 1 pm. slide under the door of IST 346H, between 7 pm Friday
and 1 pm Saturday theywill be box in front of IST 337.
Anetwork flowinstance is a graph (V,E)with twospecial nodes r,s∈Vand non-neg-
ative edge capacities, uij and uji for each (i,j)∈E.
Problem 1. Givenisanetwork flowinstance. A min-capacity of a path (i0,i1,...,ik)is
k
j=1
min uij−1ij.Describe an efficient algorithm, similar to Dijkstra’sthat finds a path from rto
swith the maximum min-capacity.
Youcan use a pseudocode from Lecture 30, but you need three changes: (1) The
algorithm should return "NO PATH" if there is no path from rto s,(2) it should return
min-capacity and a list of nodes on such a path if it does exists, (3) of course, a small
change is needed so you compute a min-capacity path rather than a shortest path.
Problem 2. Showanexample of a network flowinstance such that after
(a) finding an augmenting path from rto swith the maximum min-capacity,
(b) changing the capacities according to the flowsent on that augmenting path,
(c) finding again an augmenting path from rto swith the maximum min-capacity,
the path found in (c) has a larger min-capacity than the path found in (a).
Problem 3. We consider a network flowinstance and shortest augmenting paths, i.e.
paths from rto swith positive min-capacity and the minimum number of edges, say k.
a. Suppose that (i,j)isanedge on a shortest augmenting path and uji =0. Showthat
ev enifweincrease uji to a positive value, (j,i)cannot belong to an augmenting
path of length kor less.
b. Showhow tofind all edges that belong to shortest augmenting paths in time O(|E|).
c. Assume that all positive capacities are equal to 1. Showhow intime O(|E|) one can
find shortest augmenting paths P1,P2, ...such that after changing capacities accord-
ing to the flowsent through these paths there is no augmenting path of length kor
less. (Perhaps it would be simpler to say that in time O(|E|) you should find a maxi-
mal set of shortest augmenting paths.)
d. Use the result of c. to showthat givenaninstance (V,E)ofabipartite matching
problem in time O(√ 
|V||E|) we can find a matching Msuch that the shortest aug-
menting path for Mhas at least √ 
|V|edges.
e. If M*is a maximum matching, and for matching Mthere are no augmenting paths
with less that √ 
|V|edges, then |M*|−|M|<√ 
|V|. Use this implication, and the result
of d. to showthat a maximum matching in a bipartite graph can be found in time
O(√ 
|V||E|).
pf2

Partial preview of the text

Download Homework 10 for CMPSC 465, Spring 2009: Maximum Capacity Path in Network Flows and more Assignments Computer Science in PDF only on Docsity!

CMPSC 465, Spring 2009, Homework 10

Due: Saturday, April 27, 1 pm. slide under the door of IST 346H, between 7 pm Friday and 1 pm Saturday they will be box in front of IST 337.

A network flow instance is a graph ( V , E ) with two special nodes r , s ∈ V and non-neg- ative edge capacities, uij and u (^) ji for each ( i , j )∈ E.

Problem 1. Given is a network flow instance. A min-capacity of a path ( i 0 , i 1 ,... , ik ) is k j = 1

min ui (^) j − 1 i (^) j. Describe an efficient algorithm, similar to Dijkstra’s that finds a path from r to

s with the maximum min-capacity.

You can use a pseudocode from Lecture 30, but you need three changes: (1) The algorithm should return "NO PATH" if there is no path from r to s , (2) it should return min-capacity and a list of nodes on such a path if it does exists, (3) of course, a small change is needed so you compute a min-capacity path rather than a shortest path.

Problem 2. Show an example of a network flow instance such that after

(a) finding an augmenting path from r to s with the maximum min-capacity,

(b) changing the capacities according to the flow sent on that augmenting path,

(c) finding again an augmenting path from r to s with the maximum min-capacity,

the path found in (c) has a larger min-capacity than the path found in (a).

Problem 3. We consider a network flow instance and shortest augmenting paths, i.e. paths from r to s with positive min-capacity and the minimum number of edges, say k.

a. Suppose that ( i , j ) is an edge on a shortest augmenting path and u (^) ji = 0. Show that even if we increase u (^) ji to a positive value, ( j , i ) cannot belong to an augmenting path of length k or less.

b. Show how to find all edges that belong to shortest augmenting paths in time O (| E |).

c. Assume that all positive capacities are equal to 1. Show how in time O (| E |) one can find shortest augmenting paths P 1 , P 2,... such that after changing capacities accord- ing to the flow sent through these paths there is no augmenting path of length k or less. (Perhaps it would be simpler to say that in time O (| E |) you should find a maxi- mal set of shortest augmenting paths.)

d. Use the result of c. to show that given an instance ( V , E ) of a bipartite matching

problem in time O (√| V || E |) we can find a matching M such that the shortest aug- menting path for M has at least √| V | edges.

e. If M *^ is a maximum matching, and for matching M there are no augmenting paths

with less that √| V | edges, then | M *| − | M | < √| V |. Use this implication, and the result of d. to show that a maximum matching in a bipartite graph can be found in time O (√| V || E |).

Problem 4. Find a maximum matching and a minimum cover in the bipartite graph below.

a b c d e f g h i j

A B C D E F G H I J

Problem 5. In a tournament n players, 1,... , n , play each other once, and there are no ties. Let wi be the number of wins of player i. Describe and analyze an algorithm that determines if a vector ( w 1 ,... , wn ) is a possible outcome of such a tournament. The algorithm should run in time that is polynomial in n.