Max Flow min Cut.

Slides:



Advertisements
Similar presentations
Maximum flow Main goals of the lecture:
Advertisements

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.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
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.
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.
Minimum Cost Flow Lecture 5: Jan 25. Problems Recap Bipartite matchings General matchings Maximum flows Stable matchings Shortest paths Minimum spanning.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
MST and Max Flow CS3233. Overview Two Graph Problems Minimum Spanning Tree Maximum Flow/Minimum Cut Problem One Data Structure Disjoint Sets.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
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,
ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6) (6,8) (3,3) (4,4) (4,10)
Maximum Flow Chapter 26.
Network Flow.
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.
Maximum Flow Chapter 26.
CS4234 Optimiz(s)ation Algorithms
Graph Theory and Algorithm 02
Algorithms and Networks
Lectures on Network Flows
Richard Anderson Lecture 23 Network Flow
CSCI 3160 Design and Analysis of Algorithms Tutorial 8
Network Flow.
Bipartite Matching and Other Graph Algorithms
Maximum Flow Solutions
Max-flow, Min-cut Network flow.
Lecture 16 Maximum Matching
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
CSE Algorithms Max Flow Problems 11/21/02 CSE Max Flow.
Network Flow and Connectivity in Wireless Sensor Networks
Introduction Basic formulations Applications
Lecture 19-Problem Solving 4 Incremental Method
Richard Anderson Lecture 23 Network Flow
Vertex Covers, Matchings, and Independent Sets
Richard Anderson Lecture 21 Network Flow
Problem Solving 4.
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
Flow Networks General Characteristics Applications
Flow Networks and Bipartite Matching
Primal-Dual Algorithm
Algorithms (2IL15) – Lecture 7
EE5900 Advanced Embedded System For Smart Infrastructure
Max Flow / Min Cut.
離散數學 DISCRETE and COMBINATORIAL MATHEMATICS
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
Text Book: Introduction to algorithms By C L R S
Network Flow.
Lecture 21 Network Flow, Part 1
MAXIMUM flow by Eric Wengert.
Introduction to Maximum Flows
Richard Anderson Lecture 22 Network Flow
7. Edmonds-Karp Algorithm
Lecture 21 Network Flow, Part 1
Maximum Flow Neil Tang 4/8/2008
7. Edmonds-karp Demo.
Lecture 22 Network Flow, Part 2
Introduction to Maximum Flows
Network Flow.
Richard Anderson Lecture 22 Network Flow
Maximum Flow Problems in 2005.
Vertex Covers and Matchings
Presentation transcript:

Max Flow min Cut

Max Flow/Min Cut

Problem

Definitions Capacity 7 Sink Source

A Flow 3 5 7 2

A Cut

Capacity/Flow Across A Cut

Problem Find a cut with minimum capacity Find maximum flow from source to sink

More Definition: Residual Graph 3 5 7 2 5 2

Augmenting Path A path from source to sink in the residual graph of a given flow

Idea If there is an augmenting path in the residual graph, we can push more flow

Ford-Fulkerson Method initialize total flow to 0 residual graph G’= G while augmenting path exist in G’ pick a augmenting path P in G’ m = bottleneck capacity of P add m to total flow push flow of m along P update G’

Example 3 2 1 3 1 3 1 1 3 1 1 4 3 2 2 1 1 1 2 4 2 4

Example 3 2 1 3 1 3 1 1 3 1 1 4 3 2 2 1 1 1 2 4 2 4

Example 3 2 1 3 1 3 1 1 3 1 1 4 3 2 2 1 1 1 2 3 1 3 1 1 1

Example 3 2 1 3 1 3 1 1 3 1 1 4 3 2 2 1 1 1 2 3 1 3 1 1 1

Example 1 2 1 3 1 1 1 1 1 1 1 4 3 2 2 1 1 1 2 3 1 3 1 1 1

Example 1 2 1 3 1 1 1 1 1 1 1 4 3 2 2 1 1 1 2 3 1 3 1 1 1

Example 1 2 1 3 1 1 1 1 1 1 1 3 3 2 1 1 1 1 2 2 2 2 2 2

Answer: Max Flow = 4 2 2 2 2 2 1 1 1 2 2 2

Answer: Minimum Cut = 4 3 2 1 3 1 3 1 1 3 1 1 4 3 2 2 1 1 1 2 4 2 4

Find Augmenting Path? initialize total flow to 0 residual graph G’= G while augmenting path exist in G’ pick a augmenting path P in G’ m = bottleneck capacity of P add m to total flow push flow of m along P update G’

Picking Augmenting Path Edmonds-Karp’s Heuristics Find a path with maximum bottleneck capacity Find a path with minimum length

Variations How about Maximum Cut?

Applications for MaxFlow/MinCut

Application: Bipartite Matching Marriage Problem BTW, how to determine if a graph is bipartite?

A Matching

Maximum Matching

Maximum Flow Problem

Maximum Flow/Matching

Minimum Vertex Cover Bipartite Graph 5 2 1 2 4 3 2 3 4 2

A Vertex Cover (W=15) 5 2 1 2 4 3 2 3 4 2

Maximum Flow 5 2 1 2 4 3 2 3 4 2

Finite Cut = Vertex Cover 5 2 1 2 4 3 2 3 4 2

Finite Cut = Vertex Cover

Problems..

Problem 1: Optimal Protein Sequence Given a 2D geometric structure of a protein, with n residuals

Optimal Protein Sequence Each residual can be either hydrophobic (H) or polar (P)

Optimal Sequence Each residual has a “solvent area” Want to reduce solvent areas of Hs Want to increase pairs of Hs in close contacts

Optimal Sequence Assign H, P to the residuals to minimize d(i,j): 1 if H at position i and H at position j is close enough, 0 otherwise s(i) : area exposed at position i

Problem 2: Forest Clearence cannot clear two adjacent square! profit for cutting trees 5 10 8 12 which squares to clear to maximize profit?

Problem 3: All-Pair Maximum Bottleneck Bandwidth Path Given a graph, how to find the maximum bottleneck bandwidth path between any two nodes, u and v, efficiently?