modelling with max flow 1. 2 the max flow problem
Post on 15-Jan-2016
230 views
TRANSCRIPT
![Page 1: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/1.jpg)
Modelling with Max Flow
1
![Page 2: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/2.jpg)
2
The Max Flow Problem
![Page 3: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/3.jpg)
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 rj, a required due date dj and a processing time pj · dj - rj.
• 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?
![Page 4: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/4.jpg)
4
M = 3
![Page 5: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/5.jpg)
5
![Page 6: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/6.jpg)
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
![Page 7: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/7.jpg)
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.
![Page 8: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/8.jpg)
8
Reduction: Maximum Matching ! Max Flow
What is the maximum cardinality matching in G?
![Page 9: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/9.jpg)
9
G
![Page 10: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/10.jpg)
10
G’
s t
All capacities are 1
![Page 11: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/11.jpg)
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
![Page 12: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/12.jpg)
12
Integrality essential
![Page 13: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/13.jpg)
13
Finding a balanced set of Representatives
• A city has clubs C1, C2,…,Cn and parties P1, P2,…,Pm. 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 uk members from party Pk.
(Ahuja, Application 6.2)
![Page 14: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/14.jpg)
14
![Page 15: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/15.jpg)
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.
![Page 16: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/16.jpg)
16
• Processes p1, p2, …, pn must be assigned to one of two processors.
• Assigning pi to processor k gives computation cost aik.
• If pi and pk are assigned to different processors, communication cost cik is incurred.
• Minimize the total cost.
Distributed Computation on Two-Processor Computer
(Ahuja, Application 6.5)
![Page 17: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/17.jpg)
17
![Page 18: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/18.jpg)
… but there is a lot of power of in modeling with directed cuts
18
![Page 19: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/19.jpg)
19
![Page 20: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/20.jpg)
20
Find a subset of regions to mine so that the total profit is maximized.
![Page 21: Modelling with Max Flow 1. 2 The Max Flow Problem](https://reader035.vdocument.in/reader035/viewer/2022062221/56649d375503460f94a0ff31/html5/thumbnails/21.jpg)
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