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

Similar documents
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

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

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

Network Flow. Data Structures and Algorithms Andrei Bulatov

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

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

Main Reference: Sections in CLRS.

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

1 Motivation and Basic Definitions

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

Algorithm Design and Analysis

Graphs III - Network Flow

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

Network Flows: Introduction & Maximum Flow

Soviet Rail Network, 1955

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

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

Reminder: Flow Networks

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

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

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

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

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

Today: Max Flow Proofs

Soviet Rail Network, 1955

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

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

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

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

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

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

Competitive Routing in the Half-θ 6 -Graph

Star coloring of sparse graphs

Matching. Slides designed by Kevin Wayne.

Network Flows UPCOPENCOURSEWARE number 34414

Algorithmic Discrete Mathematics 6. Exercise Sheet

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

Algorithm Design and Analysis

Network Flow Applications

Chapter 8 Objectives

Randomized Perfect Bipartite Matching

CSE 521: Design & Analysis of Algorithms I

Algorithms. Algorithms 6.4 MAXIMUM FLOW

Fall 2014 David Wagner MT2 Soln

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

On Line Supplement to Strategic Customers in a Transportation Station When is it Optimal to Wait? A. Manou, A. Economou, and F.

Ford-Fulkerson Algorithm for Maximum Flow

Connectivity and Menger s theorems

Introduction to Congestion Games

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.

18 Extensions of Maximum Flow

Matchings in Cayley Graphs of S n. North Carolina State University, Box Abstract

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

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

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

The Rosenblatt s LMS algorithm for Perceptron (1958) is built around a linear neuron (a neuron with a linear

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)

, 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

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

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

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

EECE 301 Signals & Systems Prof. Mark Fowler

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

introduction Ford-Fulkerson algorithm

5. Biconnected Components of A Graph

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

NECESSARY AND SUFFICIENT CONDITIONS FOR LATENT SEPARABILITY

Maximum Flow in Planar Graphs

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

introduction Ford-Fulkerson algorithm

6.8 Laplace Transform: General Formulas

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

CSE 421 Introduction to Algorithms Winter The Network Flow Problem

I Let E(v! v 0 ) denote the event that v 0 is selected instead of v I The block error probability is the union of such events

16 Max-Flow Algorithms and Applications

Chapter 6. Laplace Transforms

Graph Theory: Network Flow

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

Temporal Logic Replication for Dynamically Reconfigurable FPGA Partitioning

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

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

DESIGN OF TENSION MEMBERS

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

18.03SC Unit 3 Practice Exam and Solutions

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

COMPETITIVE LOCAL ROUTING WITH CONSTRAINTS

CHAPTER 7: SECOND-ORDER CIRCUITS

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

EE Control Systems LECTURE 2

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

Maximum Flow. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Maximum Flow 1 / 27

When analyzing an object s motion there are two factors to consider when attempting to bring it to rest. 1. The object s mass 2. The object s velocity

Differential Geometry: Revisiting Curvatures

CHAPTER 6: FIRST-ORDER CIRCUITS

Routing. Elements of packet forwarding (dataplane)

Greedy algorithms. Shortest paths in weighted graphs. Tyler Moore. Shortest-paths problem. Shortest path applications.

On the usage of Sorting Networks to Big Data

Label Set Perturbation for MRF based Neuroimaging Segmentation

Transcription:

Maximm Flo χ 4/6 4/7 1/9 8/2005 4:03 AM Maximm Flo 1

Oline and Reading Flo neork Flo ( 8.1.1) C ( 8.1.2) Maximm flo Agmening pah ( 8.2.1) Maximm flo and minimm c ( 8.2.1) Ford-Flkeron algorihm ( 8.2.2-8.2.3) 8/2005 4:03 AM Maximm Flo 2

Flo Neork A flo neork (or j neork) N coni of A eighed digraph G ih nonnegaie ineger edge eigh, here he eigh of an edge e i called he capaciy c(e) of e To diingihed erice, and of G, called he orce and ink, repeciely, ch ha ha no incoming edge and ha no ogoing edge. Example: 5 6 3 1 1 2 3 7 9 5 8/2005 4:03 AM Maximm Flo 3

Flo A flo f for a neork N i i an aignmen of an ineger ale f(e) o each edge e ha aifie he folloing properie: Capaciy Rle: For each edge e, 0 f (e) c(e) Coneraion Rle: For each erex, here E () and E + () are he incoming and ogoing edge of, rep. The ale of a flo f, denoed f, i he oal flo from he orce, hich i he ame a he oal flo ino he ink Example: 2/6 f ( e) = + 8/2005 4:03 AM Maximm Flo 4 3/7 2/9 e E ( ) 4/5 e E ( ) f ( e)

Maximm Flo A flo for a neork N i aid o be maximm if i ale i he large of all flo for N The maximm flo problem coni of finding a maximm flo for a gien neork N 2/6 3/7 2/9 4/5 Flo of ale 8 = 2 + 3 + 3 = 1 + 3 + 4 Applicaion 4/6 Hydralic yem 3/7 Elecrical circi Traffic moemen 2/9 4/5 Freigh ranporaion Maximm flo of ale 10 = 4 + 3 + 3 = 3 + 3 + 4 8/2005 4:03 AM Maximm Flo 5

C A c of a neork N ih orce and ink i a pariion χ = (V,V ) of he erice of N ch ha V and V Forard edge of c χ: origin in V and deinaion in V Backard edge of c χ: origin in V and deinaion in V Flo f(χ) acro a c χ: oal flo of forard edge min oal flo of backard edge Capaciy c(χ) of a c χ: oal capaciy of forard edge Example: c(χ) = 24 f(χ) = 8 8/2005 4:03 AM Maximm Flo 6 5 6 2/6 χ χ 3 1 1 2 3 7 9 3/7 2/9 5 4/5

Flo and C Lemma: The flo f(χ) acro any c χ i eqal o he flo ale f Lemma: The flo f(χ) acro a c χ i le han or eqal o he capaciy c(χ) of he c Theorem: The ale of any flo i le han or eqal o he capaciy of any c, i.e., for any flo f and any c χ, e hae f c(χ) 2/6 χ 1 χ 2 3/7 2/9 4/5 c(χ 1 ) = 12 = 6 + 3 + 1 + 2 c(χ 2 ) = 21 = 3 + 7 + 9 + 2 f = 8 8/2005 4:03 AM Maximm Flo 7

Agmening Pah Conider a flo f for a neork N Le e be an edge from o : Reidal capaciy of e from o : f (, ) = c(e) f (e) Reidal capaciy of e from o : f (, ) = f (e) Le π be a pah from o The reidal capaciy f (π) of π i he malle of he reidal capaciie of he edge of π in he direcion from o A pah π from o i an agmening pah if f (π) > 0 8/2005 4:03 AM Maximm Flo 8 2/5 2/6 π 2/7 2/9 f (,) = 3 f (,) = 1 f (,) = 1 f (,) = 2 f (π) = 1 f = 7 4/5

Flo Agmenaion Lemma: Le π be an agmening pah for flo f in neork N. There exi a flo f for N of ale f = f + f (π) Proof: We compe flo f by modifying he flo on he edge of π Forard edge: f (e) = f(e) + f (π) Backard edge: f (e) = f(e) f (π) 8/2005 4:03 AM Maximm Flo 9 2/5 2/6 2/6 π π 2/7 2/9 f (π) = 1 2/3 2/7 2/9 4/5 4/5 f = 7 f = 8

Ford-Flkeron Algorihm Iniially, f(e) = 0 for each edge e Repeaedly Search for an agmening pah π Agmen by f (π) he flo along he edge of π A pecialiaion of DFS (or BFS) earche for an agmening pah An edge e i raered from o proided f (, ) > 0 Algorihm FordFlkeronMaxFlo(N) for all e G.edge() eflo(e, 0) hile G ha an agmening pah π { compe reidal capaciy of π } for all edge e π { compe reidal capaciy δ of e } if e i a forard edge of π δ gecapaciy(e) geflo(e) ele { e i a backard edge } δ geflo(e) if δ < δ { agmen flo along π } for all edge e π if e i a forard edge of π eflo(e, geflo(e) + ) ele { e i a backard edge } eflo(e, geflo(e) ) 8/2005 4:03 AM Maximm Flo 10

Max-Flo and Min-C Terminaion of Ford-Flkeron algorihm There i no agmening pah from o ih repec o he crren flo f Define V e of erice reachable from by agmening pah V e of remaining erice C χ = (V,V ) ha capaciy c(χ) = f Forard edge: f(e) = c(e) Backard edge: f(e) = 0 Th, flo f ha maximm ale and c χ ha minimm capaciy Theorem: The ale of a maximm flo i eqal o he capaciy of a minimm c 4/6 χ 4/7 1/9 c(χ) = f = 10 8/2005 4:03 AM Maximm Flo 11

8/2005 4:03 AM Maximm Flo 12 Example (1) 0/3 0/9 0/3 1/7 0/6 0/5 0/2 0/9 0/3 1/7 0/6 1/2 0/9 0/3 2/7 1/6 1/2 2/3 0/9 2/7 1/6 1/2

Example (2) 3/6 2/3 1/2 2/7 0/9 4/6 3/7 1/9 2/5 1/2 o ep 3/6 4/6 2/7 1/9 2/5 1/2 4/7 1/9 8/2005 4:03 AM Maximm Flo 13

Analyi In he or cae, Ford- Flkeron algorihm perform f* flo agmenaion, here f* i a maximm flo Example The agmening pah fond alernae beeen π 1 and π 2 The algorihm perform 100 agmenaion Finding an agmening pah and agmening he flo ake O(n + m) ime The rnning ime of Ford- Flkeron algorihm i O( f* (n + m)) 8/2005 4:03 AM Maximm Flo 14 0/50 0 0/50 0 π 1 π 2 0 0 0 0