S Maximum Flow by Incremental Breadth First Search Sagi Hed Tel Aviv University Haim Kaplan Tel Aviv University Renato F. Werneck Microsoft Research Andrew.

Slides:



Advertisements
Similar presentations
Lecture 7. Network Flows We consider a network with directed edges. Every edge has a capacity. If there is an edge from i to j, there is an edge from.
Advertisements

S Maximum Flow by Incremental Breadth First Search Joint work with:Haim KaplanRobert E. Tarjan Tel Aviv University Princeton University & HP Labs Renato.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
This work was supported bu EU projects FP7-ICT NIFTi and FP7-ICT HUMAVIPS and the Czech project 1M0567 CAK July, 2011 EMMCVPR Center.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
The Maximum Network Flow Problem. CSE Network Flows.
1 Maximum Flow w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
Lectures on Network Flows
1 The Max Flow Problem. 2 Flow networks Flow networks are the problem instances of the max flow problem. A flow network is given by 1) a directed graph.
1 Efficient implementation of Dinic’s algorithm for maximum flow.
CS138A Network Flows Peter Schröder. CS138A Flow Networks Definitions a flow network G=(V,E) is a directed graph in which each edge (u,v)
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Lecture 4 Tuesday, 2/19/02 Graph Algorithms: Part 2 Network.
A New Approach to the Maximum-Flow Problem Andrew V. Goldberg, Robert E. Tarjan Presented by Andrew Guillory.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
The max flow problem
The max-flow problem Defined on a capacitated directed graph G=(V,E,c). The capacities are non-negative G st 11.
Flows sourcesink s t Flows sourcesink edge-weights = capacities.
3/3/ Alperovich Alexander. Motivation  Find a maximal flow over a directed graph  Source and sink vertices are given 3/3/
A New Approach to the Maximum-Flow Problem Andrew V. Goldberg, Robert E. Tarjan Presented by Andrew Guillory.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
1 Ford-Fulkerson method Ford-Fulkerson(G) f = 0 while( 9 simple path p from s to t in G f ) f := f + f p output f Runs in time O(|f max | |E|) where f.
1 The Min Cost Flow Problem. 2 The Min Cost Flow problem We want to talk about multi-source, multi-sink flows than just “flows from s to t”. We want to.
Maximum Flow Chapter 26.
Single Source Shortest-Path: The General Case (with negative edges) Bellman-Ford algorithm. Iteratively relax all edges |V|-1 times Running time? O(VE).
The minimum cost flow problem. Simplifying assumptions Network is connected (as an undirected graph). – We can consider each connected component separately.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Flow Algorithms Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms Week 9, Lecture 2.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
Algorithm Design and Analysis (ADA)
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Outline Standard 2-way minimum graph cut problem. Applications to problems in computer vision Classical algorithms from the theory literature A new algorithm.
1 Network Flow CSC401 – Analysis of Algorithms Chapter 8 Network Flow Objectives: Flow networks –Flow –Cut Maximum flow –Augmenting path –Maximum flow.
Fall 2003Maximum Flow1 w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
A directed graph G consists of a set V of vertices and a set E of arcs where each arc in E is associated with an ordered pair of vertices from V. V={0,
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
Instructor Neelima Gupta Edited by Divya Gaur(39, MCS '09) Thanks to: Bhavya(9), Deepika(10), Deepika Bisht(11) (MCS '09)
The Maximum Network Flow Problem
Preflow Push Algorithm M. Amber Hassaan. Preflow Push Algorithm2 Max Flow Problem Given a graph with “Source” and “Sink” nodes we want to compute:  The.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
The Maximum Network Flow Problem
Lectures on Network Flows
Algorithms and Networks Hans Bodlaender
Richard Anderson Lecture 23 Network Flow
Lecture 22 Network Flow, Part 2
Edmunds-Karp Algorithm: Choosing Good Augmenting Paths
Discrete Inference and Learning
Lecture 10 Network flow Max-flow and Min-cut Ford-Fulkerson method
Analysis of Algorithms
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Flow Networks and Bipartite Matching
Primal-Dual Algorithm
Complexity of Ford-Fulkerson
Algorithms (2IL15) – Lecture 7
EE5900 Advanced Embedded System For Smart Infrastructure
Lecture 21 Network Flow, Part 1
MAXIMUM flow by Eric Wengert.
Richard Anderson Lecture 22 Network Flow
Maximum Flow Neil Tang 4/8/2008
Lecture 22 Network Flow, Part 2
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

s Maximum Flow by Incremental Breadth First Search Sagi Hed Tel Aviv University Haim Kaplan Tel Aviv University Renato F. Werneck Microsoft Research Andrew V. Goldberg Microsoft Research Robert E. Tarjan Princeton University & HP Labs

Maximum Flow Input: directed graph G=(V,E), vertices s, t є V and capacity assignment c(e) for e є E Output: flow function f satisfying - conservation: for every v≠s,t Σ (u,v)єE f(u,v) = Σ (v,u)єE f(v,u) capacity:for every ef(e) ≤ c(e) with maximal |f|=sum of flow out of s (into t) Well studied problem Equivalent to the Minimum s-t Cut problem Solution methods: Augmenting Path (and blocking flow), Network Simplex, Push-Relabel

Maximum Flow in Computer Vision Graphs have specific structure Regular low degree grids Arc capacities: different models for grid arcs and s-t arcs

BK Boykov and Kolmogorov developed an algorithm (BK) which is the fastest in practice on the vision instances [Boykov, Kolmogorov 04] Used as the standard min-cut algorithm in computer vision Usually outperforms Push-Relabel implementation by considerable factors Problem: BK has no known polynomial time guarantee… Best bound is O(mnF) for integral capacities (F is the maximal flow value) Indeed on some instances, BK performs poorly and is outperformed by Push-Relabel implementation

Our Contribution IBFS We develop the IBFS algorithm – Incremental Breadth First Search Has many similarities to BK However, performs shortest path or nearly shortest path augmentations Competative in practice to BK Usually outperforms BK by small factors Has a polynomial worst case time guarantee O(mn 2 )

Augmenting Path Algorithms Augmenting path algorithms constantly maintain a flow function f, f constantly increases. When the algorithm terminates f is maximal Augmentation: add (maximal) X to flow along an s-t path Residual graph: G f = (V,E f ) E f = {(u,v) | (u,v) є E V f(u,v) 0} Extend f and c to f(v,u)=-f(u,v) and c(v,u)=0 for (u,v) є E Ford & Falkerson: augmentations in G f give maximal flow s

BK Overview Maintain trees S, T in the residual graph Iterate 3 phases: Growth, Augmentation, Adoption Growth: grow S and T bi-directionally s t ST s

BK Overview Augmentation: when the trees meet, we augment flow Adoption: after an augmentation, we try to reconnect “orphaned” sub-trees s t ST s

IBFS Overview We maintain S, T as BFS trees with heights ≈ D s, D t Augment on shortest or nearly shortest paths (+1) s t ST s shortest+1 shortest

IBFS Overview Adoption / how to rebuild the trees: If subtree reconnects at the same level, we’re done s t ST DsDs DtDt s

IBFS Overview Otherwise: Relabel: set label to lowest potential parent + 1 Make children into orphan sub-trees s t ST s

IBFS Overview BFS trees => worst case bound O(mn 2 ) (must also maintain a current arc) s s t ST

IBFS vs. BK Maintaining BFS trees => more work rebuilding the trees after each augmentation Shortest augmenting paths => less work in each augmentation Shortest augmenting paths lead to less augmentations => growth steps We get rid of the parent traversal step s

IBFS Experiments Ran on computer vision instances public benchmark [ our own creation [ BK implementation available publicly [ We compare to a modified version of BK, with the same low level optimizations as our own (≈ 20% faster) IBFS outperforms BK on all but two instances: 2 different capacity versions of the instance “bone” Factors are mostly modest. For few they are large. s

IBFS Experiments OTOrphansGrowthPushes SpeedupInstance BK IBFSBKIBFSBKIBFS digged hessi1a house anthra ; bone_subx liver babyface bone bunny-med camel-med gargoyle-med kz2-venus s Operation Counts (per vertex)

s