Flow Networks Formalization Basic Results Ford-Fulkerson Edmunds-Karp Bipartite Matching Min-cut.

Slides:



Advertisements
Similar presentations
1 Review of some graph algorithms Graph G(V,E) (Chapter 22) –Directed, undirected –Representation Adjacency-list, adjacency-matrix Breadth-first search.
Advertisements

MAX FLOW APPLICATIONS CS302, Spring 2013 David Kauchak.
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)
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
The Maximum Network Flow Problem. CSE Network Flows.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Advanced Algorithm Design and Analysis (Lecture 8) SW5 fall 2004 Simonas Šaltenis E1-215b
1 The Max Flow Problem. 2 Flow networks Flow networks are the problem instances of the max flow problem. A flow network is given by 1) a directed graph.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
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.
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 Maximum Flow Maximum Flow Problem The Ford-Fulkerson method Maximum bipartite matching.
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.
The max flow problem
Yangjun Chen 1 Network Flow What is a network? Flow network and flows Ford-Fulkerson method - Residual networks - Augmenting paths - Cuts of flow networks.
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.
Flows sourcesink s t Flows sourcesink edge-weights = capacities.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2008 Lecture 5 Tuesday, 10/7/08 Graph Algorithms: Part 2.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 5 Wednesday, 10/4/06 Graph Algorithms: Part 2.
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.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
Maximum Flow Chapter 26.
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.
Single Source Shortest-Path: The General Case (with negative edges) Bellman-Ford algorithm. Iteratively relax all edges |V|-1 times Running time? O(VE).
CS 473Lecture ?1 CS473-Algorithms I Lecture ? Network Flows Finding Max Flow.
Maximum Flow Algorithms —— ACM 黄宇翔. 目录 Max-flow min-cut theorem 12 Augmenting path algorithms 3 Push-relabel maximum flow algorithm.
Maximum Flow. p2. Maximum Flow A flow network G=(V, E) is a DIRECTED graph where each has a nonnegative capacity u.
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.
Maximum Flow Chapter 26. Flow Concepts Source vertex s – where material is produced Sink vertex t – where material is consumed For all other vertices.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
Chapter 7 April 28 Network Flow.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
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.
Flow Networks Ching-Chen Huang Hsi-Yue Hsiao. CONTENTS Network flows on directed acyclic graphs Ford-fulkerson Algorithms -Residual networks.
CSCI 256 Data Structures and Algorithm Analysis Lecture 20 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
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.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
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.
Instructor Neelima Gupta Edited by Divya Gaur(39, MCS '09) Thanks to: Bhavya(9), Deepika(10), Deepika Bisht(11) (MCS '09)
The Maximum Network Flow Problem
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Network Flow What is a network? Flow network and flows
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Network flow problem [Adapted from M.Chandy].
Richard Anderson Lecture 23 Network Flow
Edmonds-Karp Algorithm
Network Flows and Matching (Supplementary)
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Network Flows and Matching (Supplementary)
Flow Networks and Bipartite Matching
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

Flow Networks

Formalization Basic Results Ford-Fulkerson Edmunds-Karp Bipartite Matching Min-cut

Flow Network

Properties of Flow

Maximum Flow Value of Flow

Motivating Problem s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

Motivating Problem s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 15/20 4/9 7/7 4/4 11/14 8/13 12/12

Multiple Sources / Sinks s1s1 v1v1 v2v2 v3v3 v4v4 t1t t2t2 4 s2s2 4

Multiple Sources / Sinks s1s1 v1v1 v2v2 v3v3 v4v4 t1t t2t2 4 s2s2 4 S t

Implicit Summation Notation

Key Equalities

Flow Value Definition Homomorphism Flow Conservation Skew Symmetry Homomorphism Flow Conservation

Ford-Fulkerson

Residual network

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

Augmenting Path A path of non-zero weight from s to t in G f

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 20/20 0/9 7/7 4/4 11/14 13/13 s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

S-T Cut

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse 11/ /4 12/12 15/20 4/9 7/7 4/4 11/14 8/13 f(S, T) = 12 – = 19 c(S, T) = = 26

Let f be a flow in a flow network G with source s and sink t, and let (S, T) be a cut of G. Then the net flow across (S, T) is f(S, T) = |f| Homomorphism Flow Conservation Homomorphism Flow Conservation Definition

The value of any flow f in a flow network G is bounded by the capacity of any cut of G

Min-Cut Max-Flow 1. f is a maximum flow in G 2.The residual network G f contains no augmenting path 3.|f|= c(S, T) for some cut (S, T) of G

1.Premise: f is a max-flow in G 2.Assume G f has augmenting path p 3.We can augment G f with p to get a flow f’ > f – Contradicts [1] Hence G f has no augmenting paths

The value of any flow f in a flow network G is bounded by the capacity of any cut of G

Ford-Fulkerson Termination: G f has no augmenting path iff flow is maximum

Run-time

s v1v1 v2v2 t 1 1,000,000

s v1v1 v2v2 t 1

s v1v1 v2v2 t 1 999,9991,000,

s v1v1 v2v2 t 1 999,9991,000,

s v1v1 v2v2 t 1 999,999 1,000, ,

s v1v1 v2v2 t 1 1,000, ,

Edmunds Karp Run-time: O(VE 2 )

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse Critical Edge

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse Critical Edge

s v1v1 v2v2 v3v3 v4v4 t Factory Warehouse

Since there are O(E) edges, the number of augmenting path is bounded by O(VE) [by Lemma]. Run-time: O(VE 2 )

Bipartite Matching

st

st