Richard Anderson Lecture 25 Network Flow Applications

Slides:



Advertisements
Similar presentations
Algorithm Design Methods (I) Fall 2003 CSE, POSTECH.
Advertisements

Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
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.
CSE 421 Algorithms Richard Anderson Lecture 23 Network Flow Applications.
Foreground/Background Image Segmentation. What is our goal? To label each pixel in an image as belonging to either the foreground of the scene or the.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
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
10/11/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 22 Network.
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.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSE 421 Algorithms Richard Anderson Lecture 26 Network Flow Applications.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
CS 361 – Chapter 16 Final thoughts on minimum spanning trees and similar problems Flow networks Commitment: –Decide on presentation order.
CSE, IIT KGP Application of Network Flows: Matrix Rounding.
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.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
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,
CSE 421 Algorithms Richard Anderson Lecture 21 Shortest Paths and Network Flow.
The Theory of NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
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
CS223 Advanced Data Structures and Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 23 Network Flow Applications
Richard Anderson Lecture 27 Network Flow Applications
Richard Anderson Lecture 24 Network Flow Applications
Richard Anderson Lecture 25 Open Pit Mining
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Graph Operations And Representation
Analysis of Algorithms
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
CSE 421 Richard Anderson Autumn 2015, Lecture 3
Richard Anderson Autumn 2016 Lecture 7
Richard Anderson Lecture 26 NP-Completeness
EE5900 Advanced Embedded System For Smart Infrastructure
Max Flow / Min Cut.
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Richard Anderson Lecture 27 Survey of NP Complete Problems
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
Maximum Flow Problems in 2005.
Vertex Covers and Matchings
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

Richard Anderson Lecture 25 Network Flow Applications CSE 421 Algorithms Richard Anderson Lecture 25 Network Flow Applications

Today’s topics Problem Reductions Circulations Lowerbound constraints on flows Survey design Airplane scheduling

Problem Reduction Reduce Problem A to Problem B Practical Theoretical 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

Undirected Network Flow Undirected graph with edge capacities Flow may go either direction along the edges (subject to the capacity constraints) u 10 20 5 s t 20 10 v

Circulation Problem 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) fin(v) – fout(v) = d(v) Circulation facts: Feasibility problem d(v) < 0: source; d(v) > 0: sink Must have Svd(v)=0 to be feasible 10 u 20 10 -25 10 s t 20 20 10 v -5

Find a circulation in the following graph 2 3 4 b e 3 2 6 5 3 -4 -2 2 7 2 1 a c f h 4 9 3 2 8 d g 5 -5 4 10

Reducing the circulation problem to Network flow

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 Svcap(s,v) than 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) -2 3 1,2 a x 0,2 1,4 b y 2,4 -4 3

Removing lowerbounds on edges Lowerbounds can be shifted to the demands b y 2,5 -4 3 b y 3 -2 1

Formal reduction Lin(v): sum of lowerbounds on incoming edges Lout(v): sum of lowerbounds on outgoing edges Create new demands d’ and capacities c’ on vertices and edges d’(v) = d(v) + lout(v) – lin(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 C1, . . ., Cn Products P1, . . ., Pm Si is the set of products used by Ci Customer Ci can be asked between ci and c’i questions Questions about product Pj must be asked on between pj and p’j surveys

Circulation construction

Airplane Scheduling Given an airline schedule, and starting locations for the planes, is it possible to use a fixed set of planes to satisfy the schedule. Schedule [segments] Departure, arrival pairs (cities and times)

Compatible segments Segments S1 and S2 are compatible if the same plane can be used on S1 and S2 End of S1 equals start of S2, and enough time for turn around between arrival and departure times End of S1 is different from S2, but there is enough time to fly between cities

Graph representation Each segment, Si, is represented as a pair of vertices (di, ai, for departure and arrival), with an edge between them. Add an edge between ai and dj if Si is compatible with Sj. di ai ai dj

Setting up a flow problem 1,1 di ai 0,1 ai dj 1 -1 P’i Pi

Result The planes can satisfy the schedule iff there is a feasible circulation