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.

Slides:



Advertisements
Similar presentations
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Advertisements

1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Lectures on Network Flows
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
HW2 Solutions. Problem 1 Construct a bipartite graph where, every family represents a vertex in one partition, and table represents a vertex in another.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
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.
ECE LP Duality 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
CS 312: Algorithm Analysis Lecture #3: Algorithms for Modular Arithmetic, Modular Exponentiation This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis
CS 312: Algorithm Design & Analysis Lecture #34: Branch and Bound Design Options for Solving the TSP: Tight Bounds This work is licensed under a Creative.
CS 312: Algorithm Design & Analysis Lecture #17: Connectedness in Graphs This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
Advanced Algorithms Piyush Kumar (Lecture 4: MaxFlow MinCut Applications) Welcome to COT5405.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
CS 312: Algorithm Analysis Lecture #8: Non-Homogeneous Recurrence Relations This work is licensed under a Creative Commons Attribution-Share Alike 3.0.
Lecture 16 Maximum Matching. Incremental Method Transform from a feasible solution to another feasible solution to increase (or decrease) the value of.
Announcements Network Flow today, depending on how far we get, we will do String Matching on Wednesday Then Review for Final next Monday This week’s lab.
CS 312: Algorithm Design & Analysis Lecture #12: Average Case Analysis of Quicksort This work is licensed under a Creative Commons Attribution-Share Alike.
CS 312: Algorithm Design & Analysis Lecture #35: Branch and Bound Design Options: State Spaces Slides by: Eric Ringger, with contributions from Mike Jones,
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
CS 361 – Chapter 16 Final thoughts on minimum spanning trees and similar problems Flow networks Commitment: –Decide on presentation order.
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.
CS 312: Algorithm Analysis Lecture #31: Linear Programming: the Simplex Algorithm, part 2 This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis Lecture #31: Linear Programming: the Simplex Algorithm, part 2 This work is licensed under a Creative Commons Attribution-Share.
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.
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
CS 312: Algorithm Design & Analysis Lecture #26: 0/1 Knapsack This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share.
CS 312: Algorithm Analysis Lecture #27: Network Flow This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.Creative.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
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
Algorithm Design and Analysis
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
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
Network Flow and Connectivity in Wireless Sensor Networks
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Problem Solving 4.
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Algorithms (2IL15) – Lecture 7
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
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Lecture 22 Network Flow, Part 2
Network Flow.
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

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 License.Creative Commons Attribution-Share Alike 3.0 Unported License Slides by: Eric Ringger, with contributions from Mike Jones

Announcements  HW #20:  Due now.  HW #20.5  Due Monday  Project #6: Linear Programming  In preparation: HW #21  Formulate problem for Proj. #6  NO 2-hour time limit  Due Wednesday

Objectives  Better understand the idea of “changing the problem” in the max flow algorithm  Understand the relationship between flows and cuts  Solve Bipartite Matching  See example of Padded matrix-vector representation

Max Flow Example s b d t e f Summarize the max flow algorithm.

Max Flow Example 1.Pick a simple path s  t and increase the flow along that path as much as possible 2.Create the residual graph G R including reverse edges 3. Repeat until there is no path with remaining capacity. s b d t e f 2 4 6

Max Flow Example 1.Pick a simple path s  t and increase the flow along that path as much as possible 2.Create the residual graph G R including reverse edges 3. Repeat until there is no path with remaining capacity. s b d t e f Turn to your partner and tell them about a question you have about how this works. Remember / write your partner’s question.

Solve s b d t e f 2 4 6

Max Flow Example s b d t e f 2 6 s b d t e f Residual Graph, incl. reverse edges One solution 4

Max Flow Example s b d t e f s b d t e f Residual Graph, incl. reverse edges No paths from s to t, so we are done.

Max Flow Example s b d t e f 2 6 s b d t e f Residual Graph, incl. reverse edges One solution 4

Max Flow Example s b d t e f s b d t e f Residual Graph, incl. reverse edges No paths from s to t, so we are done.

Max Flow Example s b d t e f s b d t e f Residual Graph, incl. reverse edges

Max Flow Example s b d t e f s b d t e f Residual Graph, incl. reverse edges Another solution

Max Flow Example s b d t e f s b d t e f Residual Graph, incl. reverse edges

Max Flow Example s b d t e f s b d t e f Residual Graph, incl. reverse edges No paths from s to t, so we are done.

Key Points about our Max Flow Algorithm  When we transform the problem we create “imaginary edges”  However, in the end our selected paths always produce a flow schedule that involves only the original edges.

(s,t)-Cut An (s,t)-cut partitions the vertices into two disjoint sets: L contains s R contains t s b d t e f To compute the capacity of a cut, add up the capacities of edges that flow across the cut from L to R. L: Source Side R: Sink Side

(s,t)-Cut An (s,t)-cut partitions the vertices into two disjoint sets: L contains s R contains t s b d t e f To compute the capacity of a cut, add up the capacities of edges that flow across the cut from L to R. L: Source Side R: Sink Side

Cut Property s b d t e f Max flow is less than or equal to the flow across any cut. Max-Flow Min-Cut Theorem: The maximum flow through a network is equal to the minimum flow across all cuts. What does a min cut represent?

Cut Property s b d t e f Max flow is less than or equal to the flow across any cut. Max-Flow Min-Cut Theorem: The maximum flow through a network is equal to the minimum flow across all cuts. What does a min cut represent?

Cut Property s b d t e f We can call a minimum cut a “matching cut”, since its capacity matches the maximum flow. Max flow is less than or equal to the flow across any cut. Max-Flow Min-Cut Theorem: The maximum flow through a network is equal to the minimum flow across all cuts.

Algorithms

Match-making

Is there a perfect matching?

Bipartite Matching Is there a perfect matching? Great example of problem reduction.

LP: Padded Matrices & Vectors

End

Assignment  HW #20.5  Due Monday  HW #21:  Part 1 of Project #6  Just the problem formulation and representations  No time limit  Due Wednesday

Another Example