CS4800: Algorithms & Data Jonathan Ullman

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

Algorithm Design and Analysis

Chapter 7. Network Flow. CS 350: Winter 2018

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

CS 170: Midterm Exam II University of California at Berkeley Department of Electrical Engineering and Computer Sciences Computer Science Division

Today: Max Flow Proofs

Myriad of applications

Max Flow: Algorithms and Applications

Lecture 21. The Lovasz splitting-off lemma Topics in Combinatorial Optimization April 29th, 2004

Graphs III - Network Flow

Sparse Fault-Tolerant BFS Trees. Merav Parter and David Peleg Weizmann Institute Of Science BIU-CS Colloquium

Flows and Cuts. 1 Concepts. CS 787: Advanced Algorithms. Instructor: Dieter van Melkebeek

List Coloring Graphs

CS4445/9544 Analysis of Algorithms II Solution for Assignment 1

Problem Set 8 Solutions

Chapter 5 Consistency, Zero Stability, and the Dahlquist Equivalence Theorem

Lecture 8: Period Finding: Simon s Problem over Z N

1 Review for Lecture 2 MaxFlow

SOME RESULTS ON INFINITE POWER TOWERS

Lecture 9: Shor s Algorithm

CMPSCI 611: Advanced Algorithms

Main Reference: Sections in CLRS.

We say that a flow is feasible for G (or just feasible if the graph and capacity function in question are obvious) if

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

Algorithm Design and Analysis

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time

4. Connectivity Connectivity Connectivity. Whitney's s connectivity theorem: (G) (G) (G) for special

arxiv: v4 [math.co] 21 Sep 2014

Matching. Slides designed by Kevin Wayne.

Multicolor Sunflowers

Algorithms and Theory of Computation. Lecture 11: Network Flow

Algorithm Design and Analysis

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

arxiv: v1 [math.mg] 25 Aug 2011

CSC 373: Algorithm Design and Analysis Lecture 12

Randomized Perfect Bipartite Matching

Competitive Analysis of Task Scheduling Algorithms on a Fault-Prone Machine and the Impact of Resource Augmentation

Ecient Parallel Algorithms for Computing All Pair. University of Kentucky. Duke University

Problem set 1. (c) Is the Ford-Fulkerson algorithm guaranteed to produce an acyclic maximum flow?

Algorithms: Lecture 12. Chalmers University of Technology

Algorithms: COMP3121/3821/9101/9801

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

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

Chapter 4. The Laplace Transform Method

Network Flow. Data Structures and Algorithms Andrei Bulatov

Lecture 4 Topic 3: General linear models (GLMs), the fundamentals of the analysis of variance (ANOVA), and completely randomized designs (CRDs)

Suggested Answers To Exercises. estimates variability in a sampling distribution of random means. About 68% of means fall

LINEAR ALGEBRA METHOD IN COMBINATORICS. Theorem 1.1 (Oddtown theorem). In a town of n citizens, no more than n clubs can be formed under the rules

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

22 Max-Flow Algorithms

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

Soviet Rail Network, 1955

Convex Hulls of Curves Sam Burton

New bounds for Morse clusters

1 Motivation and Basic Definitions

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Maximum flow problem CE 377K. February 26, 2015

c n b n 0. c k 0 x b n < 1 b k b n = 0. } of integers between 0 and b 1 such that x = b k. b k c k c k

Soviet Rail Network, 1955

Network Flows: Introduction & Maximum Flow

Chapter Landscape of an Optimization Problem. Local Search. Coping With NP-Hardness. Gradient Descent: Vertex Cover

Running Time. Assumption. All capacities are integers between 1 and C.

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

Primitive Digraphs with the Largest Scrambling Index

Lecture 21 November 11, 2014

Balanced Network Flows

Flows. Chapter Circulations

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

Minimum Cost Noncrossing Flow Problem on Layered Networks

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

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Dimensional Analysis A Tool for Guiding Mathematical Calculations

The machines in the exercise work as follows:

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

Maximum Flow and Minimum Cut

Algorithm Design and Analysis

Fermi Distribution Function. n(e) T = 0 T > 0 E F

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

Graph Algorithms -2: Flow Networks. N. H. N. D. de Silva Dept. of Computer Science & Eng University of Moratuwa

Lecture 3. January 9, 2018

u t u 0 ( 7) Intuitively, the maximum principles can be explained by the following observation. Recall

7.2 INVERSE TRANSFORMS AND TRANSFORMS OF DERIVATIVES 281

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

Math Skills. Scientific Notation. Uncertainty in Measurements. Appendix A5 SKILLS HANDBOOK

Social Studies 201 Notes for November 14, 2003

List coloring hypergraphs

Chapter 7: The Laplace Transform Part 1

Singular perturbation theory

Flow Network. The following figure shows an example of a flow network:

What lies between Δx E, which represents the steam valve, and ΔP M, which is the mechanical power into the synchronous machine?

Notes on Strategic Substitutes and Complements in Global Games

Bayesian Learning, Randomness and Logic. Marc Snir

A Study on Simulating Convolutional Codes and Turbo Codes

SOLUTIONS TO ALGEBRAIC GEOMETRY AND ARITHMETIC CURVES BY QING LIU. I will collect my solutions to some of the exercises in this book in this document.

Algorithm Design and Analysis

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

Theoretical Computer Science. Optimal algorithms for online scheduling with bounded rearrangement at the end

Math 273 Solutions to Review Problems for Exam 1

Practice Problems - Week #7 Laplace - Step Functions, DE Solutions Solutions

Lecture 15 - Current. A Puzzle... Advanced Section: Image Charge for Spheres. Image Charge for a Grounded Spherical Shell

Transcription:

CS800: Algorithm & Data Jonathan Ullman Lecture 17: Network Flow Chooing Good Augmenting Path Mar 0, 018

Recap Directed graph! = #, % Two pecial node: ource & and ink = ' Edge capacitie ( ) 9 5 15 15 ource 5 8 6 t ink capacity 15 6 15 0 7

Recap An -t flow i a function * ) uch that For every ) %, 0 * ) ( ) (capacity) For every. %, 1 56 7 * ) = 1 685 69 7 * ) (conervation) The value of a flow i.:; * = * ) 1 685 69 < 0 9 5 0 15 15 0 0 0 5 8 6 t capacity flow 15 0 0 0 0 6 15 0 0 0 7

Recap MaxFlow = Find an -t flow of maximum value 9 9 5 0 1 15 15 0 9 8 9 5 8 6 t capacity flow 15 1 0 6 15 0 1 0 7

Recap An -t cut i a partition (>,?) of # with & > and '? The capacity of a cut (A,B) i (:A >,? = ( ) 1 685 69 B 9 5 15 15 ource 5 8 6 t ink capacity 15 6 15 0 7

Recap MinCut: Find an -t cut of minimum capacity 9 5 15 15 ource 5 8 6 t ink capacity 15 6 15 0 7

Ford-Fulkeron Algorithm Start with * ) = 0 for all ) % While There i an augmenting path C in the reidual graph! D Augment flow along the path C 1 0 0 0 0 0 t 0 0 0

Ford-Fulkeron Demo!: 8 6 9 5 t! * : 5 t

Ford-Fulkeron Demo!: 8 6 9 5 t! * : 5 t

Ford-Fulkeron Demo!: 8 6 9 5 t! * : 5 t

Ford-Fulkeron Demo!: 8 6 9 5 t! * : 5 t

Ford-Fulkeron Demo!: 8 6 9 5 t! * : 5 t

Summary The Ford-Fulkeron Algorithm olve maximum -t flow Running time i O(m) per augmentation tep O(val(f*)) augmentination in any graph with integer capacitie O(n) augmentation in graph with unit capacitie MaxFlow-MinCut Theorem: The value of the max -t flow equal the capacity of the min -t cut If * i a max flow, the node reachable from in! D are a min cut Given a max flow, can find a min cut in time O(n+m) via BFS

Recap Two Problem: MaxFlow: given a network G=(V,E), capacitie c(e), ource, ink t, find the -t flow of maximum value MinCut: given a network G=(V,E), capacitie c(e), ource, ink t, find the -t cut of minimum value Ford-Fulkeron Algorithm: Start with the empty flow f(e) = 0 While there i an augmenting path P in the reidual graph! D, increae f along the path

Ford-Fulkeron Algorithm Start with * ) = 0 for all ) % While There i an augmenting path C in the reidual graph! D Augment flow along the path C 1 C C 1 t C C

Chooing Good Path Lat time: arbitrary augmenting path If FF terminate, it output a maximum flow Today: clever augmenting path Maximum-capacity augmenting path ( fattet path ) Shortet augmenting path ( hortet path )

Fattet Augmenting Path

Fattet Augmenting Path Maximum-capacity augmenting path Can find the maximum-capacity augmenting path in time F G log K uing a variant of Prim or Krukal MST Exercie for the reader

Fattet Augmenting Path Arbitrary Path Aume integer capacitie Maximum-Capacity Path Aume integer capacitie Value of maxflow:. Value of aug path: 1 Flow remaining in! D :. 1 # of aug path:. Value of maxflow:. Value of aug path: Flow remaining in! D : # of aug path:

Fattet Augmenting Path * i a maximum flow with value. =.:; * C i a fattet augmenting -t path with capacity? Claim:? 7 O 8 6 9 5 9 t

Fattet Augmenting Path Arbitrary Path Aume integer capacitie Maximum-Capacity Path Aume integer capacitie Value of maxflow:. Value of aug path: 1 Flow remaining in! D :. 1 # of aug path:. Value of maxflow:. Value of aug path: Flow remaining in! D : # of aug path:

Chooing Good Path Lat time: arbitrary augmenting path If FF terminate, it output a maximum flow Today: clever augmenting path Maximum-capacity augmenting path ( fattet path ) G ln. augmenting path (auming integer capacitie) F(G Q ln K ln. ) total running time See KT for a lightly fater variant ( fat enough path ) Shortet augmenting path ( hortet path )

Shortet Augmenting Path

Shortet Augmenting Path Find the augmenting path with the fewet hop Can find hortet augmenting path in O(m) time uing BFS Theorem: for any capacitie RO Q Overall running time F G Q K Work for any capacitie! augmentation uffice Warning: proof i very tricky (you will not be teted on it)

Shortet Augmenting Path Let * S be the flow after the T-th augmenting path Let! S =! DU be the T-th reidual graph * V = 0 and! V =! Let W S. be the ditance from to v in! S Recall that the hortet path in! S move layer-by-layer 8 6 9 5 9 t

Shortet Augmenting Path Every augmentation caue at leat one edge to diappear from the reidual graph, may alo caue an edge to appear Key Property: each edge diappear at mot R Q time Mean that there are at mot OR Q augmentaiton

Shortet Augmenting Path Claim 1: for every. # and every T, W SXY. W S. Obviou for. = & becaue W S & = 0 Suppoe for the ake of contradiction that W SXY. < W S (.) Let. be the mallet uch node Let & \. be a hortet path in! SXY By optimality of the path, W SXY. = W SXY \ + 1 By aumption, W SXY \ W S \ Two Cae: \,.! S, o W S. W S \ + 1 \,.! S, o., \ wa in the T-th path, o W S. = W S \ 1

Shortet Augmenting Path Claim : If an edge \. diappear from! S and reappear in!`xy then W` \ W S \ + \. i on the T-th augmenting path, W S. = W S \ + 1. \ i on the b-th augmenting path, W` \ = W`. + 1 By Claim 1: W`. W S.

Chooing Good Path Lat time: arbitrary augmenting path If FF terminate, it output a maximum flow Today: clever augmenting path Maximum-capacity augmenting path ( fattet path ) G ln. augmenting path (auming integer capacitie) F(G Q ln K ln. ) total running time See KT for a lightly fater variant ( fat enough path ) Shortet augmenting path ( hortet path ) OR augmenting path (for any capacitie) Q F(G Q K) total running time

Summary The Ford-Fulkeron Algorithm olve maximum -t flow Different choice of augmenting path give different running time Still an active area of reearch! Can olve many problem efficiently via reduction to the maximum flow or minimum cut problem