04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

448<br />

Chapter 7 Network Flow<br />

51.<br />

The machines run at different speeds, but jobs are identical in their<br />

processing need.s. More formally, each machine i has a parameter e~, and<br />

each job requ~es e~ time ff assigned to machine i.<br />

There are n jobs. Jobs have identical processing needs but different<br />

levels of urgency. For each job j, we are given a cost function q(t) that<br />

is the cost of completing job ] at time t. We assume that the costs are<br />

nonnegative, and monotone in t.<br />

A schedule consists of an assignment of jobs to machines, and on<br />

each machine the schedule gives the order in which the jobs are done.<br />

The job assigned to machine i as the first job will complete at time<br />

the second job at time 2eg and so on. For a schedule S, let ts(J) denoke<br />

the completion time of job j in this schedule. The cost of the schedule is<br />

cost(S) = ~j q(ts(~)).<br />

Give a polynomial-time algorithm to find a schedule of minimum cost.<br />

Some friends of yours have grown tired of the game "SLx Degrees of Kevin<br />

Bacon" (after a11, they ask, isn’t it just breadth-first search?) and decide to<br />

invent a game with a little more punch, algorithmically speaking. Here’s<br />

how it works.<br />

You start with a set X of n actresses and a set Y of n actors, and two<br />

players P0 and P1. Player P0 names an actress xl ~ X, player P1 names an<br />

actor Yl who has appeared in a movie with xl, player P0 names an actress x2<br />

who has appeared in a movie with yl, and so on. Thus, P0 and P1 collectively<br />

generate a sequence x~, y~, xz, Yz .... such that each actor/actress in the<br />

sequence has costarred with the actress/actor immediately preceding. A<br />

player P~ (~ = 0, 1) loses when it is P~’s turn to move, and he/she cannot<br />

name a member of his/her set who hasn’t been named before.<br />

Suppose you are given a specific pair of such sets X antl Y, with<br />

complete information on who has appeared in a movie with whom. A strategy<br />

for Pg, in our setting, is an algorithm that takes a current sequence<br />

x~, y~, x2, Yz .... and generates a legal next move for P~ (assuming it’s P~’s<br />

turn to move). Give a polynomial-time algorithm that decides which of<br />

the two players can force a win, in a particular instance of this game.<br />

Notes and Further Reading .----<br />

Network flow emerged as a cohesive subject through the work of Ford and<br />

Fulkerson (1962). It is now a field of research in itself, and one can easily<br />

Notes and Fun_her Reading<br />

devote an entire course to the topic; see, for example, the survey by Goldberg,<br />

Tardos, and Tarian (1990) and the book by Ahuja, Magnanti, and Orlin (1993).<br />

Schrijver (2002) provides an interesting historical account of the early<br />

work by Ford and Fulkerson on the flow problem. Lending further support<br />

to those of us who always felt that the Minimum-Cut Problem had a slightly<br />

destructive overtone, this survey cites a recently declassified U.S. Air Force<br />

report to show that in the original motivating application for minimum cuts,<br />

the network was a map of rail lines in the Soviet Union, and the goal Was to<br />

disrupt transportation through it.<br />

As we mention in the text, the formulations of the Bipartite MatChing<br />

and Disjoint Paths Problems predate the Maximum-Flow Problem by several<br />

decades; it was through the development of network flows that these were all<br />

placed on a common methodological footing. The rich structure of matchings<br />

in bipartite graphs has many independent discoverers; P. Hall (1935) and<br />

K6nig (1916) are perhaps the most frequently cited. The problem of finding<br />

edge-disjoint paths from a source to a sink is equivalent to the Maximum-<br />

Flow Problem with all capacities equal to 1; this special case was solved (in<br />

essentially equivalent form) by Menger (1927).<br />

The Preflow-Push Maximum-Flow <strong>Algorithm</strong> is due to Goldberg (1986),<br />

and its efficient implementation is due to Goldberg and Tarjan (1986). Highperformance<br />

code for this and other network flow algorithms can be found at<br />

a Web site maintained by Andrew Goldberg.<br />

The algorithm for image segmentation using minimum cuts is due to<br />

Greig, Porteous, and Seheult (!989), and the use of minimum cuts has become<br />

an active theme in computer vision research (see, e.g., Veksler (1999)<br />

and Kolmogorov and Zabih (2004) for overviews); we will discuss some further<br />

extensions of this approach in Chapter 12. Wayne (2001) presents further<br />

results on baseball elimination and credits Alan Hoffman with initially popularizing<br />

this example in the 1960s. Many further applications of network flows<br />

and cuts are discussed in the book by Ahuja, Magnanti, and Orlin (1993).<br />

The problem of finding a minimum-cost perfect matching is a special case<br />

of the Minimum-Cost Flow Problem, which is beyond the scope of our coverage<br />

here. There are a number of equivalent ways to state the Minimum-Cost Flow<br />

Problem; in one formulation, we are given a flow network with both capacities<br />

c e and costs Ce on the edges; the cost of a flow [ is equal to the sum of the edge<br />

costs weighted by the amount of flow they carry, ~e Cef(e), and the goal is<br />

to produce a maximum flow of minimum total cost. The Minimum-Cost Flow<br />

Problem can be solved in polynomial time, and it too has many applications;<br />

449

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!