Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Consider the following generalization of the maximum flow problem.

You are given a directed network G=(V,E)with edge capacities {ce}. Instead of a single (s,t)pair, you are given multiple pairs (s1,t1),(s2,t2),,(sk,tk), where the siare sources of Gand tithe are sinks of G. You are also given kdemands d1,,dk. The goal is to find kflows f(1),,f(k)with the following properties:

  • f(i)is a valid flow fromSi toti .
  • For each edge e, the total flowfe(1)+fe(2)++fe(k) does not exceed the capacityce .
  • The size of each flowf(i) is at least the demand di.
  • The size of the total flow (the sum of the flows) is as large as possible.

How would you solve this problem?

Short Answer

Expert verified

The problem is solved by the linear program for max flow as follows:

Maximize the flow of the network:

maxi=1k(u,ti)ÎEf(u,ti)(i)

Compare the flow :

eE:fe(1)+fe(2)+fe(i)ce

vV:uvEfuv(i)=uwEfuw(i)

f(i)=(u,t)Ef(u,ti)(i)dife(i)0

Step by step solution

01

Explain the demands in the given problem

The generalization of the maximum flow problem considers the directed network with the edge capacities {ce}. Multiple pairs of sources and sinks are given. There is a demandd1,,dk for each flow.

The maximum flow aims to send as much data as possible from source to sink without exceeding the edge weights.

02

Give the solution to determine the maximum flow problem.

The maximum flow with the demands and to maximize the flow the solution is found by the linear program as follows.

Maximize the flow of the network:

maxi=1k(u,ti)Ef(u,ti)(i)

Compare the flow with the edge capacity, that the total flow does not exceed the edge capacity.

eE:fe(1)+fe(2)+fe(i)ce

The number of the entering and the leaving edges are equal.

vV:uvEfuv(i)=uwEfuw(i)

The size of the flow is at least the demand.

f(i)=(u,t)Ef(u,ti)(i)dife(i)0

The size of the total flow is greater than zero.

Therefore, the problem is solved by the linear program for max flow.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Direct bipartite matching. We’ve seen how to find a maximum matching in a bipartite graph via reduction to the maximum flow problem. We now develop a direct algorithm.

Let G=(V1V2,E)be a bipartite graph (so each edge has one endpoint in V1and one endpoint in V2), and letMEbe a matching in the graph (that is, a set of edges that don’t touch). A vertex is said to be covered byMif it is the endpoint of one of the edges in M. An alternating path is a path of odd length that starts and ends with a non-covered vertex, and whose edges alternate between Mand E-M.

(a) In the bipartite graph below, a matching Mis shown in bold. Find an alternating path.


(b) Prove that a matchingMis maximal if and only if there does not exist an alternating path with respect to it.

(c) Design an algorithm that finds an alternating path inO(|V|+|E|)time using a variant of breadth-first search.

(d) Give a directO(|V|-|E|)algorithm for finding a maximal matching in a bipartite graph.

Question: A linear program for shortest path. Suppose we want to compute the shortest path from node s to node t in a directed graph with edge lengths le>0.

a) Show that this is equivalent to finding an s - tflow fthat minimizes elefesubject to size (f) = 1. There are no capacity constraints.

b) Write the shortest path problem as a linear program.

c) Show that the dual LP can be written as

role="math" localid="1659250472483" maxxs-xtxu-xvluvforall(u,v)E

d) An interpretation for the dual is given in the box on page 223. Why isn’t our dual LP identical to the one on that page?

Hollywood. A film producer is seeking actors and investors for his new movie. There are n available actors; actori chargesSj dollars. For funding, there arem available investors. Investorj will providepj dollars, but only on the condition that certain actorsLj{1,2,...,n} are included in the cast (all of these actorsLj must be chosen in order to receive funding from investorrole="math" localid="1658404523817" j ).

The producer’s profit is the sum of the payments from investors minus the payments to actors. The goal is to maximize this profit.

(a) Express this problem as an integer linear program in which the variables take on values {0,1}.

(b) Now relax this to a linear program, and show that there must in fact be an integral optimal solution (as is the case, for example, with maximum flow and bipartite matching).

Question: Consider the following simple network with edge capacities as shown.

a) Show that, if the Ford-Fulkerson algorithm is run on this graph, a careless choice of updates might cause it to take 1000iterations. Imagine if the capacities were a million instead of 1000.

We will now find a strategy for choosing paths under which the algorithm is guaranteed to terminate in a reasonable number of iterations.

Consider an arbitrary directed network (G=V,E,s,t,ce)in which we want to find the maximum flow.Assume for simplicity that all edge capacities are at least 1, and define the capacity of an s - t path to be the smallest capacity of its constituent edges. The fattest path from s to t is the path with the most capacity.

b) Show that the fattest s - t path in a graph can be computed by a variant of Dijkstra’s algorithm.

c) Show that the maximum flow in Gis the sum of individual flows along at most|E|paths from s to t.

d) Now show that if we always increase flow along the fattest path in the residual graph, then the Ford-Fulkerson algorithm will terminate in at mostO(ElogF) iterations, where F is the size of the maximum flow. (Hint: It might help to recall the proof for the greedy set cover algorithm in Section 5.4.)

In fact, an even simpler rule—finding a path in the residual graph using breadth-first search— guarantees that atO(V.E)most iterations will be needed.

In a satisfiable system of linear inequalities

a11x1+···+a1nxnb1:am1x1+···+amnxnbm

we describe the inequality as forced-equal if it is satisfied with equality by every solution x = (x1,...,xn)of the system. Equivalently,Piajixibj is not forced-equal if there exists an x that satisfies the whole system and such that Piajixibj.

For example, in

x1+x22-x1-x2-2x11-x20

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free