Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modelling with Max Flow 1. 2 The Max Flow Problem.

Similar presentations


Presentation on theme: "Modelling with Max Flow 1. 2 The Max Flow Problem."— Presentation transcript:

1 Modelling with Max Flow 1

2 2 The Max Flow Problem

3 3 Modeling with Max Flow: A scheduling problem A set of jobs must be scheduled on M identical machines. Each job j has an release (arrival) date r j, a required due date d j and a processing time p j · d j - r j. A job can be preemptively moved from one machine to another. Can the jobs be scheduled on the machines so that the deadlines are met?

4 4 M = 3

5 5

6 Basic property of model Feasible (”legal”) schedules correspond to flows that saturate all outgoing arcs of s. ”correspond to” = time spent on a particular job on a particular set of dates can be read off from flow along arcs in middle layer. 6

7 7 Integrality Theorem (26.11) If a flow network has integer valued capacities, there is a maximum flow with an integer value on every edge. The Ford- Fulkerson method will yield such a maximum flow. The integrality theorem is often extremely important when “programming” and modeling using the max flow formalism.

8 8 Reduction: Maximum Matching ! Max Flow What is the maximum cardinality matching in G?

9 9 G

10 10 G’ G’ st All capacities are 1

11 Relating G and G’ Matchings in G correspond exactly to integral flows of G’ Correspondence: –Arcs with a flow of 1 correspond to edges in the matching. –Arcs with a flow of 0 correspond to non-edges A max flow which is integral correspond to a maximum matching 11

12 12 Integrality essential

13 13 Finding a balanced set of Representatives A city has clubs C 1, C 2,…,C n and parties P 1, P 2,…,P m. A citizen may be a member of several clubs but may only be a member of one party. A balanced city council must be formed by including exactly one member from each club and at most u k members from party P k. (Ahuja, Application 6.2)

14 14

15 15 Max Flow – Min Cut Theorem The value of the maximum flow in G is equal to the capacity of the minimum cut in G.

16 16 Processes p 1, p 2, …, p n must be assigned to one of two processors. Assigning p i to processor k gives computation cost a ik. If p i and p k are assigned to different processors, communication cost c ik is incurred. Minimize the total cost. Distributed Computation on Two- Processor Computer (Ahuja, Application 6.5)

17 17

18 … but there is a lot of power of in modeling with directed cuts 18

19 19

20 20 Find a subset of regions to mine so that the total profit is maximized.

21 When solving exam problems… Flow networks is a graphical formalism. This does not mean that a sloppy drawing is sufficient to specify a model. …. remember that max flow networks are directed graphs. ….. remember that arcs in a max flow network have capacities that much be specified. 21


Download ppt "Modelling with Max Flow 1. 2 The Max Flow Problem."

Similar presentations


Ads by Google