CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications.

Slides:



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

1 Scheduling Crossbar Switches Who do we chose to traverse the switch in the next time slot? N N 11.
Minimum Spanning Tree Sarah Brubaker Tuesday 4/22/8.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Five Problems CSE 421 Richard Anderson Winter 2009, Lecture 3.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
The Maximum Network Flow Problem. CSE Network Flows.
Advanced Algorithm Design and Analysis (Lecture 8) SW5 fall 2004 Simonas Šaltenis E1-215b
Lectures on Network Flows
Nick McKeown Spring 2012 Maximum Matching Algorithms EE384x Packet Switch Architectures.
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.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSEP 521 Applied Algorithms
1 Scheduling Crossbar Switches Who do we chose to traverse the switch in the next time slot? N N 11.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 26.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSE 421 Algorithms Richard Anderson Lecture 26 Network Flow Applications.
Network Flow Analysis of Algorithms.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSE 421 Algorithms Richard Anderson Lecture 21 Shortest Paths and Network Flow.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Algorithms Classroom Activities Richard Anderson University of Washington July 3, 20081IUCEE: Algorithm Activities.
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
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
CS4234 Optimiz(s)ation Algorithms
Algorithm Design and Analysis
Lectures on Network Flows
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
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
Richard Anderson Lecture 23 Network Flow Applications
Richard Anderson Lecture 27 Network Flow Applications
Flow Networks Topics Flow Networks Residual networks
CSE 421 Richard Anderson Autumn 2016, Lecture 3
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Richard Anderson Lecture 25 Network Flow Applications
CSE 421 Richard Anderson Autumn 2015, Lecture 3
Max Flow Min Cut, Bipartite Matching Yin Tat Lee
AB AC AD AE AF 5 ways If you used AB, then, there would be 4 remaining ODD vertices (C, D, E and F) CD CE CF 3 ways If you used CD, then, there.
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
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
CSE 421, University of Washington, Autumn 2006
Kruskal’s Algorithm AQR.
Richard Anderson Lecture 23 Network Flow Applications
CSE 421 Richard Anderson Winter 2019, Lecture 3
Lecture 22 Network Flow, Part 2
Richard Anderson Lecture 22 Network Flow
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications

Today’s topics Ford Fulkerson Performance Problem Reductions –Undirected Flow to Flow –Bipartite Matching –Disjoint Path Problem Baseball Scheduling Reading: 7.5, 7.6, 7.12

Ford-Fulkerson Algorithm while not done Construct residual graph G R Find an s-t path P in G R with capacity b > 0 Add b units along in G If the sum of the capacities of edges leaving S is at most C, then the algorithm takes at most C iterations

Performance The worst case performance of the Ford- Fulkerson algorithm is horrible u st v

Better methods of finding augmenting paths Find the maximum capacity augmenting path –O(m 2 log(C)) time algorithm for network flow Find the shortest augmenting path –O(m 2 n) time algorithm for network flow Find a blocking flow in the residual graph –O(mnlog n) time algorithm for network flow

Problem Reduction Reduce Problem A to Problem B –Convert an instance of Problem A to an instance of Problem B –Use a solution of Problem B to get a solution to Problem A Practical –Use a program for Problem B to solve Problem A Theoretical –Show that Problem B is at least as hard as Problem A

Problem Reduction Examples Reduce the problem of finding the Maximum of a set of integers to finding the Minimum of a set of integers Find the maximum of: 8, -3, 2, 12, 1, -6 Construct an equivalent minimization problem

Undirected Network Flow Undirected graph with edge capacities Flow may go either direction along the edges (subject to the capacity constraints) u st v Construct an equivalent flow problem

Bipartite Matching A graph G=(V,E) is bipartite if the vertices can be partitioned into disjoints sets X,Y A matching M is a subset of the edges that does not share any vertices Find a matching as large as possible

Application A collection of teachers A collection of courses And a graph showing which teachers can teach which courses RA PB CC DG AK

Converting Matching to Network Flow ts

Finding edge disjoint paths s t Construct a maximum cardinality set of edge disjoint paths

Theorem The maximum number of edge disjoint paths equals the minimum number of edges whose removal separates s from t

Baseball elimination Can the Dinosaurs win the league? Remaining games: –AB, AC, AD, AD, AD, BC, BC, BC, BD, CD WL Ants42 Bees42 Cockroaches33 Dinosaurs15 A team wins the league if it has strictly more wins than any other team at the end of the season A team ties for first place if no team has more wins, and there is some other team with the same number of wins

Baseball elimination Can the Fruit Flies win or tie the league? Remaining games: –AC, AD, AD, AD, AF, BC, BC, BC, BC, BC, BD, BE, BE, BE, BE, BF, CE, CE, CE, CF, CF, DE, DF, EF, EF WL Ants1712 Bees167 Cockroaches167 Dinosaurs1413 Earthworms1410 Fruit Flies1215

Assume Fruit Flies win remaining games Fruit Flies are tied for first place if no team wins more than 19 games Allowable wins –Ants (2) –Bees (3) –Cockroaches (3) –Dinosaurs (5) –Earthworms (5) 18 games to play –AC, AD, AD, AD, BC, BC, BC, BC, BC, BD, BE, BE, BE, BE, CE, CE, CE, DE WL Ants1713 Bees168 Cockroaches169 Dinosaurs14 Earthworms1412 Fruit Flies1915

Remaining games AC, AD, AD, AD, BC, BC, BC, BC, BC, BD, BE, BE, BE, BE, CE, CE, CE, DE s ACADBCBDBE CE ABCD E T DE