3/17/2003Tucker, Applied Combinatorics Section 4.2a 1 Network Flows Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics, Section 4.2a, Group.

Slides:



Advertisements
Similar presentations
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Transportation.
Advertisements

LIAL HORNSBY SCHNEIDER
Introduction to Algorithms
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Bioinformatics III1 We will present an algorithm that originated by Ford and Fulkerson (1962). Idea: increase the flow in a network iteratively until it.
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
3.3 Spanning Trees Tucker, Applied Combinatorics, Section 3.3, by Patti Bodkin and Tamsen Hunter.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Chapter 10: Iterative Improvement The Maximum Flow Problem The Design and Analysis of Algorithms.
Maurizio Patrignani seminar on the paper on the single-source unsplittable flow problem authored by Yefim Dinitz Naveen Garg Michel X. Goemans FOCS ‘98.
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 4.3 Graph Models Prepared by Jo Ellis-Monaghan.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
04/12/2005Tucker, Sec Applied Combinatorics, 4 th Ed. Alan Tucker Section 4.4 Algorithmic Matching Prepared by Joshua Schoenly and Kathleen McNamara.
CS138A Network Flows Peter Schröder. CS138A Flow Networks Definitions a flow network G=(V,E) is a directed graph in which each edge (u,v)
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Applied Combinatorics, 4th Ed. Alan Tucker
Section 4.2 Network Flows By Christina Touhey. The flow out of a equals the flow into z. Algorithm 1.Make vertex a: (0, ). 2.Scan the first vertex and.
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
Yangjun Chen 1 Network Flow What is a network? Flow network and flows Ford-Fulkerson method - Residual networks - Augmenting paths - Cuts of flow networks.
3/29/05Tucker, Sec Applied Combinatorics, 4th Ed. Alan Tucker Section 4.2 Minimal Spanning Trees Prepared by Amanda Dargie and Michele Fretta.
3/24/03Tucker, Section 4.31 Tucker, Applied Combinatorics, Sec. 4.3, prepared by Jo E-M Bipartite GraphMatching Some Definitions X-Matching Maximal Matching.
A B C D The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
2/28/2005Tucker, Sec Applied Combinatorics, 4th ed. Alan Tucker Section 4.1 Shortest Paths Prepared by Sarah Walker.
1/22/03Tucker, Applied Combinatorics, Section EDGE COUNTING TUCKER, APPLIED COMBINATORICS, SECTION 1.3, GROUP B Michael Duquette & Amanda Dargie.
Introduction to Operations Research
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
Linear Programming Data Structures and Algorithms A.G. Malamos References: Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 11, 2014.
Yangjun Chen 1 Network Flow What is a network? Flow network and flows Ford-Fulkerson method - Residual networks - Augmenting paths - Cuts of flow networks.
5.2 Trees  A tree is a connected graph without any cycles.
10. Lecture WS 2006/07Bioinformatics III1 V10: Network Flows V10 follows closely chapter 12.1 in on „Flows and Cuts in Networks and Chapter 12.2 on “Solving.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
CS 473Lecture ?1 CS473-Algorithms I Lecture ? Network Flows Flow Networks & Flows.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Exercise 6.1 Find the number of different shortest paths from point A to point B in a city with perfectly horizontal streets and vertical avenues as shown.
1 Network Flow CSC401 – Analysis of Algorithms Chapter 8 Network Flow Objectives: Flow networks –Flow –Cut Maximum flow –Augmenting path –Maximum flow.
Fall 2003Maximum Flow1 w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
1 Assignment #3 is posted: Due Thursday Nov. 15 at the beginning of class. Make sure you are also working on your projects. Come see me if you are unsure.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
A directed graph G consists of a set V of vertices and a set E of arcs where each arc in E is associated with an ordered pair of vertices from V. V={0,
Slide 4- 1 Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 Copyright © 2010 Pearson Education, Inc. Publishing.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Network Flow What is a network? Flow network and flows
Network Flows – Labelling procedure
Network Flow 2016/04/12.
Instructor: Shengyu Zhang
Analysis of Algorithms
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Richard Anderson Lecture 21 Network Flow
Applied Combinatorics, 4th Ed. Alan Tucker
Algorithms (2IL15) – Lecture 7
EE5900 Advanced Embedded System For Smart Infrastructure
Lecture 21 Network Flow, Part 1
Network Flows – Minimum capacities
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Maximum Flow Problems in 2005.
Presentation transcript:

3/17/2003Tucker, Applied Combinatorics Section 4.2a 1 Network Flows Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics, Section 4.2a, Group G

3/17/2003Tucker, 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. _________________________________________________

3/17/2003Tucker, 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. _________________________________________________

3/17/2003Tucker, 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) _________________________________________________

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

3/17/2003Tucker, Applied Combinatorics Section 4.2a 6 Cut: Let denote the set of all edges with vertex This set is known as a cut. Note: denotes the complement of P. Example: b a d c z e 8,8 5,5 4,3 4,0 5,5 3,2 4,1 7,6 7,4 8,6 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 _________________________________________________

3/17/2003Tucker, 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

3/17/2003Tucker, Applied Combinatorics Section 4.2a 8 Theorem 1: For any a-z flow in a network N, the flow out of a equals the flow into z. Proof: 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. _________________________________________________

3/17/2003Tucker, 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. 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} = = 13. b a d c z e 8,8 5,5 4,3 4,0 5,5 3,2 4,1 7,6 7,4 8,6

3/17/2003Tucker, Applied Combinatorics Section 4.2a 10 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. For any a-z flow and any a-z cut in a network N, Proof: _________________________________________________

3/17/2003Tucker, 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: _________________________________________________

3/17/2003Tucker, 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: (i)For each edge (ii)For each edge Further, when, is a maximal flow and is an a-z cut of minimal capacity. _________________________________________________

3/17/2003Tucker, 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. _________________________________________________

3/17/2003Tucker, Applied Combinatorics Section 4.2a 14 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. b a d c z e 8,8 5,5 4,3 4,0 5,5 3,2 4,1 7,6 7,4 8,6

3/17/2003Tucker, 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: _________________________________________________

3/17/2003Tucker, Applied Combinatorics Section 4.2a 16 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 a bd c e z Minimum slack = 3

3/17/2003Tucker, Applied Combinatorics Section 4.2a 17 a bd c e z 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) Minimum slack = 3 a 2 ec b d z Figure 2: slack in unsaturated edges For. Minimum slack = 2

3/17/2003Tucker, 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 a bd c e z 5, 5 1, 1 6, 2 5, 4 3, 3 6, 5 6, 4

3/17/2003Tucker, Applied Combinatorics Section 4.2a 19 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 a d c f be z K1K1 K2K2 K3K3 (-,  ) c f e z 6,4 7,4 5,0 4,0 4,4 12,9 3,0 5,4 4,4 7,5 9,9 6,4 7,4 5,0 4,0 4,4 12,9 3,0 5,4 4,4 7,5 9,9

3/17/2003Tucker, Applied Combinatorics Section 4.2a 20 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 (-,  ) 6,4 7,4 5,0 4,0 4,4 12,9 3,0 5,4 4,4 7,5 9,9

3/17/2003Tucker, Applied Combinatorics Section 4.2a 21 Class Example Find a maximal flow from a to z in this network. a be d cg f z