Network Flow Applications

Similar documents
7.5 Bipartite Matching. Chapter 7. Network Flow. Matching. Bipartite Matching

4/12/12. Applications of the Maxflow Problem 7.5 Bipartite Matching. Bipartite Matching. Bipartite Matching. Bipartite matching: the flow network

7.5 Bipartite Matching. Chapter 7. Network Flow. Matching. Bipartite Matching

Algorithms and Data Structures 2011/12 Week 9 Solutions (Tues 15th - Fri 18th Nov)

Today s topics. CSE 421 Algorithms. Problem Reduction Examples. Problem Reduction. Undirected Network Flow. Bipartite Matching. Problem Reductions

3/3/2015. Chapter 7. Network Flow. Maximum Flow and Minimum Cut. Minimum Cut Problem

20/20 20/20 0/5 0/5 20/20 20/20 5/5 0/5 0/5 5/5 0/20 25/30 20/20 30/30 20/20 0/5 5/5 20/20 0/5 0/5 15/20 15/25 20/20 10/10

Matching. Slides designed by Kevin Wayne.

Algorithm Design and Analysis

7. NETWORK FLOW II. Soviet rail network (1950s) Max-flow and min-cut applications. "Free world" goal. Cut supplies (if cold war turns into real war).

Admin MAX FLOW APPLICATIONS. Flow graph/networks. Flow constraints 4/30/13. CS lunch today Grading. in-flow = out-flow for every vertex (except s, t)

Soviet Rail Network, 1955

Soviet Rail Network, 1955

! Abstraction for material flowing through the edges. ! G = (V, E) = directed graph, no parallel edges.

Problem Set If all directed edges in a network have distinct capacities, then there is a unique maximum flow.

Greedy. I Divide and Conquer. I Dynamic Programming. I Network Flows. Network Flow. I Previous topics: design techniques

Main Reference: Sections in CLRS.

6/3/2009. CS 244 Algorithm Design Instructor: t Artur Czumaj. Lecture 8 Network flows. Maximum Flow and Minimum Cut. Minimum Cut Problem.

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

7. NETWORK FLOW II. Minimum cut application (RAND 1950s) Maximum flow application (Tolstoǐ 1930s) Max-flow and min-cut applications

Algorithmic Discrete Mathematics 6. Exercise Sheet

Network Flow. Data Structures and Algorithms Andrei Bulatov

Randomized Perfect Bipartite Matching

Maximum Flow 5/6/17 21:08. Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

CSE 521: Design & Analysis of Algorithms I

Reminder: Flow Networks

1 Motivation and Basic Definitions

Bipartite Matching. Matching. Bipartite Matching. Maxflow Formulation

Maximum Flow and Minimum Cut

Flow networks. Flow Networks. A flow on a network. Flow networks. The maximum-flow problem. Introduction to Algorithms, Lecture 22 December 5, 2001

18 Extensions of Maximum Flow

Graphs III - Network Flow

CS261: A Second Course in Algorithms Lecture #1: Course Goals and Introduction to Maximum Flow

7.6 Disjoint Paths. 7. Network Flow Applications. Edge Disjoint Paths. Edge Disjoint Paths

Flow Networks. Ma/CS 6a. Class 14: Flow Exercises

Algorithm Design and Analysis

Selfish Routing. Tim Roughgarden Cornell University. Includes joint work with Éva Tardos

Maximum Flow in Planar Graphs

CSC 364S Notes University of Toronto, Spring, The networks we will consider are directed graphs, where each edge has associated with it

Introduction to Congestion Games

Average Case Lower Bounds for Monotone Switching Networks

The Residual Graph. 12 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm

Network Flows: Introduction & Maximum Flow

CMPS 6610/4610 Fall Flow Networks. Carola Wenk Slides adapted from slides by Charles Leiserson

MAXIMUM FLOW. introduction Ford-Fulkerson algorithm maxflow-mincut theorem

The Residual Graph. 11 Augmenting Path Algorithms. Augmenting Path Algorithm. Augmenting Path Algorithm

Phys 221 Fall Chapter 2. Motion in One Dimension. 2014, 2005 A. Dzyubenko Brooks/Cole

Network Flows UPCOPENCOURSEWARE number 34414

Warm Up. Correct order: s,u,v,y,x,w,t

Algorithm Design and Analysis

CS 473G Lecture 15: Max-Flow Algorithms and Applications Fall 2005

Math 2214 Solution Test 1 B Spring 2016

Rectilinear Kinematics

Chapter 12: Velocity, acceleration, and forces

16 Max-Flow Algorithms and Applications

Max Flow, Min Cut COS 521. Kevin Wayne Fall Soviet Rail Network, Cuts. Minimum Cut Problem. Flow network.

They were originally developed for network problem [Dantzig, Ford, Fulkerson 1956]

Chapter 3 Kinematics in Two Dimensions

, the. L and the L. x x. max. i n. It is easy to show that these two norms satisfy the following relation: x x n x = (17.3) max

Network flows. The problem. c : V V! R + 0 [ f+1g. flow network G = (V, E, c), a source s and a sink t uv not in E implies c(u, v) = 0

2. VECTORS. R Vectors are denoted by bold-face characters such as R, V, etc. The magnitude of a vector, such as R, is denoted as R, R, V

PHYSICS 151 Notes for Online Lecture #4

Q2.1 This is the x t graph of the motion of a particle. Of the four points P, Q, R, and S, the velocity v x is greatest (most positive) at

18.03SC Unit 3 Practice Exam and Solutions

Today: Max Flow Proofs

Problem Set 8 Solutions

Algorithms. Algorithms 6.4 MAXIMUM FLOW

Introduction to SLE Lecture Notes

Notes on cointegration of real interest rates and real exchange rates. ρ (2)

Flow networks, flow, maximum flow. Some definitions. Edmonton. Saskatoon Winnipeg. Vancouver Regina. Calgary. 12/12 a.

Ma/CS 6a Class 15: Flows and Bipartite Graphs

One-Dimensional Kinematics

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Maximum Flow 3/3 4/6 1/1 4/7 3/3. s 3/5 1/9 1/1 3/5 2/2. 1/18/2005 4:03 AM Maximum Flow 1

Chapter 7. Network Flow. CS 350: Winter 2018

April 3, The maximum flow problem. See class notes on website.

Brock University Physics 1P21/1P91 Fall 2013 Dr. D Agostino. Solutions for Tutorial 3: Chapter 2, Motion in One Dimension

s in boxe wers ans Put

How to Solve System Dynamic s Problems

Kinematics in two dimensions

Please Complete Course Survey. CMPSCI 311: Introduction to Algorithms. Approximation Algorithms. Coping With NP-Completeness. Greedy Vertex Cover

6.302 Feedback Systems Recitation : Phase-locked Loops Prof. Joel L. Dawson

Temporal Logic Replication for Dynamically Reconfigurable FPGA Partitioning

Wrap up: Weighted, directed graph shortest path Minimum Spanning Tree. Feb 25, 2019 CSCI211 - Sprenkle

6.8 Laplace Transform: General Formulas

Geology 229 Engineering Geology. Lecture 12. Elementary Soil Mechanics (cont. 2) (West, Ch. 7)

Dynamic Programming 11/8/2009. Weighted Interval Scheduling. Weighted Interval Scheduling. Unweighted Interval Scheduling: Review

Fall 2014 David Wagner MT2 Soln

Selfish Routing and the Price of Anarchy. Tim Roughgarden Cornell University

Price of Stability and Introduction to Mechanism Design

DETC2004/CIE ALGORITHMIC FOUNDATIONS FOR CONSISTENCY-CHECKING OF INTERACTION-STATES OF MECHATRONIC SYSTEMS

Additional Methods for Solving DSGE Models

1. The graph below shows the variation with time t of the acceleration a of an object from t = 0 to t = T. a

Maximum Flow. Contents. Max Flow Network. Maximum Flow and Minimum Cut

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Civil and Environmental Engineering

Unit 1 Test Review Physics Basics, Movement, and Vectors Chapters 1-3

Maximum Network Lifetime in Wireless Sensor Networks with Adjustable Sensing Ranges

CSE 421 Introduction to Algorithms Winter The Network Flow Problem

Physics Notes - Ch. 2 Motion in One Dimension

CHAPTER 7: SECOND-ORDER CIRCUITS

Transcription:

Hopial problem Neork Flo Applicaion Injured people: n Hopial: k Each peron need o be brough o a hopial no more han 30 minue aay Each hopial rea no more han n/k" people Gien n, k, and informaion abou people locaion and hopial locaion, gie polynomail algorihm o deermine heher e can rea all people Algorihm Deign by Éa Tardo and Jon Kleinberg Copyrigh 2005 Addion Weley, Neil Rhode Slide by Kein Wayne. Modified by Neil Rhode 2 Ecape problem Ecape problem modified Gien: Direced graph G. Sube of node, S, are afe node Sube of node, X, are populaed node Wan an ecape roue from each X o ome afe node S Pah don hare any edge Gien G, S, X, decide in polynomial ime heher uch a e of ecape roue ei No, pah can hare node eiher Gien G, S, X, decide in polynomial ime heher a e of ecape roue ei 3 4

Dinner Scheduling Dinner Scheduling Reiied Dinner: d 1..d n. People p 1..p n. Each peron ha a e of unaailable nigh hen hey can cook. Come up ih biparie graph o ha G ha perfec maching iff eeryone cook on one nigh ha i aailable for hem Gien a dinner chedule here 2 people are aigned o one nigh, and nobody i aigned o ome oher nigh, fi he chedule (in O(n 2 ) ime). 5 6 Aderiing Aderier: m Uer: n Demographic group: G 1..G k Each uer belong o one or more demographic group U j Each aderier an i ad hon o r i uer, each of hom belong o a lea one of i demographic group X i Each uer ee a mo one ad Gie an efficien algorihm o deermine heher ad can be hon aifying aboe, and if o, ha ad hould be hon o hich uer? 7 Algorihm Deign by Éa Tardo and Jon Kleinberg Copyrigh 2005 Addion Weley, Neil Rhode Slide by Kein Wayne. Modified by Neil Rhode

Image egmenaion. Cenral problem in image proceing. Diide image ino coheren region. E: Three people anding in fron of comple background cene. Idenify each peron a a coheren objec. Foreground / background egmenaion. Label each piel in picure a belonging o foreground or background. V = e of piel, E = pair of neighboring piel. a i # 0 i likelihood piel i in foreground. b i # 0 i likelihood piel i in background. # 0 i eparaion penaly for labeling one of i and j a foreground, and he oher a background. Goal. Accuracy: if a i > b i in iolaion, prefer o label i in foreground. Smoohne: if many neighbor of i are labeled foreground, e hould be inclined o label i a foreground. Find pariion (A, B) ha maimize: # a i + b j i " A j " B foreground background # $ # 9 10 Formulae a min cu problem. Maimizaion. No ource or ink. Undireced graph. Turn ino minimizaion problem. Formulae a min cu problem. G' = (V', E'). Add ource o correpond o foreground; add ink o correpond o background Ue o ani-parallel edge inead of undireced edge. Maimizing # a i + b j i " A j " B # $ # i equialen o minimizing ( # i " V a + b i # j " V ) j 14442 4443 a conan $ # a i $ b j i" A j " B # + # AI{i,j} = 1 i a j j or alernaiely # a j + # b i + # j " B i " A b i G' 11 12

Projec Selecion Conider min cu (A, B) in G'. A = foreground. cap(a, B) = # a j + # bi + j"b i" A # pij i" A, j " B if i and j on differen ide, pij couned eacly once Preciely he quaniy e an o minimize. aj pij i j bi A G' 13 Algorihm Deign by Éa Tardo and Jon Kleinberg Copyrigh 2005 Addion Weley, Neil Rhode Slide by Kein Wayne. Modified by Neil Rhode Open Pi Mining Projec Selecion can be poiie or negaie Open-pi mining. (udied ince early 1960) Block of earh are eraced from urface o reriee ore. Each block ha ne alue p = alue of ore - proceing co. Can' remoe block before or. Projec ih prerequiie. Se P of poible projec. Projec ha aociaed reenue p. ome projec generae money: creae ineracie e-commerce inerface, redeign eb page oher co money: upgrade compuer, ge ie licene Se of prerequiie E. If (, ) $ E, can' do projec unle alo do projec. A ube of projec A % P i feaible if he prerequiie of eery projec in A alo belong o A. Projec elecion. Chooe a feaible ube of projec o maimize reenue. 15 16

Projec Selecion: Prerequiie Graph Projec Selecion: Min Cu Formulaion Prerequiie graph. Include an edge from o if can' do ihou alo doing. {,, } i feaible ube of projec. {, } i infeaible ube of projec. Min cu formulaion. Aign capaciy o all prerequiie edge. Add edge (, ) ih capaciy -p if p > 0. Add edge (, ) ih capaciy -p if p < 0. For noaional conenience, define p = p = 0. p u u -p p y y z -p z feaible infeaible p -p 17 18 Projec Selecion: Min Cu Formulaion Claim. (A, B) i min cu iff A ' { } i opimal e of projec. Infinie capaciy edge enure A ' { } i feaible. Ma reenue becaue: cap(a, B) = # p + #($ p ) " B: p > 0 " A: p < 0 = # p : p > 0 12 3 $ # p " A conan u A p u -p p p y y z -p 19