ChApTeR 10
■
MATChINgs, CuTs, ANd Flows
225
10-5. Implement a wrapper-object that looks like a graph but that dynamically reflects
the residual network of an
underlying flow network with a changing flow. Implement some of the flow algorithms in this chapter using plain
implementations of the traversal algorithms to find augmenting paths.
10-6. How would you reduce the flow problem (finding a flow of a given magnitude) to the max-flow problem?
10-7. Implement a solution to the min-cost flow problem using Dijkstra’s algorithm and weight adjustments.
10-8. In Exercise 4-3, you were inviting friends to a party and wanted to ensure that each guest knew at least
k others
there. You’ve realized that things are a bit more complicated. You like some friends more than others, represented by
a real-valued
compatibility, possibly negative. You also know that many of the guests will attend only if certain other
guests attend (though the feelings need not be mutual). How would you select a feasible subset of potential guests that
maximizes the sum of your compatibility to them? (You might also want to consider guests who
won’t come if certain
others do. That’s a bit harder, though—take a look at Exercise 11-19.)
10-9. In Chapter 4, four grumpy moviegoers were trying to figure out their seating arrangements. Part of the problem was
that none of them would switch seats unless they could get their favorite. Let’s say they were slightly less grumpy and were
willing to switch places as required to get the best solution. Now, an optimal solution could be
found by just adding edges
to free seats until you run out. Use a reduction to the bipartite matching algorithm in this chapter to show that this is so.
10-10. You’re having a team building seminar for
n people, and you’re doing two exercises. In both exercises, you
want to partition crowd into groups of
k, and you want to make sure that no one in the second round is in the same
group as someone they were in a group with in the first round. How could you solve this with maximum flow?
(Assume that
n is divisible by
k.)
10-11. You’ve been hired by an interplanetary passenger transport service (or, less imaginatively, an airline) to analyze
one of its flight. The spaceship lands on planets 1…
n in order and can pick up or drop off passengers at each stop. You
know how many passengers want to go from planet every
i to every other planet
j, as well as the fare for each such trip.
Design an algorithm to maximize the profit for the entire trip. (This problem is based on Application 9.4 in
Network
Flows, by Ahuja et al.)
References
Ahuja, R. K., Magnanti, T. L., and Orlin, J. B. (1993).
Network Flows: Theory, Algorithms, and Applications. Prentice Hall.
Berge, C. (1957). Two theorems in graph theory.
Proceedings of the National Academy of Sciences of the United States of
America 43(9):842–844.
http://www.pnas.org/content/43/9/842.full.pdf
.
Busacker, R. G., Coffin, S. A., and Gowen, P. J. (1962). Three general network flow problems and their solutions.
Staff Paper RAC-SP-183, Research Analysis Corporation, Operations Logistics Division.
http://handle.dtic.mil/100.2/AD296365
.
Ford, L. R. and Fulkerson, D. R. (1957). A simple algorithm for finding maximal network flows and an application to
the hitchcock problem. Canadian Journal of Mathematics, 9:210–218.
http://smc.math.ca/cjm/v9/p210
.
Ford, L. R. and Fulkerson, D. R. (1962).
Flows in networks. Technical Report R-375-PR, RAND Corporation.
http://www.rand.org/pubs/reports/R375
.
Jungnickel, D. (2007).
Graphs, Networks and Algorithms, third edition. Springer.
Goh, C. J.
and Yang, X. Q. (2002).
Duality in Optimization and Variational Inequalities. Optimization Theory and
Applications. Taylor & Francis.
Goldberg, A. V. and Kennedy, R. (1995). An efficient cost scaling algorithm for the assignment problem.
Mathematical
Programming, 71:153–178.
http://theory.stanford.edu/~robert/papers/csa.ps
.
Schwartz, B. L. (1966). Possible winners in partially completed tournaments.
SIAM Review, 8(3):302–308.
http://jstor.org/pss/2028206
.