CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.

Slides:



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

Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
MAX FLOW APPLICATIONS CS302, Spring 2013 David Kauchak.
Five Problems CSE 421 Richard Anderson Winter 2009, Lecture 3.
CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications.
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
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.
Linear Programming – Max Flow – Min Cut Orgad Keller.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSEP 521 Applied Algorithms
Survey Design. The problem One company has the certain numbers of products to sell to the customers. Each customer will receive questions about the product.
Lecture 16 Maximum Matching. Incremental Method Transform from a feasible solution to another feasible solution to increase (or decrease) the value of.
MAX FLOW APPLICATIONS CS302, Spring 2012 David Kauchak.
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.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
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
CS4234 Optimiz(s)ation Algorithms
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
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
Bipartite Matching and Other Graph Algorithms
Instructor: Shengyu Zhang
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 24 Network Flow Applications
Richard Anderson Lecture 25 Open Pit Mining
Richard Anderson Lecture 28 NP-Completeness
Introduction Basic formulations Applications
Analysis of Algorithms
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
Vertex Covers, Matchings, and Independent Sets
Richard Anderson Lecture 21 Network Flow
Problem Solving 4.
Richard Anderson Lecture 25 Network Flow Applications
CSE 421 Richard Anderson Autumn 2015, Lecture 3
Algorithms (2IL15) – Lecture 7
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
Richard Anderson Lecture 23 Network Flow Applications
CSE 421 Richard Anderson Winter 2019, Lecture 3
Lecture 22 Network Flow, Part 2
Richard Anderson Lecture 24 Network Flow Applications
Richard Anderson Lecture 26 Open Pit Mining
Richard Anderson Lecture 22 Network Flow
Vertex Covers and Matchings
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications

Today’s topics Problem Reductions –Undirected Flow to Flow –Bipartite Matching –Disjoint Path Problem Circulations Lowerbound constraints on flows Survey design

Problem Reduction Reduce Problem A to Problem B –Convert an instance of Problem A to an instance 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

Directed graph with capacities, c(e) on the edges, and demands d(v) on vertices Find a flow function that satisfies the capacity constraints and the vertex demands –0 <= f(e) <= c(e) –f in (v) – f out (v) = d(v) Circulation facts: –Feasibility problem –d(v) 0: sink –Must have  v d(v)=0 to be feasible Circulation Problem u st v

Find a circulation in the following graph a be c f dg h

Reducing the circulation problem to Network flow u ab v

Formal reduction Add source node s, and sink node t For each node v, with d(v) < 0, add an edge from s to v with capacity -d(v) For each node v, with d(v) > 0, add an edge from v to t with capacity d(v) Find a maximum s-t flow. If this flow has size  v cap(s,v) then the flow gives a circulation satisifying the demands

Circulations with lowerbounds on flows on edges Each edge has a lowerbound l(e). –The flow f must satisfy l(e) <= f(e) <= c(e) ax yb ,4 1,2 0,2 1,4

Removing lowerbounds on edges Lowerbounds can be shifted to the demands yb -43 2,5 yb -21 3

Formal reduction L in (v): sum of lowerbounds on incoming edges L out (v): sum of lowerbounds on outgoing edges Create new demands d’ and capacities c’ on vertices and edges –d’(v) = d(v) + l out (v) – l in (v) –c’(e) = c(e) – l(e)

Application Customized surveys –Ask customers about products Only ask customers about products they use Limited number of questions you can ask each customer Need to ask a certain number of customers about each product Information available about which products each customer has used

Details Customer C 1,..., C n Products P 1,..., P m S i is the set of products used by C i Customer C i can be asked between c i and c’ i questions Questions about product P j must be asked on between p j and p’ j surveys

Circulation construction