CSE 421 Introduction to Algorithms Winter The Network Flow Problem

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

CSE 521: Design & Analysis of Algorithms I

Graphs III - Network Flow

Soviet Rail Network, 1955

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

Maximum Flow and Minimum Cut

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

Today: Max Flow Proofs

1 Motivation and Basic Definitions

Main Reference: Sections in CLRS.

Matching. Slides designed by Kevin Wayne.

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

Algorithm Design and Analysis

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

Algorithm Design and Analysis

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

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

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

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

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

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

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

Network Flow. Data Structures and Algorithms Andrei Bulatov

Network Flows: Introduction & Maximum Flow

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

Network Flows UPCOPENCOURSEWARE number 34414

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

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

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)

Randomized Perfect Bipartite Matching

Algorithmic Discrete Mathematics 6. Exercise Sheet

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

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.

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

Reminder: Flow Networks

introduction Ford-Fulkerson algorithm

Algorithms. Algorithms 6.4 MAXIMUM FLOW

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

introduction Ford-Fulkerson algorithm

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

16 Max-Flow Algorithms and Applications

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

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

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

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

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

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

18 Extensions of Maximum Flow

Maximum Flow in Planar Graphs

23 Maximum Flows and Minimum Cuts

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

Introduction to Congestion Games

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

EECE 301 Signals & Systems Prof. Mark Fowler

Bipartite Matching. Matching. Bipartite Matching. Maxflow Formulation

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

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

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

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

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

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

Laplace Transform. Inverse Laplace Transform. e st f(t)dt. (2)

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

Introduction to SLE Lecture Notes

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

Graph Theory: Network Flow

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Soviet Rail Network, 1955

Chapter 7. Network Flow. CS 350: Winter 2018

Algorithm Design and Analysis

16 Max-Flow Algorithms

To become more mathematically correct, Circuit equations are Algebraic Differential equations. from KVL, KCL from the constitutive relationship

Network Flow Applications

Average Case Lower Bounds for Monotone Switching Networks

Discussion Session 2 Constant Acceleration/Relative Motion Week 03

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

Topics in Combinatorial Optimization May 11, Lecture 22

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov

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

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

Flow Networks Alon Efrat Slides courtesy of Charles Leiserson with small changes by Carola Wenk. Flow networks. Flow networks CS 445

CHAPTER 7: SECOND-ORDER CIRCUITS

t is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t...

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

6.8 Laplace Transform: General Formulas

arxiv: v1 [cs.cg] 21 Mar 2013

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

THE BERNOULLI NUMBERS. t k. = lim. = lim = 1, d t B 1 = lim. 1+e t te t = lim t 0 (e t 1) 2. = lim = 1 2.

Sections 2.2 & 2.3 Limit of a Function and Limit Laws

Today. Flow review. Augmenting paths. Ford-Fulkerson Algorithm. Intro to cuts (reason: prove correctness)

Additional Methods for Solving DSGE Models

Let. x y. denote a bivariate time series with zero mean.

Inventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions

Notes for Lecture 17-18

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

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

Transcription:

CSE 42 Inroducion o Algorihm Winer 202 The Nework Flow Problem 2

The Nework Flow Problem 5 a 4 3 x 3 7 6 b 4 y 4 7 6 c 5 z How much uff can flow from o? 3

Sovie Rail Nework, 955 Reference: On he hiory of he ranporaion and maximum flow problem. Alexander Schrijver in Mah Programming, 9: 3, 2002. 4

Ne Flow: Formal Definiion Given: A digraph G = (V,E) Two verice, in V (ource & ink) A capaciy c(u,v) 0 for each (u,v) E (and c(u,v) = 0 for all nonedge (u,v)) Find: A flow funcion f: V x V R.., for all u,v: f(u,v) c(u,v) [Capaciy Conrain] f(u,v) = -f(v,u) [Skew Symmery] if u,, f(u,v) = 0 [Flow Conervaion] Maximizing oal flow f = f(,v) Noaion:!! f ( X, Y ) = f ( x, y ) x" X y" Y 5

Example: A Flow Funcion flow/capaciy, no 0.66... 2/2 2/3 u f(,u) = f(u,) = 2 f(u,) = f(,u) = -2 (Why?) f(,) = -f(,) = 0 (In every flow funcion for hi G. Why?) f (u,v ) = " # f (u,v ) = f (u, ) + f (u, ) v V =! 2 + 2 = 0 6

Example: A Flow Funcion 4/5 a 3/4 /3 x 3/3 7 6 b 4 /4 y 7 /6 c 5 z No hown: f(u,v) if 0 Noe: max flow 4 ince f i a flow, f = 4 7

Max Flow via a Greedy Alg? a 3 2 2 b While here i an pah in G Pick uch a pah, p Find c p, he min capaciy of any edge in p Subrac c p from all capaciie on p a 3 b a 2 b 2 Delee edge of capaciy 0 a 2 b 8

Max Flow via a Greedy Alg? Thi doe NOT alway find a max flow: If you pick b a fir, a 3 2 2 b a b Flow uck a 2. Bu flow 3 poible. 9

A Brief Hiory of Flow # Year Dicoverer() Bound n = # of verice 95 Danzig O(n 2 mu) m= # of edge 2 955 Ford & Fulkeron O(nmU) U = Max capaciy 3 970 Diniz; Edmond & Karp O(nm 2 ) 4 970 Diniz O(n 2 m) 5 972 Edmond & Karp; Diniz O(m 2 logu) Source: Goldberg & Rao, FOCS 97 6 973 Diniz;Gabow O(nm logu) 7 974 Karzanov O(n 3 ) 8 977 Cherkaky O(n 2 qr(m)) 9 980 Galil & Naamad O(nm log 2 n) 0 983 Sleaor & Tarjan O(nm log n) 986 Goldberg &Tarjan O(nm log (n 2 /m)) 2 987 Ahuja & Orlin O(nm + n 2 log U) 3 987 Ahuja e al. O(nm log(n qr(log U)/(m+2)) 4 989 Cheriyan & Hagerup E(nm + n 2 log 2 n) 5 990 Cheriyan e al. O(n 3 /log n) 6 990 Alon O(nm + n 8/3 log n) 7 992 King e al. O(nm + n 2+ε ) 8 993 Phillip & Webrook O(nm(log m/n n + log 2+ε n) 9 994 King e al. O(nm(log m/(n log n) n) 20 997 Goldberg & Rao O(m 3/2 log(n 2 /m) log U) ; O(n 2/3 m log(n 2 /m) logu) 2

Greed Reviied a 2/2 / a +/2 2/3 /3 2/2 b 2/2 b / a 2 a 2 2 2 2 b 2 b 3

Reidual Capaciy The reidual capaciy (w.r.. f) of (u,v) i c f (u,v) = c(u,v) - f(u,v) E.g.: c f (,b) = 7; c f (a,x) = ; c f (x,a) = 3; 3/4 a 4/5 /3 x 3/3 7 6 b c 4 5 y /4 z 7 /6 c f (x,) = 0 (a auraed edge) 4

Reidual Nework & Augmening Pah The reidual nework (w.r.. f) i he graph G f = (V,E f ), where E f = { (u,v) c f (u,v) > 0 } An augmening pah (w.r.. f) i a imple pah in G f. 5

A Reidual Nework 4/5 7 6 a b c 3/4 4 5 x /3 y /4 z 3/3 7 /6 4 7 6 reidual nework: he graph G f = (V,E f ), where E f = { (u,v) c f (u,v) > 0 } 3 a x 3 2 4 7 b y 3 5 c 5 z 6

An Augmening Pah 4/5 a 3/4 /3 x 3/3 augmening pah: a imple pah in G f. 7 6 b c 4 5 y /4 z 7 /6 4 7 6 a b c 4 5 3 2 3 x y z 3 7 5 7

Lemma If f admi an augmening pah p, hen f i no maximal. Proof: obviou -- augmen along p by c p, he min reidual capaciy of p edge. 8

9 Augmening A Flow 4/5 6 7 3/4 /3 4 5 3/3 7 /6 /4 a b c x y z 4 3 6 7 2 4 5 3 7 5 3 a b c x y z 4/5 /6 7 3/4 /3 4 /5 3/3 /7 /6 4 a b c x y z

Lemma : Augmened Flow are Flow If f i a flow & p an augmening pah of capaciy c p, hen f i alo a valid flow, where Proof: f '( u, v) = $! #! " f ( u, v) + c f ( u, v) % c f ( u, v), a) Flow conervaion eay b) Skew ymmery eay ( v, u) oherwie c) Capaciy conrain prey eay p p,, if if ( u, v) in pah in pah p p 20

Lma : Augmened Flow are Flow $ f ( u, v) + c! f '( u, v) = # f ( u, v) % c! " f ( u, v), p p,, if ( u, v) if ( v, u) oherwie in pah in pah p p f a flow & p an aug pah of cap c p, hen f alo a valid flow. Proof (Capaciy conrain): (u,v), (v,u) no on pah: no change (u,v) on pah: f (u,v) = f(u,v) + c p f(u,v) + c f (u,v) = f(u,v) + c(u,v) - f(u,v) = c(u,v) f (v,u) = f(v,u) - c p < f(v,u) c(v,u) Reidual Capaciy: 0 < c p c f (u,v) = c(u,v) - f(u,v) Cap Conrain: -c(v,u) f(u,v) c(u,v) 2

Lemma Example Cae Le (u,v) be any edge in augmening pah. Noe G f c p u u c p v c p v c f (u,v) = c(u,v) f(u,v) c p > 0 Cae : f(u,v) 0: G before u u f(u,v)/c(u,v) v v Add forward flow G afer u u f(u,v)+c p /c(u,v) v v 22

Lemma Example Cae 2 Le (u,v) be any edge in augmening pah. Noe G f c p u u c p v c p v c f (u,v) = c(u,v) f(u,v) c p > 0 Cae 2: f(u,v) -c p : f(v,u) = -f(u,v) c p G before u u f(v,u)/c(v,u) v v Cancel/redirec revere flow G afer u u f(v,u)-c p /c(v,u) v v 23

Lemma Example Cae 3 Le (u,v) be any edge in augmening pah. Noe G f c p u u c p v c p v c f (u,v) = c(u,v) f(u,v) c p > 0 Cae 3: -c p < f(u,v) < 0: G before u u v v??? G afer u u v v 24

Lemma Example Cae 3 Le (u,v) be any edge in augmening pah. Noe G f c p u u c p v c p v c f (u,v) = c(u,v) f(u,v) c p > 0 Cae 3: -c p < f(u,v) < 0 c p > f(v,u) > 0: Boh: cancel/redirec revere flow and add forward flow G before u G afer u u u f(v,u)/c(v,u) 0/c(u,v) 0/c(v,u) c p -f(v,u) /c(u,v) v v v v 25

Ford-Fulkeron Mehod While G f ha an augmening pah, augmen Queion:» Doe i hal?» Doe i find a maximum flow?» How fa? 26

Cu A pariion S,T of V i a cu if S, T. Capaciy of cu S,T i c ( S, T ) =! c( u, v ) {} c=8 5 7 6 a b c 4 4 5 3 {,b,c} c=5 4 x y z 3 7 6 {} c=6 5 7 6 {,x} c=2 u" S v" T a b c um of cap of edge from S o T x y z 3 27

Lemma 2 For any flow f and any cu S,T, he ne flow acro he cu equal he oal flow, i.e., f = f(s,t), and he ne flow acro he cu canno exceed he capaciy of he cu, i.e. f(s,t) c(s,t) Corollary: Max flow Min cu Cu Cap = 3 Ne Flow = Cu Cap = 2 Ne Flow = 28

Lemma 2 For any flow f and any cu S,T, ne flow acro cu = oal flow cu capaciy Proof: Track a flow uni. Sar a, end a. croe cu an odd # of ime; ne =. La croing ue a forward edge oaled in C(S,T) Cu Cap = 3 Ne Flow = Cu Cap = 2 Ne Flow = 29

Max Flow / Min Cu Theorem For any flow f, he following are equivalen () f = c(s,t) for ome cu S,T (a min cu) (2) f i a maximum flow (3) f admi no augmening pah Proof: () (2): corollary o lemma 2 (2) (3): conrapoiive of lemma 30

(3) () (no aug) (cu) u S T v Idea: where boleneck S = { u an augmening pah wr f from o u } T = V - S; S, T For any (u,v) in S T, an augmening pah from o u, bu no o v. (u,v) ha 0 reidual capaciy: (u,v) E auraed f(u,v) = c(u,v) (v,u) E no flow f(u,v) = 0 = -f(v,u) Thi i rue for every edge croing he cu, i.e. f f ( S, T ) = f ( u, v ) = u" S v" T f ( u, v ) =! =!!! u" S, v" T,( u, v )" E u" S, v" T,( u, v )" E c( u, v ) = c( S, T ) 3

Corollarie & Fac If Ford-Fulkeron erminae, hen i found a max flow. I will erminae if c(e) ineger or raional (bu may no if hey re irraional). However, may ake exponenial ime, even wih ineger capaciie: c a c c = 0 99, ay c b c 32

How o Make i Faer Many way. Three imporan one: Scaling do big edge fir; ee ex. if C = max capaciy, T = O(m 2 log C) Preflow-Puh ee ex. T = O(n 3 ) Edmond-Karp (nex) T = O(nm 2 ) 33

Edmond-Karp Algorihm Ue a hore augmening pah (via Breadh Fir Search in reidual graph) Time: O(n m 2 ) 34

BFS/Shore Pah Lemma Diance from i never reduced by: Deleing an edge proof: no new (hence no horer) pah creaed Adding an edge (u,v), provided v i nearer han u proof: BFS i unchanged, ince v viied before (u,v) examined v a back edge u 35

Lemma 3 Le f be a flow, G f he reidual graph, and p a hore augmening pah. Then no verex i cloer o afer augmenaion along p. Proof: Augmenaion only delee edge, add back edge 36

Augmenaion v BFS G G f G f 5/9 2/- x 3/0 0/5 x x 6/- u u u 3/3 v v v 2/5 37

Theorem 2 The Edmond-Karp Algorihm perform O(mn) flow augmenaion Proof: {u,v} i criical on augmening pah p if i cloe o having min reidual capaciy. Won be criical again unil farher from. So each edge criical a mo n ime. 38

Augmenaion v BFS Level G G f 0 G f 0 G laer 5/9 2/- x 4 x 5. x 8. 3/0 0/5 u 6/- 3/3 v 2/5 7 8 u 3 0 v 3 2 k - k 4 u 0 3 v 0 5 k k+ u 3 v BFS Level BFS Level 39

Corollary Edmond-Karp run in O(nm 2 ) 40

Flow Inegraliy Theorem If all capaciie are ineger» Some max flow ha an ineger value» Ford-Fulkeron mehod find a max flow in which f(u,v) i an ineger for all edge (u,v) 0.5/ 0.5/ 0.5/ 0.5/ / A valid flow, bu unneceary 4

Biparie Maximum Maching Biparie Graph: G = (V,E) V = L R (L R = ) E L R Maching: A e of edge M E uch ha no wo edge ouch a common verex Problem: Find a maching M of maximum ize 42

Reducing Maching o Flow Given biparie G, build flow nework N a follow: Add ource, ink Add edge à L Add edge Rà All edge capaciie Theorem: Max flow iff max maching 43

Reducing Maching o Flow Theorem: Max maching ize = max flow value M à f? Eay end flow only hrough M f à M? Flow inegraliy Thm, + cap conrain 44

Noe on Maching Max Flow Algorihm i probably overly general here Bu mo direc maching algorihm ue "augmening pah" ype idea imilar o ha in max flow See ex & homework Time mn /2 poible via Edmond-Karp 46

7.2 Baeball Eliminaion Some lide by Kevin Wayne 48

Baeball Eliminaion Team i Win w i Which eam have a chance of finihing he eaon wih mo win?» Monreal eliminaed ince i can finih wih a mo 80 win, bu Alana already ha 83.» w i + g i < w j eam i eliminaed.» Only reaon por wrier appear o be aware of.» Sufficien, bu no neceary! Loe To play Again = g ij l i g i Al Phi NY Mon Alana 83 7 8-6 Philly 80 79 3-0 2 New York 78 78 6 6 0-0 Monreal 77 82 3 2 0-49

Baeball Eliminaion Team i Win w i Loe To play Again = g ij l i g i Al Phi NY Mon Alana 83 7 8-6 Philly 80 79 3-0 2 New York 78 78 6 6 0-0 Monreal 77 82 3 2 0 - Which eam have a chance of finihing he eaon wih mo win?» Philly can win 83, bu ill eliminaed...» If Alana loe a game, hen ome oher eam win one. Remark. Depend on boh how many game already won and lef o play, and on whom hey're again. 50

Baeball Eliminaion Baeball eliminaion problem.» Se of eam S.» Diinguihed eam S.» Team x ha won w x game already.» Team x and y play each oher g xy addiional ime.» I here any oucome of he remaining game in which eam finihe wih he mo (or ied for he mo) win? 5

Baeball Eliminaion: Max Flow Formulaion Can eam 3 finih wih mo win? Aume eam 3 win all remaining game w 3 + g 3 win. Divvy remaining game o ha all eam have w 3 + g 3 win. -2 game lef -4 2 eam 4 can ill win hi many more game -5 g 24 = 7 2-4 4 w 3 + g 3 - w 4 2-5 5 game node 4-5 eam node 52

Baeball Eliminaion: Max Flow Formulaion Theorem. Team 3 i no eliminaed iff max flow aurae all edge leaving ource. Inegraliy each remaining x-y game added o # win for x or y. Capaciy on (x, ) edge enure no eam win oo many game. -2 game lef -4 2 eam 4 can ill win hi many more game -5 g 24 = 7 2-4 4 w 3 + g 3 - w 4 2-5 5 game node 4-5 eam node 53

Baeball Eliminaion: Explanaion for Spor Wrier Team Win Loe To play Again =g ij i w i l i g i NY Bal Bo Tor NY 75 59 28-3 8 7 Balimore 7 63 28 3-2 7 Boon 69 66 27 8 2-0 Torono 63 72 27 7 7 0 - Deroi 49 86 27 3 4 0 0 De 3 4 0 - - AL Ea: Augu 30, 996 Which eam have a chance of finihing he eaon wih mo win? Deroi could finih eaon wih 49 + 27 = 76 win. 54

Baeball Eliminaion: Explanaion for Spor Wrier Team Win Loe To play Again =g ij i w i l i g i NY Bal Bo Tor NY 75 59 28-3 8 7 Balimore 7 63 28 3-2 7 Boon 69 66 27 8 2-0 Torono 63 72 27 7 7 0 - Deroi 49 86 27 3 4 0 0 AL Ea: Augu 30, 996 Which eam could finih he eaon wih mo win? Deroi could finih eaon wih 49 + 27 = 76 win. Cerificae of eliminaion. R = {NY, Bal, Bo, Tor} Have already won w(r) = 278 game. Mu win a lea r(r) = 27 more. Average eam in R win a lea 305/4 > 76 game. De 3 4 0 - - 55

Baeball Eliminaion: Explanaion for Spor Wrier Cerificae of eliminaion T " S, w(t ) :=! " # # win $ w i i#t # remaining game! $ " $ $ #, g(t ) := $ g x y {x, y} " T, If LB on avg # game won! #" # $ w(t)+ g(t) T > w z + g z hen z eliminaed (by ube T). Theorem. [Hoffman-Rivlin 967] Team z i eliminaed iff here exi a ube T* ha eliminae z. Proof idea. Le T* = eam on ource ide of min cu. 56

w l g NY Bal Tor Bo NY 90-6 4 Balimore 88 6-4 Torono 87 0 6-4 Boon 79 2 4 4 4 - g* = +6+ = 8 ( 90 + 87 + 6 ) / 2 > 9, o he e T = {NY, Tor} prove Boon i eliminaed. Noe: T={NY,Tor, Bal} i NOT a cerificae, ince (90+88+87+8)/3 = 9 Fig 7.2 Min cu no flow of value g*, o Boon eliminaed.

Baeball Eliminaion: Explanaion for Spor Wrier Pf of heorem. Ue max flow formulaion, and conider min cu (A, B). Define T* = eam node on ource ide of min cu. Oberve x-y A iff boh x T* and y T*. infinie capaciy edge enure if x-y A hen x A and y A if x A and y A bu x-y T*, hen adding x-y o A decreae capaciy of cu game lef y eam x can ill win hi many more game g 24 = 7 x-y x w z + g z - w x 58

Baeball Eliminaion: Explanaion for Spor Wrier Pf of heorem. Ue max flow formulaion, and conider min cu (A, B). Define T* = eam node on ource ide of min cu. Oberve x-y A iff boh x T* and y T*. g(s!{z}) > cap(a, B) capaciy of game edge leaving A!### "### $ = g(s!{z})! g(t*)!### "### $ + (w z + g z! w x ) capaciy of eam edge leaving A # x "T* = g(s!{z})! g(t*)! w(t*) + T* (w z + g z ) Rearranging: w z + g z < w(t*)+ g(t*) T* 59

Maching & Baeball: Key Poin Can (omeime) ake problem ha eemingly have nohing o do wih flow & reduce hem o a flow problem How? Build a clever nework; map allocaion of uff in original problem (mach edge; win) o allocaion of flow in nework. Clever edge capaciie conrain oluion o mimic original problem in ome way. Inegraliy ueful. 60

Maching & Baeball: Key Poin Furhermore, in he baeball example, min cu can be ranlaed ino a uccinc cerificae or proof of ome propery ha i much more ranparen han ee, I ran max-flow and i ay flow mu be le han g*. Thee example ugge why max flow i o imporan i a very general ool ued in many oher algorihm. 6