1 / 21

Network Flows

Tucker, Applied Combinatorics, Section 4.2a, Group G. Network Flows. Michael Duquette & Whitney Sherman. In this section we will be focusing on analyzing network flows in order to maximize a flow from a starting vertex to an ending vertex. Real World Applications:

mgraham
Télécharger la présentation

Network Flows

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tucker, Applied Combinatorics, Section 4.2a, Group G Network Flows Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics Section 4.2a

  2. In this section we will be focusing on analyzing network flows in order to maximize a flow from a starting vertex to an ending vertex. • Real World Applications: • Maximizing the flow of oil between two cities using a large pipeline network. • Maximizing the number of telephone calls possible between two places. • Calculating the maximum bandwidth of a computer network. _________________________________________________ Tucker, Applied Combinatorics Section 4.2a

  3. Assume initially that all networks are directed. • Definitions: • K(e) represents the capacity or upper bound for a particular edge e in a network. • In(x) = Set of edges directed into x. • Out(x) = Set of edges directed out from x. • Source, a = Initial starting vertex. • Sink, z= Ending vertex. _________________________________________________ Tucker, Applied Combinatorics Section 4.2a

  4. Definitions:Continued • a-z Flow, = Integer-valued function defined on each edge e that satisfies the following conditions: • a) • b) • c) _________________________________________________ Tucker, Applied Combinatorics Section 4.2a

  5. d b 5,5 7,4 7,6 z a 4,3 4,1 4,0 3,2 8,6 8,8 5,5 e c Sample Flow: Figure 4.2, pg 138 _________________________________________________ Note: The numbers corresponding to each edge represent (K(e), (e)), the capacity and flow of each edge. Tucker, Applied Combinatorics Section 4.2a

  6. d b 5,5 7,4 7,6 z a 4,3 4,1 4,0 3,2 8,6 8,8 5,5 e c Cut: Let denote the set of all edges with vertex This set is known as a cut. Note: denotes the complement of P. Example: _________________________________________________ The cut ({a,b,c}, {d,e,z}) consists of the edges: Note: is not in the cut since it goes from to P. The dashed line represents the cut. Note: is considered an a-z cut if Tucker, Applied Combinatorics Section 4.2a

  7. Let be an a-z flow in the network N and let P be a subset of vertices in N not containing a or z. If we sum together the conservation-of-flow equations from condition (c) on slide 4 for each we obtain: After some elimination of duplicate vertices (flows) we reach the following condition: ( ) For each vertex subset P not containing a or z, Meaning that the flow into P equals the flow out of P Tucker, Applied Combinatorics Section 4.2a

  8. For any a-z flow in a network N, the flow out of a equals the flow into z. Proof: _________________________________________________ Theorem 1: _________________________________________________ Assume temporarily that N contains no edge . Let P be all vertices in N except a and z. So Then consists of edges going into z (from P) and consists of edges going out of a (to P). Thus: Remember that the only flow into P from {a,z} must be from a, since condition (b) forbids flow from z. Similarly by condition (b), all flow out of P must go to z. The flow equality still holds if there is flow in an edge . Tucker, Applied Combinatorics Section 4.2a

  9. Let denote the value of the a-z flow . This value equals the sum of the flow out of a, or equivalently the flow into z. d b 5,5 7,4 7,6 z a 4,1 4,3 4,0 3,2 8,6 8,8 5,5 e c Define the capacity of cut : Example: This tells us that no a-z flow in the network can have a value greater than 13. The capacity of the a-z cut where P = {a,b,c} = 5+3+5 = 13. Tucker, Applied Combinatorics Section 4.2a

  10. For any a-z flow and any a-z cut in a network N, Proof: _________________________________________________ Theorem 2: Informally, should equal the total flow from (which is bounded by ), but we cannot prove an equality of this type using condition ( ) without first modifying N. We cannot use ( ) in N because condition ( ) requires that P not contain the source a. Expand the network N by adding a new vertex with an edge of immense capacity. Note that will be part of . _________________________________________________ Tucker, Applied Combinatorics Section 4.2a

  11. Proof: Theorem 2 Continued _________________________________________________ Assign a flow value of to , yielding a valid flow in the expanded network. In effect, the old source a now gets its flow from the “super source” . In the new network, we can apply condition ( ) to P. It says that the flow into P, which is at least (other flow could come into P along edges from ), equals the flow out of P. Thus: Tucker, Applied Combinatorics Section 4.2a

  12. Corollary 2a: _________________________________________________ • For any a-z flow and any a-z cut in a network N, if and only if: • For each edge • For each edge • Further, when , is a maximal flow and is an a-z cut of minimal capacity. Tucker, Applied Combinatorics Section 4.2a

  13. Proof: Corollary 2a _________________________________________________ Consider the following inequalities of the proceeding proof: The first inequality is an equality—the flow from into P (in the expanded network) equals –if condition (i) holds; otherwise the flow into P is greater than . The second inequality is an equality—the flow out of P equals –if condition (ii) holds; otherwise it is less. Thus the equality holds in the figure above if and only if conditions (i) and (ii) are both true. The last sentence in the corollary follows directly from Theorem 2. Tucker, Applied Combinatorics Section 4.2a

  14. d b 5,5 7,4 7,6 z a 4,1 4,3 3,2 4,0 8,6 8,8 5,5 e c All normal flows can be decomposed into a sum of unit-flow paths from a to z, for short, a-z unit flows. An a-z unit flow along a-z path L is defined as if e is in L and = 0 if e is not in L. We will begin building up a flow in order to build a maximal flow by successively adding a-z unit flows together. Example: Note: Make sure that you do not exceed any edge’s capacity. Tucker, Applied Combinatorics Section 4.2a

  15. Unsaturated Edges:Edges where the present flow does not equal the capacity. Slack:Calculate the slack of edge e in flow by the following equation: Definitions: _________________________________________________ Tucker, Applied Combinatorics Section 4.2a

  16. Minimum slack = 3 Example • We start with no flow • Find a path from a to z: • The minimum slack on is 3 (at the start, the slack of each edge is just the capacity) • Add to the initial zero flow • All edges except are unsaturated b d 3 5 6 z a 6 1 5 6 e c 3 Tucker, Applied Combinatorics Section 4.2a

  17. Minimum slack = 3 Minimum slack = 2 Example Continued • The next a-z path is which also has a minimum slack of 3 • The current flow is • The path with minimum slack 2 gives us • Note that not all edges are saturated yet (see figure 2) b d b d 3 3 5 6 a z 1 4 z a 2 1 6 1 5 6 c e e c 3 Figure 2: slack in unsaturated edges For . Tucker, Applied Combinatorics Section 4.2a

  18. Example Continued • There is only one path that can be formed from the previous figure 2 and that is having a minimum slack of 1 • Now it is not possible to go anywhere except from a to c • All of the edges have been saturated in the cut where • The value of the final flow is 9 which equals the capacity of this cut • By corollary 2 the flow must be maximal b d 3, 3 5, 5 6, 4 z a 1, 1 6, 2 5, 4 6, 5 e c 3, 3 Tucker, Applied Combinatorics Section 4.2a

  19. 7,4 7,4 b e 4,0 4,0 4,4 4,4 6,4 6,4 5,0 5,0 4,0 4,0 4,4 4,4 c z 3,0 3,0 a 5,4 5,4 12,9 12,9 7,5 7,5 9,9 9,9 d f Augmenting Flow Algorithm Example • We want to find the maximum flow from a to z • Let the initial flow be where • Now apply the labeling: label (by definition, there cannot be incoming edges to the source with flow) • Edge has slack and b is unlabeled so label (2 is the minimum of and s(a, b)) • Edge has no slack, edge has slack so label it K2 K1 K3 e c z (-, ) f Tucker, Applied Combinatorics Section 4.2a

  20. 7,4 4,0 4,4 6,4 5,0 4,0 4,4 3,0 5,4 12,9 7,5 9,9 Example Continued • Next scan b, (scan vertices in the order that they are labeled) • There are two incoming edges, edge has but it is already labeled, edge has no flow, outgoing edge has slack and e is unlabeled, so label • Scan d, edge comes from a labeled vertex, edge has and c is not labeled so using step 2a label edge is saturated • No labeling can be done from e • At c label f with • At f label z with (-, ) Tucker, Applied Combinatorics Section 4.2a

  21. b 10 e 30 10 10 10 5 30 20 a d z f 20 10 5 20 20 30 c g 10 Class Example Find a maximal flow from a to z in this network. Tucker, Applied Combinatorics Section 4.2a

More Related