Maximum Flow CSC 172 SPRING 2002 LECTURE 27. Flow Networks Digraph Weights, called capacities, on edges Two distinct veticies Source, “s” (no incoming.

Slides:



Advertisements
Similar presentations
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
Advertisements

1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Maximum Flow Computation Programming Puzzles and Competitions CIS 4900 / 5920 Spring 2009.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
1 Maximum Flow 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.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Lecture 4 Tuesday, 2/19/02 Graph Algorithms: Part 2 Network.
1 Maximum flow problems. 2 - Introduction of: network, max-flow problem capacity, flow - Ford-Fulkerson method pseudo code, residual networks, augmenting.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 4 Tuesday, 10/2/01 Graph Algorithms: Part 2 Network.
Maximum Flows Lecture 4: Jan 19. Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
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.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
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.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
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,
Flow A flow f for a network N is is an assignment of an integer value f(e) to each edge e that satisfies the following properties: Capacity Rule: For each.
The Maximum Network Flow Problem
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Max-flow, Min-cut Network flow.
V12: Network Flows V12 follows closely chapter 12.1 in
Lectures on Network Flows
Algorithms and Networks Hans Bodlaender
Richard Anderson Lecture 23 Network Flow
Maximum Flow 9/13/2018 6:12 PM Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
Max-flow, Min-cut Network flow.
CMSC 341 Lecture 24 Max Flow Prof. Neary
Network Flow 2016/04/12.
Instructor: Shengyu Zhang
Edmonds-Karp Algorithm
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Lecture 10 Network flow Max-flow and Min-cut Ford-Fulkerson method
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Augmenting Path Algorithm
Flow Networks General Characteristics Applications
Flow Networks and Bipartite Matching
Algorithms (2IL15) – Lecture 7
Network Flow CSE 373 Data Structures.
EE5900 Advanced Embedded System For Smart Infrastructure
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Network Flow.
Lecture 21 Network Flow, Part 1
7. Ford-Fulkerson Demo.
The Ford-Fulkerson Algorithm
Augmenting Path Algorithm
Introduction to Maximum Flows
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Maximum Flow Neil Tang 4/8/2008
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Introduction to Maximum Flows
Network Flow.
7. Ford-Fulkerson Demo.
Richard Anderson Lecture 22 Network Flow
7. Ford-Fulkerson Demo.
Presentation transcript:

Maximum Flow CSC 172 SPRING 2002 LECTURE 27

Flow Networks Digraph Weights, called capacities, on edges Two distinct veticies Source, “s” (no incoming edges) Sink, “t” (no outgoing edges)

Example Source s t Sink

Capacity and Flow Edge Capacities Non-negative weights on network edges Flow function on network edges 0 <= flow <= capacity flow into vertex == flow out of vertex Value combined flow into the sink

Example Source s t Sink

Formally Flow(u,v)  edge(u,v) Capacity rule  edge(u,v) 0 <= flow <= capacity Conservation rule  u  in(v) flow(u,v) =  u  out(v) flow(v,w) Value rule |f| =  w  out(s) flow(s,w) =  u  in(t) flow(u,t)

Maximum Flow Problem Given a network N, find a flow of maximum value Applications Traffic movement Hydraulic systems Electrical circuits Layout

Example Source s t Sink

Augmenting Path t s Network with flow 3

Augmenting Path t s Network with flow 3 t s Augmenting Path

t s Network with flow 3 t s Augmenting Path t s Result

Augmenting Path Forward Edges flow(u,v) < capacity we can increase flow Backward edges flor(u,v) > 0 flow can be decreased

Max Flow Theorem A flow has maximum value if and only if it has no augmenting path

Ford & Fulkerson Flow Algorithm Initialize network with null flow Method FindFlow if augmenting path exists then find augmenting path increase flow recursively call FindFlow

Finding Flow t s Initialize Network

Finding Flow t s Send one unit of flow through

Finding Flow t s Send another unit of flow through

Finding Flow t s Send another unit of flow through

Finding Flow t s Send another unit of flow through Note that there is still an augmenting Path that can proceed backwards

Finding Flow t s Send another unit of flow through Note that there are no more Augmenting paths

Residual Network N f v u c(u,v) f(u,v)

Residual Network N f v u c(u,v) f(u,v) v u c f (u,v)=f(u,v) c f (u,v)=c(u,v)-f(u,v)

Residual Network In N f all edges (w,z) with capacity c f (w,z)=0 are removed Augmenting Path in N is a direct path in N f Augmenting paths can be found by performing a depth-first search on the residual network N f

Finding Augmenting Path t s

t s t s