Richard Anderson Lecture 22 Network Flow

Slides:



Advertisements
Similar presentations
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Advertisements

Bioinformatics III1 We will present an algorithm that originated by Ford and Fulkerson (1962). Idea: increase the flow in a network iteratively until it.
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
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.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
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.
CSEP 521 Applied Algorithms
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
Chapter 7 May 3 Ford-Fulkerson algorithm Step-by-step walk through of an example Worst-case number of augmentations Edmunds-Karp modification Time complexity.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 23.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
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.
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,
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
CSE 421 Algorithms Richard Anderson Lecture 21 Shortest Paths and Network Flow.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
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.
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
CS4234 Optimiz(s)ation Algorithms
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.
Lecture 22 Network Flow, Part 2
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
Network Flow 2016/04/12.
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
Network Flow and Connectivity in Wireless Sensor Networks
Lecture 10 Network flow Max-flow and Min-cut Ford-Fulkerson method
Richard Anderson Lecture 23 Network Flow Applications
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Richard Anderson Lecture 21 Shortest Path Network Flow Introduction
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Augmenting Path Algorithm
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
Lecture 21 Network Flow, Part 1
7. Ford-Fulkerson Demo.
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.
Richard Anderson Lecture 23 Network Flow Applications
Richard Anderson Lecture 20 Shortest Paths and Network Flow
Lecture 22 Network Flow, Part 2
Introduction to Maximum Flows
7. Ford-Fulkerson Demo.
7. Ford-Fulkerson Demo.
Presentation transcript:

Richard Anderson Lecture 22 Network Flow CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow

Network Flow

Outline Network flow definitions Flow examples Augmenting Paths Residual Graph Ford Fulkerson Algorithm Cuts Maxflow-MinCut Theorem

Network Flow Definitions Capacity Source, Sink Capacity Condition Conservation Condition Value of a flow

Flow Example u 20 10 30 s t 10 20 v

Flow assignment and the residual graph 15/20 0/10 5 10 15 15/30 s t 15 15 s t 5 5/10 20/20 5 20 v v

Network Flow Definitions Flowgraph: Directed graph with distinguished vertices s (source) and t (sink) Capacities on the edges, c(e) >= 0 Problem, assign flows f(e) to the edges such that: 0 <= f(e) <= c(e) Flow is conserved at vertices other than s and t Flow conservation: flow going into a vertex equals the flow going out The flow leaving the source is a large as possible

Flow Example a d g s b e h t c f i 20 20 5 20 5 5 10 5 5 20 5 20 20 30

Find a maximum flow Value of flow: a d g s b e h t c f i 20 20 5 20 5 30 20 30 s b e h t 20 5 5 10 20 5 25 20 c f i 20 10 Construct a maximum flow and indicate the flow value

Find a maximum flow a d g s b e h t c f i 20 20 20 20 20 5 20 5 5 20 5 25 30 20 20 30 s b e h t 20 20 30 5 20 5 5 15 10 15 20 5 25 5 20 c f i 20 20 10 10 Discussion slide

Augmenting Path Algorithm Vertices v1,v2,…,vk v1 = s, vk = t Possible to add b units of flow between vj and vj+1 for j = 1 … k-1 u 10/20 0/10 10/30 s t 5/10 15/20 v

Find two augmenting paths 2/5 2/2 0/1 2/4 3/4 3/4 3/3 3/3 1/3 1/3 s t 3/3 3/3 2/2 1/3 3/3 1/3 2/2 1/3

Residual Graph Flow graph showing the remaining capacity Flow graph G, Residual Graph GR G: edge e from u to v with capacity c and flow f GR: edge e’ from u to v with capacity c – f GR: edge e’’ from v to u with capacity f

Residual Graph u u 15/20 0/10 5 10 15 15/30 s t 15 15 s t 5 5/10 20/20 v v

Build the residual graph 3/5 d g 2/4 3/3 1/5 1/5 s 1/1 t 3/3 2/5 e h 1/1 Residual graph: d g s t e h

Augmenting Path Lemma Let P = v1, v2, …, vk be a path from s to t with minimum capacity b in the residual graph. b units of flow can be added along the path P in the flow graph. u 15/20 0/10 15/30 s t 5/10 20/20 v