Today: Max Flow Proofs

Similar documents
Algorithm Design and Analysis

Soviet Rail Network, 1955

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

Soviet Rail Network, 1955

Graphs III - Network Flow

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

Maximum Flow and Minimum Cut

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

1 Motivation and Basic Definitions

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

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

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

Main Reference: Sections in CLRS.

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

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

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

Network Flow. Data Structures and Algorithms Andrei Bulatov

CSE 521: Design & Analysis of Algorithms I

Matching. Slides designed by Kevin Wayne.

Network Flows: Introduction & Maximum Flow

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)

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

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

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.

CSE 421 Introduction to Algorithms Winter The Network Flow Problem

Algorithm Design and Analysis

Network Flows UPCOPENCOURSEWARE number 34414

Algorithmic Discrete Mathematics 6. Exercise Sheet

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

18 Extensions of 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

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

Introduction to Congestion Games

Randomized Perfect Bipartite Matching

Reminder: Flow Networks

Maximum Flow in Planar Graphs

Algorithms. Algorithms 6.4 MAXIMUM FLOW

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

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)

16 Max-Flow Algorithms and Applications

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

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

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

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

23 Maximum Flows and Minimum Cuts

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

Introduction to SLE Lecture Notes

introduction Ford-Fulkerson algorithm

introduction Ford-Fulkerson algorithm

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

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

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

CS4800: Algorithms & Data Jonathan Ullman

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

EECE 301 Signals & Systems Prof. Mark Fowler

16 Max-Flow Algorithms

Chapter 7. Network Flow. CS 350: Winter 2018

Algorithm Design and Analysis

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

Graph Theory: Network Flow

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

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

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

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

u(t) Figure 1. Open loop control system

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

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

AP Calculus BC Chapter 10 Part 1 AP Exam Problems

Stationary Distribution. Design and Analysis of Algorithms Andrei Bulatov

Average Case Lower Bounds for Monotone Switching Networks

Efficient Algorithms for Computing Disjoint QoS Paths

Discussion Session 2 Constant Acceleration/Relative Motion Week 03

Supplement for Stochastic Convex Optimization: Faster Local Growth Implies Faster Global Convergence

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

arxiv: v1 [cs.cg] 21 Mar 2013

Topics in Combinatorial Optimization May 11, Lecture 22

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

Price of Stability and Introduction to Mechanism Design

PHYSICS 151 Notes for Online Lecture #4

18.03SC Unit 3 Practice Exam and Solutions

arxiv: v2 [cs.cg] 30 Apr 2015

FLAT CYCLOTOMIC POLYNOMIALS OF ORDER FOUR AND HIGHER

What is maximum Likelihood? History Features of ML method Tools used Advantages Disadvantages Evolutionary models

Angular Motion, Speed and Velocity

Exponential Sawtooth

Use of variance estimation in the multi-armed bandit problem

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

Finish reading Chapter 2 of Spivak, rereading earlier sections as necessary. handout and fill in some missing details!

Stat13 Homework 7. Suggested Solutions

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

Notes for Lecture 17-18

Motion In One Dimension. Graphing Constant Speed

1 Review of Zero-Sum Games

Linear Motion, Speed & Velocity

24 Single-Source Shortest Paths

Physics 240: Worksheet 16 Name

Differential Geometry: Revisiting Curvatures

Transcription:

Today: Max Flow Proof COSC 58, Algorihm March 4, 04 Many of hee lide are adaped from everal online ource

Reading Aignmen Today cla: Chaper 6 Reading aignmen for nex cla: Chaper 7 (Amorized analyi)

In-Cla Exercie # Find he maximum flow in he following flow nework: v v v v 4 5 7 v 5 v 6

In-Cla Exercie # Find he maximum flow in he following flow nework: Wha doe reidual graph look like (a he beginning) afer updaing flow from v v? v v v v 5 4 7 v 5 v 6

In-Cla Exercie # Find he maximum flow in he following flow nework: Wha doe reidual graph look like (a he beginning) afer updaing flow along augmening pah from v v? v v v v v v 5 4 v v 5 4 7 7 v 5 v 6 Wha happened o diance from o v? v 5 v 6

In-Cla Exercie # Find he maximum flow in he following flow nework: Wha doe reidual graph look like (a he beginning) afer updaing flow along augmening pah from v v? v v v v v v 5 4 v v 5 4 7 7 v 5 v 6 v 5 v 6 Wha happened o diance from o v? I increaed by a lea a diance of. (Remember hi for nex proof!)

Edmond Karp = Ford-Fulkeron Mehod implemened o elec hore augmening pah Take hore pah (in erm of number of edge) a an augmening pah Edmond-Karp algorihm How do we find uch a hore pah? Running ime O(VE ), becaue he number of augmenaion i O(VE) To prove hi we need o prove ha: The lengh of he hore pah doe no decreae Each edge can become criical a mo ~ V/ ime. Edge (u,v) on an augmening pah p i criical if i ha he minimum reidual capaciy in he pah: c f (u,v) = c f (p)

Non-decreaing hore pah Why doe he lengh of a hore pah from o any v doe no decreae? Obervaion: Augmenaion may add ome edge o reidual nework or remove ome. Only he added edge ( horcu ) may poenially decreae he lengh of a hore pah. Le uppoe (,,v) i he hore decreaedlengh pah and le derive a conradicion

Number of augmenaion Why doe each edge become criical a mo ~V/ ime? Scenario for edge (u,v), for u, v {, }: Criical he fir ime: (u,v) on an augmening pah Diappear from he nework Reappear on he nework: (v,u) ha o be on an augmening pah We can how ha in beween hee even he diance from o u increaed by a lea. Thi can happen a mo V/ ime, becaue he diance from o u can never be more han V - Since here are E pair of verice wih edge in reidual nework, he oal # of criical edge during alg. execuion i O(VE) (i.e., O(VE) ieraion). Each ieraion require E work o find hore pah. Thu, we have proved ha he running ime of Edmond- Karp i O(VE ).

Defining Flow, Capaciy Acro Cu If f i a flow, hen he ne flow f(s,t) acro he cu (S,T) i defined o be: f S, T = f u, v f(v, u) u S v T The capaciy of he cu (S,T) i: u S v T c S, T = c u, v u S v T Example: 0/5 a 8/ b /9 Flow acro hi cu? 6/4 /4 c 0 9 8/ d 5/5 / Capaciy of hi cu?

Defining Flow, Capaciy Acro Cu If f i a flow, hen he ne flow f(s,t) acro he cu (S,T) i defined o be: f S, T = f u, v f(v, u) u S v T The capaciy of he cu (S,T) i: u S v T c S, T = c u, v u S v T Example: 0/5 a 8/ b /9 Flow acro hi cu? 6 6/4 /4 c 0 9 8/ d 5/5 / Capaciy of hi cu?

Defining Flow, Capaciy Acro Cu If f i a flow, hen he ne flow f(s,t) acro he cu (S,T) i defined o be: f S, T = f u, v f(v, u) u S v T The capaciy of he cu (S,T) i: u S v T c S, T = c u, v u S v T Example: 0/5 a 8/ b /9 Flow acro hi cu? 6 6/4 /4 c 0 9 8/ d 5/5 / Capaciy of hi cu?

Proving Max Flow Weak dualiy lemma: Le f be any flow, and le (S, T) be any - cu. Then he value of he flow i a mo he capaciy of he cu. Cu capaciy = 0 Flow value 0 9 5 0 4 5 5 0 5 8 6 0 S 5 4 6 5 0 4 0 7 Capaciy = 0

Flow and Cu Weak dualiy lemma: Le f be any flow. Then, for any - cu (S, T) we have f = f(s,t) cap(s, T). Proof: f = = e ou of S e ou of S e ou of S f ( e) f ( e) c( e) cap( S, T ) e ino S f ( e) S 4/8 T 6/7

Cerificae of Opimaliy Corollary: Le f be any flow, and le (S, T) be any cu. If f = cap(s, T), hen f i a max flow and (S, T) i a min cu. Value of flow = 8 Cu capaciy = 8 Flow value 8 9/9 5 0/0 0/4 /5 0/5 9/0 4/5 8/8 6 9/0 S 0/4 4/6 0/5 0/0 4/5 4 4/0 7

Max-Flow Min-Cu Theorem Augmening pah heorem: Flow f i a max flow iff here are no augmening pah. Max-flow min-cu heorem: [Ford-Fulkeron 956] The value of he max flow i equal o he value of he min cu. Proof raegy: We prove boh imulaneouly by howing he following are equal: (i) There exi a cu (S, T) uch ha f = cap(s, T). (ii) Flow f i a max flow. (iii) There i no augmening pah relaive o f. (i) (ii) Thi wa he corollary o weak dualiy lemma. (ii) (iii) We how conrapoiive. Le f be a flow. If here exi an augmening pah, hen we can improve f by ending flow along pah.

(iii) (i) Proof of Max-Flow Min-Cu Theorem Le f be a flow wih no augmening pah. Le A be e of verice reachable from in reidual graph. By definiion of S, S. By definiion of f, S. S T f = = = e ou of S e ou of S f ( e) c( e) cap( S, T ) e ino S f ( e) original nework

In-Cla Exercie # You are given a andard flow nework G = (V, E) wih ource and ink, in which each edge (u, v) E ha a poiive inegral capaciy c(u, v). We define an edge in hi flow nework o be eniive if i croe ome minimum cu (S, T) of he nework. We define an edge in hi flow nework o be auraed if i flow equal i capaciy. Are all auraed edge alo (necearily) eniive? Explain your anwer.

In-Cla Exercie # Updaing Maximum Flow: Le G = (V, E) be a flow nework wih ource, ink, and ineger capaciie. Suppoe ha we are given a maximum flow in G, and he capaciy of a ingle edge (u, v) E i decreaed by. Give an O(V + E)-ime algorihm o updae he maximum flow.

Reading Aignmen Reading aignmen for nex cla: Chaper 7 (Amorized analyi)