Maximum Flow. How do we transport the maximum amount data from source to sink? Some of these slides are adapted from Lecture Notes of Kevin Wayne.

Similar documents
Soviet Rail Network, 1955

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

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

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

Maximum Flow and Minimum Cut

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

Soviet Rail Network, 1955

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

Algorithm Design and Analysis

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

Today: Max Flow Proofs

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

1 Motivation and Basic Definitions

Graphs III - Network Flow

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

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

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

CSE 521: Design & Analysis of Algorithms I

Matching. Slides designed by Kevin Wayne.

Main Reference: Sections in CLRS.

Network Flows: Introduction & Maximum Flow

Algorithm Design and Analysis

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

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

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

CSE 421 Introduction to Algorithms Winter The Network Flow Problem

Network Flow. Data Structures and Algorithms Andrei Bulatov

Algorithms. Algorithms 6.4 MAXIMUM FLOW

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

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

Basic Tools CMSC 641. Running Time. Problem. Problem. Algorithmic Design Paradigms. lg (n!) (lg n)! (lg n) lgn n.2

Randomized Perfect Bipartite Matching

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)

7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 11/22/17 6:11 AM

7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 11/22/17 6:11 AM

Algorithmic Discrete Mathematics 6. Exercise Sheet

Reminder: Flow Networks

Network Flows UPCOPENCOURSEWARE number 34414

16 Max-Flow Algorithms and Applications

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

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

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

26.1 Flow networks. f (u,v) = 0.

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

18 Extensions of Maximum Flow

introduction Ford-Fulkerson algorithm

Ford Fulkerson algorithm max-flow min-cut theorem. max-flow min-cut theorem capacity-scaling algorithm

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

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

introduction Ford-Fulkerson algorithm

Average Case Lower Bounds for Monotone Switching Networks

Maximum Flow in Planar Graphs

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

23 Maximum Flows and Minimum Cuts

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

16 Max-Flow Algorithms

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

Introduction to SLE Lecture Notes

Introduction to Congestion Games

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

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

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

EECE 301 Signals & Systems Prof. Mark Fowler

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

Network Flow Applications

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov

Algorithm Design and Analysis

, 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

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

Mechtild Stoer * Frank Wagner** Abstract. fastest algorithm known. The runtime analysis is straightforward. In contrast to

Chapter 7. Network Flow. CS 350: Winter 2018

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

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).

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

Chapter 7: Inverse-Response Systems

Notes for Lecture 17-18

Graph Theory: Network Flow

Maximum Flow. Flow Graph

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

Single and Double Pendulum Models

Topics in Combinatorial Optimization May 11, Lecture 22

CS Lunch This Week. Special Talk This Week. Soviet Rail Network, Flow Networks. Slides20 - Network Flow Intro.key - December 5, 2016

u(t) Figure 1. Open loop control system

Bipartite Matching. Matching. Bipartite Matching. Maxflow Formulation

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

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

Course Notes for EE227C (Spring 2018): Convex Optimization and Approximation

FLAT CYCLOTOMIC POLYNOMIALS OF ORDER FOUR AND HIGHER

Math 334 Test 1 KEY Spring 2010 Section: 001. Instructor: Scott Glasgow Dates: May 10 and 11.

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

CMU-Q Lecture 3: Search algorithms: Informed. Teacher: Gianni A. Di Caro

cs/ee 143 Communication Networks

Exam 1 Solutions. 1 Question 1. February 10, Part (A) 1.2 Part (B) To find equilibrium solutions, set P (t) = C = dp

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:

Computer-Aided Analysis of Electronic Circuits Course Notes 3

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

Monochromatic Infinite Sumsets

We just finished the Erdős-Stone Theorem, and ex(n, F ) (1 1/(χ(F ) 1)) ( n

CHAPTER 7: SECOND-ORDER CIRCUITS

Timed Circuits. Asynchronous Circuit Design. Timing Relationships. A Simple Example. Timed States. Timing Sequences. ({r 6 },t6 = 1.

Transcription:

Conen Conen. Maximum flow problem. Minimum cu problem. Max-flow min-cu heorem. Augmening pah algorihm. Capaciy-caling. Shore augmening pah. Chaper Maximum How do we ranpor he maximum amoun daa from ource o ink? Some of hee lide are adaped from Lecure Noe of Kevin Wayne. Conen Conen. Maximum flow problem. Minimum cu problem. Max-flow min-cu heorem. Augmening pah algorihm. Capaciy-caling. Shore augmening pah. Nework communicaion Nework Node elephone exchange, compuer, aellie Arc cable, fiber opic, microwave relay voice, video, packe circui gae, regier, proceor wire curren mechanical join rod, beam, pring hea, energy hydraulic reervoir, pumping aion, lake pipeline fluid, oil financial ock, currency ranacion money ranporaion airpor, rail yard, ree inerecion highway, railbed, airway roue freigh, vehicle, paenger chemical ie bond energy biological gene pahway ineracion Maximum & Minimum Cu Max flow and min cu. Two very rich algorihmic problem. Cornerone problem in combinaorial opimizaion. Beauiful mahemaical dualiy. Nonrivial applicaion / reducion. Nework conneciviy. Securiy of aiical daa. Biparie maching. Diribued compuing. Daa mining. Egaliarian able maching. Image proceing. Diribued compuing. Airline cheduling. Compuaional biology. Projec elecion. Nework reliabiliy. Many many more... Nework nework: G = (V, E,,, c). (V, E) = weighed direced graph. Two diinguihed verice (node): =ource, =ink. c( = capaciy of edge (arc) e=(. Capaciy

A poiive - flow i a func. p: V V R ha aifie: For all v V: p( c( (capaciy conrain) For all u V {, }: Capaciy Poiive p ( = p( (flow conervaion) (flow o (flow in) Poiive A poiive - flow i a func. p: V V R ha aifie: For all v V: p( c( (capaciy conrain) For all u V {, }: (flow o (flow in) (flow conervaion) MAX FLOW: poiive - flow ha maximize ne flow ou of he ource. Capaciy p ( = p( Value = Poiive A poiive - flow i a func. p: V V R ha aifie: For all v V: p( c( (capaciy conrain) For all u V {, }: (flow o (flow in) (flow conervaion) MAX FLOW: find poiive - flow ha maximize ne flow ou of he ource. Capaciy p ( = p( Value = Poiive A poiive - flow i a func. p: V V R ha aifie: For all v V: p( c( (capaciy conrain) For all u V {, }: (flow o (flow in) (flow conervaion) MAX FLOW: poiive - flow ha maximize ne flow ou of he ource. Capaciy p ( = p( Value = Maximum flow problem Maximize he flow over a flow nework. Capaciy Value = Formalizaion How do we formalize flow? Graph G=(V,E) a flow nework Direced, each edge ha capaciy c( Two pecial verice: ource, and ink For any oher verex here i a pah v A (ne)) - flow i a func. f : V V R ha aifie Capaciy conrain: : For all v V: f( c( Skew ymmery: : For all v V: f( ) = f( conervaion: For all u V {, }: f( uv, ) = f( uv, ) =, or f(, v = f( Vu, ) =

Cancellaion of flow Do we wan o have flow going in boh direcion beween wo verice? No! uch flow cancel (maybe parially) each oher Skew ymmery noaional convenience a c b d a c b d Equivalence of Definiion Define ne flow in erm of poiive flow f( ) = p( - p( How do we know f defined hi way i a ne flow? Capaciy conrain conervaion Skew ymmery Equivalence of Definiion Define poiive flow in erm of ne flow p( ) = f( ) if f( ) > = o.w. How do we know p defined hi way i a poiive flow? Capaciy conrain conervaion In lieraure, view of flow are ued. The curren verion ( rd ediion) of our book ue poiive flow. conervaion Define poiive flow in erm of ne flow p( ) = f( ) if f( ) > = o.w. Need o how Given p( = f ( = p( v f ( V > = = f ( + v f ( V > p( p( v f ( V < f ( v f ( V < p( p( = Implici Summaion Noaion Funcion over e ummaion: x X f ( X, Y ) = f ( x, y) y Y conervaion for poiive flow: p( V ) = p( V,, u V {, } conervaion for ne flow: f ( V ) =, u V {, } Capaciy Conervaion Theorem f = f(,) v = f(, V) = f( V,) proof:? Value =

Lemma G = (V,E) i a flow nework. f i a ne flow in G. f (X,X) =, X, Y V f (X,Y) = f (Y,X), X, Y V f (X Y, Z) = f (X,Z)+ f (Y,Z), X,Y,Z V & X Y= Y= f (Z, X Y) = f (Z,X)+ f (Z,Y), X,Y,Z V & X Y= Y= Conervaion Theorem f = f(,) v = f(, V) = f( V,) proof: Proof: f = f (, V ) = f ( V, V ) f ( V, V ) = f ( V, V ) = f ( V, ) + f ( V, V {, }) = f ( V, ) + f ( V, u V {, } = f ( V, ). conervaion Cu An - cu i a node pariion (S, T).. S, T. The capaciy of an - cu (S, T) i: c(. u S, v T u, v V Min - cu: find an - cu of minimum capaciy. Capaciy = Cu An - cu i a node pariion (S, T).. S, T. The capaciy of an - cu (S, T) i: c(. Min - cu: find an - cu of minimum capaciy. u S, v T Capaciy = Cu An - cu i a node pariion (S, T).. S, T. The capaciy of an - cu (S, T) i: c(. u S, v T Min - cu: find an - cu of minimum capaciy. Capaciy Recall he example Value = Capaciy =

and Cu Lemma. Le f be a ne flow, and le (S, T) be a cu. Then, he ne flow en acro he cu i equal o he amoun reaching. and Cu Lemma. Le f be a flow, and le (S, T) be a cu. Then, he ne flow en acro he cu i equal o he amoun reaching. Value = Value = and Cu Lemma. Le f be a flow, and le (S, T) be a cu. Then, he ne flow en acro he cu i equal o he amoun reaching. Value = Proof of he Lemma For any flow f, he flow acro any cu (S, T) i he flow value f, i.e. f (S, T) = f = f (, V). Proof: f (S, T) = f (S, V S) = f (S, V) f (S, S) = f (, V) + f (S-, V) = f. (lemma ) (flow conervaion) Proof by Mah Inducion For any flow f, he flow acro any cu (S, T) i he flow value f, i.e. f (S, T) = f = f (,V). Proof: by inducion on S. Bae cae: S = { }. Inducive hypohei: aume rue for S < k. conider cu (S, T) wih S = k S = S' { v } for ome v,, S' = k- f(s', T') = f. adding v o S', change o he f? and Cu Lemma. f i a flow & (S, T) i a cu. Then f c(s, T). Proof. f = f ( S, T ) = u S v T u S v T f ( c( = c( S, T ) S T v v Corollary. Le f be a flow, and le (S, T) be a cu. If f = c(s, T), hen f i a max flow and (S, T) i a min cu. S' Before S Afer

Max and Min Cu Corollary. Le f be a flow, and le (S, T) be a cu. If f = c(s, T), hen f i a max flow and (S, T) i a min cu. Max and Min Cu Corollary. Le f be a flow, and le (S, T) be a cu. If f = c(s, T), hen f i a max flow and (S, T) i a min cu. Cu capaciy = value = Cu capaciy = value = Summary Lemma. Le f be a flow, and le (S, T) be a cu. Then, he ne flow en acro he cu i equal o he amoun reaching. Lemma. f i a flow & (S, T) i a cu. Then f c(s, T). Corollary. Le f be a flow, and le (S, T) be a cu. If f = c(s, T), hen f i a max flow and (S, T) i a min cu. Conen Maximum flow problem. Minimum cu problem. Max-flow min-cu heorem. Augmening pah algorihm. Capaciy-caling. Shore augmening pah. Max- Min-Cu Theorem MAX-FLOW MIN-CUT THEOREM (Ford-Fulkeron, Fulkeron, ): In any nework, he value of he max flow i equal o he value of he min cu. Proof:? Cu capaciy = value = Toward an Algorihm Find an - pah where each edge e=( ha c(e) > f(e) and "augmen" flow along he pah. value =

Toward an Algorihm Find an - pah where each arc e=( ha c(e) > f(e) and "augmen" flow along he pah. Repea unil you ge uck. The A Greedy deign Algorihm of hi algorihm? value = Toward an Algorihm Find an - pah where each arc ha u(e) > f(e) and "augmen" flow along he pah. Repea unil you ge uck. The raigh forward greedy algorihm fail. value = value = Reidual Nework Le f be a flow on G = (V, E). The reidual nework G f = (V, E f ) i he graph wih ricly poiive reidual capaciie: c f ( = c( f ( >, (where f ( >) E f = {( V V V c f (>}. G f conain edge of G ha can admi more ne flow. (G f G G T, where G T ha G edge in revere.) Original graph G = (V, E). f(. u Arc e = ( E. Reidual Arc Capaciy v flow nework and flow f reidual nework Reidual graph: G = (V, E f f ). Reidual arc e = ( and e R = (. "Undo" flow en. u Reidual capaciy v Reidual capaciy Reidual Graph & Augmening Pah Reidual graph: G = (V, E f f ). Augmening Pah Augmening pah = pah in reidual graph. G G G f G f

Relaion beween flow on G & G f Lemma: Le f be a flow on G=(V,E), f be a flow on he reidual nework G f of G. Then he flow um (f +f )( f (+f ( i a flow on G and f +f = f + f. Proof: f +f i a flow on G (flow conervaion, capaciy conrain, kew ymmery) f +f = f + f f + f ' = = ( f + f ')(, f (, + = f + f '. f '(, Augmening Pah Augmening pah = pah in reidual graph. Max flow no augmening pah??? G G f value = Max- Min-Cu Theorem Augmening pah heorem (Ford-Fulkeron, Fulkeron, ): A flow f i a max flow if and only if here are no augmening pah. MAX-FLOW MIN-CUT THEOREM (Ford-Fulkeron, Fulkeron, ): he value of he max flow i equal o he value of he min cu. We prove boh heorem imulaneouly by howing he TFAE: (i) f i a max flow. (ii) There i no augmening pah relaive o f. (iii) There exi a cu (S, T) uch ha f = c(s, T). Proof We prove boh imulaneouly by howing he TFAE: (i) f i a max flow. (ii) There i no augmening pah relaive o f. (iii) There exi a cu (S, T) uch ha f = c(s, T). (i) (ii) Le f be a flow. If here exi an augmening pah, hen we can improve f by ending flow along pah. (proof by conradicion) (iii) (i) Thi wa he Corollary o Lemma. Proof (ii) (iii) Le f be a flow wih no augmening pah. Le S be e of verice reachable from in reidual graph. Le T=V S. I T.? (clearly S, and S by definiion of f, o.w. augmening pah) For each u S, v T, f ( = c(.? (o.w. c f (=c( f (>, hen v S). Therefore:? f = f (S,T) = c(s,t). S T Reidual Nework Ford-Fulkeron Fulkeron algorihm Le G=(V, E) be a flow nework. Ford-Fulkeron(G,,,c) for each edge ( in E do Θ(E) f( f( while here exi a pah p from o in reidual do nework G f c f = min{c f (: ( i in p} for each edge ( in p do f( f( + c f f( -f( reurn f Θ(E) Co? Θ(? ) Θ(V+E) deph fir earch or breadh fir earch

Performance If capaciie are ineger, O( E f * ), f * i max flow found by he algorihm (no a polynomial algorihm). Performance Example: Original nework and flow Reidual nework Maximum flow: Performance Ne flow:. ieraion poible. Performance For nonineger capaciie, migh never erminae. Need more efficien algorihm (Edmond-Karp, ): Augmen along breadh-fir augmening pah in G f (hore pah) Augmen along max-capaciy augmening pah in G f (capaciy-caling) BFS for Shore Pah Edmond-Karp Algorihm S S Finihed Dicovered Undicovered Daa rucure for BFS? S Take only wo ieraion.

Shore Augmening Pah Inuiion: chooing pah via breadh fir earch. Eay o implemen. may implemen by coincidence! Find augmening pah wih fewe number of arc. ShoreAugmeningPah(V, E,, ) FOREACH e E f(e) G f reidual graph WHILE (here exi augmening pah) //find uch a pah P by BFS f augmen(f, P) updae G f RETURN f Co? Shore Augmening Pah: Overview of Analyi Lemma.. Throughou he algorihm, he lengh of he hore pah increae. Proof ahead. Lemma.. Afer a mo E hore pah augmenaion, he lengh of he hore augmening pah increae monaonically. Proof ahead. Theorem.. The hore augmening pah algorihm run in O( V E ) ime. O( V + E ) ime o find a hore augmening pah via BFS. O( E ) augmening pah of le han V edge. (If here i an augmening pah, i mu be a imple one.) O( V E ) augmenaion. O(( V + E )*( V E )) = O( V E ) running ime. Shore Augmening Pah: Analyi Level graph of (V, E, ). For each verex define ( o be he lengh (number of edge) of hore pah from o v. L G = (V, E G ) i ubgraph of G ha conain only hoe edge ( w) E wih (w) = ( +. Shore Augmening Pah: Analyi Level graph of (V, E, ). For each verex define ( o be he lengh of hore pah from o v. L = L G = (V, F) i ubgraph of G ha conain only hoe edge (w) E wih (w) = ( +. Compue in O( V + E ) ime uing BFS, deleing back and ide edge. P i a hore -v pah in G if and only if i i an -v pah in L. G: L: L G : = = = = = = = = Shore Augmening Pah: Analyi Lemma. he lengh of he hore pah increae. Le f and f' be flow before and afer a hore pah augmenaion. Le L and L' be level graph of reidual nework G f and G f ' Only back edge added o G f ' pah wih back edge ha lengh greaer han previou lengh L = = = = L' Shore Augmening Pah: Analyi Lemma. Afer a mo E hore pah augmenaion, he lengh of he hore augmening pah ricly increae. A lea one edge (he boleneck edge) i deleed from L afer each augmenaion. No new edge added o L unil lengh of hore pah o ricly increae. L L' = = = = Lengh= Lengh=

Shore Augmening Pah: Review of Analyi Theorem.. The hore augmening pah algorihm run in O( V E ) ime. O( V + E ) ime o find a hore augmening pah via BFS. O( E ) augmening pah of le han V edge. (If here i an augmening pah, i mu be a imple one.) O( V E ) augmenaion. O(( V + E )*( V E )) = O( V E ) running ime. More rigorou proof i given in our exbook. Oher approache: Augmen along max-capaciy augmening pah in G f (capaciy-caling) Capaciy Scaling Inuiion: chooing pah wih highe boleneck capaciy increae flow by max poible amoun. In pracice, don' worry abou finding exac highe boleneck pah. Mainain caling parameer. Le G f ( ) be he ubgraph of he reidual graph coniing of only arc wih capaciy a lea. G f G f () Capaciy Scaling Aumpion: all capaciie are ineger beween & U. Chooing Good Augmening Pah: Summary ScalingMax(V, E,, ) FOREACH e E, f(e) (malle power of greaer han or equal o U)/ WHILE ( ) G f ( ) -reidual graph WHILE (here exi augmening pah P in G f ( )) f augmen(f, P) updae G f ( ) / RETURN f Theorem. The algorihm run in O( E log (U) ) ime. Mehod Augmenaion Running ime Augmening pah V U E V U Max capaciy E log U E log U ( E + V log V ) Capaciy caling E log U E log U Improved capaciy caling E log U E V log U Shore pah E V E V Improved hore pah E V E V Fir rule aume edge capaciie are beween and U. Year... Dicoverer Danzig Hiory Mehod Simplex Big-Oh E V U Ford, Fulkeron Augmening pah E V U Edmond-Karp Shore pah E V Diniz Shore pah E V Edmond-Karp, Diniz Capaciy caling E log U Diniz-Gabow Capaciy caling E V log U Karzanov Preflow-puh V Sleaor-Tarjan Dynamic ree E V log V Goldberg-Tarjan FIFO preflow-puh E V log ( V / E )......... Goldberg-Rao Lengh funcion E / log ( V / E ) log U E V / log ( V / E ) log U

Nework wih muliple ource and ink a c e k f g h Can be reduced o a ingle ource & ingle ink max problem b d b d b d Maximum biparie maching Biparie graph G=(V,E): Undireced V = V V, V V =. e=( E, u V and Complee biparie: u V, u i joined wih every v V Maching: e of edge wih no verex included wice Maximum maching: a maching of maximum cardinaliy i.e. no maching conain more edge Applicaion Daing aignmen L women,, R men. An edge beween verice: hey have a chance o be compaible (can be mached) Job placemen Companie make job offer Suden have job choice An edge beween verice: he uden can fi he job Example Problem: Given N men and M women, find a maching beween men and women. Paricipan li member of oppoie ex hey like o dae. Men Preference Li Man nd rd Vicor Diana Amy Wya Diane Berha Amy Xavier Amy Erika Clare Yancey Amy Diane Clare Zeu Amy Diane Can we find a perfec mach? Wha i he max mach? Problem: Job placemen Example Suden Preference Li Suden nd rd Alice Apple Dell HP Bob Apple Dell Google Carol HP IBM Sun Dave Apple Dell Eliza IBM Sun Google Frank HP Sun Google Maximum biparie maching How can we reformulae hi problem o become a max-flow problem? Can we find a perfec mach? Wha i he max mach?

Maximum biparie maching How can we reformulae hi problem o become a max-flow problem? Keep all edge & verice Add ource conneced o all verice in one e Add ink conneced o all verice in anoher e Se all capaciie o A B C D E Maching A D H I S Soluion Suden nd rd Theorem: : The e of edge in he maxflow oluion give he oluion o he maximum maching problem. Proof homework F G Alice Bob Carol Dave Eliza Apple Dell IBM Sun HP Frank Google Lemma Lemma : Le G=(V,E), V = V V, V V =. Le G =(V,E ), V = V {,}, E =. flow nework Then: If M i a maching, hen here i an ineger valued flow f on G wih f = M. If f i an ineger valued flow on G, hen here i a maching M on G wih cardinaliy M = f Proof: M f,.. f = M If ( M, define: f(,=f(=f()=; f()=f(=f(,=-; ( ( M, f(=, hen f i a flow and f = M? (kew ymmery, capaciy conrain, flow conervaion) f M,.. M = f ince f i an ineger valued flow, f(= or. M =f(v, V ) = f Inegraliy Theorem Inegraliy Theorem: : If he capaciy of a flow nework i an ineger funcion, maximum flow f produced by Ford-Fulkeron Fulkeron mehod i an ineger-valued flow. Proof: homework Corollary: : If M i he cardinaliy of a maximum maching M, hen he value of a maximum flow f = M. Proof:? Show conrapoiive. uppoe M i a max maching and f i no a max flow, i.e. f,.. f > f Then M,.. M = f > f = M = M Conradicing our aumpion ha M i a maximum maching.