Preflow-Push Algorithm

Size: px
Start display at page:

Download "Preflow-Push Algorithm"

Transcription

1 Preflow-Push Algorithm An s-t preflow obeys the following constraints: Capacity constraints: 0 f(e) c(e) e f (v) = f (u,v) f (v,w) 0 u V w V A labeling h assigns nonnegative integers to vertices. h(t) = 0, h(s) = n, h(u) 0 for all other vertices u in V. A labeling h is compatible with an s-t preflow f if: h(t) = 0, h(s) = n. for all edges (v,w) in E f, h(v) h(w) + 1.

2 Initial preflow f assigns f(e) = c(e) for each edge leaving s, and f(e) = 0 for all other edges. Initial labeling h assigns h(t) = 0, h(s) = n. Initial preflow f and labeling h are compatible. Lemma 1. There is no s-t path in G f if s-t preflow f is compatible with labeling h. Lemma 2. If s-t flow f is compatible with labeling h, then f is a flow of maximum value. 2

3 Copyright 2005 Pearson Addison-Wesley. All rights reserved

4 Algorithm 7.4, page 360 Copyright 2005 Pearson Addison-Wesley. All rights reserved

5 Algorithm 7.5, page 360 Copyright 2005 Pearson Addison-Wesley. All rights reserved

6 Lemma 3. Throughout the preflow-push algorithm, the preflow f and the labeling h are compatible. Pf. When push operation is performed from vertex u to vertex v, the edge (v,u) can appear in G f. h(v) h(u) + 1. Why? When relabel operation is performed on vertex u, h(u) < h(v) for all edges (u,v) in E f. Why? For any edge (v,u) in E f, h(v) Why? h(u) + 1 after the relabel operation. 6

7 Algorithm 7.6, page 360 Copyright 2005 Pearson Addison-Wesley. All rights reserved

8 Preflow-Push Algorithm Analysis Lemma 4. If vertex v has excess preflow e f (v) then there is a path from v to s in G f. Pf. Let all vertices w such that there is a path in G f from w to s be in set A. The remaining vertices are put in set B. There can be no positive flow f(e) on any edge (u,v) in G f going out of set A. Why? Consider the sum of all excess in vertices in set B. (v) 0 e in out f = f (v) f (v). v B v B There can be no positive flow into B. This implies that each excess in B is 0. Why? 8

9 Preflow-Push Algorithm Analysis Number of relabel operations: Any vertex v in V can have label h(v) at most 2n 1. Why? Consider a vertex v with excess. v s can be changed only by a relabel operation. This there is a path in G f from v to s. This implies that the label of v can be at most 2n 1. Thus the total number of relabel operations is at most 2n 2. 9

10 Number of saturating pushes: (A push is saturating is it saturates the edge) When a push occurs along edge (u,v), the edge dissappears from G f. It can reappear only after a push along edge (v,u). But the label of vertex v must have increased by at least 2 for that to happen. Why? Thus vertex v can participate at most (2n 1)/2 times in push along edge (u,v). Therefore there are at most 2mn saturating pushes. 10

11 Copyright 2005 Pearson Addison-Wesley. All rights reserved

12 Number of nonsaturating pushes: Let φ( f,h) = h(v) v:e f >0 be the sum of the heights of all vertices with excess. A nonsaturating push decreases φ( f,h) by at least 1. Why? A relabel operation increases φ( f,h) by at most 1. There are at most 2n 2 relabel operations. Each saturating push increases φ( f,h) There are at most 2nm saturating pushes. by at most 2n 1. Why? Thus φ( f,h) increases by at most 4mn 2. Since φ( f,h) is nonnegative, and decreases by at least for each nonsaturating push, there are at most 4mn 2 nonsaturating pushes. 12

13 Implementation Data Structure: All vertices with excess can be placed in a list. Choosing a vertex on this list, as well as updating the list (when a vertex with excess no longer has excess, or a new vertex with excess has to be added) can be done in O(1) time. Why? In the Ford-Fulkerson Algorithm, choosing the right augmenting path lead to a better algorithm. Similarly, in the Preflow-Push Algorithm, can choosing the right vertex with excess lead to a better algorithm? Choose the vertex with maximum height. 13

14 Choosing vertex with maximum height Algorithm: At each stage, a vertex with excess at maximum height is chosen for a push operation. What is an upper bound on the number of nonsaturating push operations? The maximum number of relabel operations is 2n 2. Therefore the total increase in height is at most 2n 2. Therefore the number of times the maximum height H changes is at most 4n 2. Each vertex can have at most one nonsaturating push operation at a given H. Why? Therefore the maximum number of nonsaturating push operations at a given H is at most n. Therefore the maximum number of nonsaturating push operations in total is at most 4n 3. 14

15 Data Structure: Maintain a (doubly-linked) list of all heights. For a given height, maintain a list of all vertices with excess. Maintain an adjacency list representation of the graph, with both forward edges (as in the original graph G) and backward edges (which can arise in the residual graph). For each forward (backward) edge, maintain a pointer to the backward (forward) edge. Also keep the flow value f, as well as the capacity of the edge. The above data structure and the initial flow and labeling can be constructed in O(m) time. 15

16 A pointer to the list with maximum height can be maintained. This can be used to choose a vertex with excess at maximum height. Once a vertex v is chosen, how is an edge for push chosen? For each vertex, all the edges adjacent on it are maintained in some arbitrary order in a list. For each such list, a pointer current(v) points to the current edge considered for push. When a vertex with excess (at maximum height) is chosen for push, the edge pointed to by current(v) is chosen for push. After nonsaturating push, current(v) points to the same edge. After saturating push, current(v) points to the next edge in the list. If we come to the end of the list, then current(v) is reset to the start of the list. 16

17 Algorithm: Choose a vertex v at maximum height. Choose edge pointed to by current(v) to push flow. Update current(v) by advancing if push saturating. Continue with vertex v if push saturating. If push nonsaturating, choose another vertex at maximum height H (if possible) or go to height H-1 to choose another vertex. If no other vertex at H, then there is a vertex with excess flow at H-1. Why? Relabel v if push saturating, and current(v) advances to end of list. After relabeling v, reset current(v) to start of list. 17

18 Lemma 5. After current(v) is advanced from edge (v,w) to next edge in list, push cannot be applied to edge (v,w) until v gets relabeled. Pf. If a push occurred on edge (v,w), then current(v) stays with edge (v,w) if push is nonsaturating. It will be used again if v gets relabeled. If the push was saturating, then the edge dissappears, and reappears only after v gets relabeled. Why? If no push occurred, and current(v) advances to the next edge in list, then edge (v,w) not present in G f. Either (v,w) is saturated (and v has to be relabeled to reappear), or h(v) relabeled for edge to reappear in G f. h(w). Againv has to get 18

19 Running time Analysis: Each time a vertex gets relabeled, current(v) reset to start of list. Total number of times a vertex can get relabeled is at most 2n. Total number of times current(v) gets advanced is 2nd v (where d v is the number edges adjacent to v). Total number of times current gets advanced (for all vertices) is at most 2n = O(mn). d v v V Total number of nonsaturating push operations is O(n 3 ). Therefore total running time is O(n 3 ). 19

20 Copyright 2005 Pearson Addison-Wesley. All rights reserved

21 Copyright 2005 Pearson Addison-Wesley. All rights reserved

Today. Maximum flow. Maximum flow. Problem

Today. Maximum flow. Maximum flow. Problem 5 Maximum Flow (slides 1 4) Today Maximum flow Algorithms and Networks 2008 Maximum flow problem Applications Briefly: Ford-Fulkerson; min cut max flow theorem Preflow push algorithm Lift to front algorithm

More information

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013

Tutorial for Algorithm s Theory Problem Set 5. January 17, 2013 Tutorial for Algorithm s Theory Problem Set 5 January 17, 2013 Exercise 1: Maximum Flow Algorithms Consider the following flow network: a) Solve the maximum flow problem on the above network by using the

More information

CS261: Problem Set #1

CS261: Problem Set #1 CS261: Problem Set #1 Due by 11:59 PM on Tuesday, April 21, 2015 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Turn in your solutions by

More information

Lecture 4. 1 Overview. 2 Preflows. COMPSCI 532: Design and Analysis of Algorithms September 4, 2015

Lecture 4. 1 Overview. 2 Preflows. COMPSCI 532: Design and Analysis of Algorithms September 4, 2015 COMPSCI 532: Design and Analysis of Algorithms September 4, 2015 Lecture 4 Lecturer: Debmalya Panigrahi Scribe: Allen Xiao 1 Overview In this lecture we will introduce the current fastest strongly polynomial

More information

CS261: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow

CS261: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow CS26: A Second Course in Algorithms Lecture #3: The Push-Relabel Algorithm for Maximum Flow Tim Roughgarden January 2, 206 Motivation The maximum flow algorithms that we ve studied so far are augmenting

More information

Maximum Flow Algorithms

Maximum Flow Algorithms Maximum Flow Algorithms Network Algorithms Georgia Kaouri Contents Applications, special cases Flow networks Ford Fulkerson algorithm Preflow push algorithms Lift to front algorithm Material flows Applications

More information

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748 COT 6936: Topics in Algorithms! Giri Narasimhan ECS 254A / EC 2443; Phone: x3748 giri@cs.fiu.edu http://www.cs.fiu.edu/~giri/teach/cot6936_s12.html https://moodle.cis.fiu.edu/v2.1/course/view.php?id=174

More information

1 Introduction. 2 The Generic Push-Relabel Algorithm. Improvements on the Push-Relabel Method: Excess Scaling. 2.1 Definitions CMSC 29700

1 Introduction. 2 The Generic Push-Relabel Algorithm. Improvements on the Push-Relabel Method: Excess Scaling. 2.1 Definitions CMSC 29700 CMSC 9700 Supervised Reading & Research Week 6: May 17, 013 Improvements on the Push-Relabel Method: Excess Scaling Rahul Mehta 1 Introduction We now know about both the methods based on the idea of Ford

More information

16.1 Maximum Flow Definitions

16.1 Maximum Flow Definitions 5-499: Parallel Algorithms Lecturer: Guy Blelloch Topic: Graphs IV Date: March 5, 009 Scribe: Bobby Prochnow This lecture describes both sequential and parallel versions of a maximum flow algorithm based

More information

instead of waiting till hit sink to augment, augment a s a d v ance augment ( v w ) amount is min of ow r e a c hing v and (v w ) \unaugment" when ret

instead of waiting till hit sink to augment, augment a s a d v ance augment ( v w ) amount is min of ow r e a c hing v and (v w ) \unaugment when ret Makeup 3:30{5 on 10/15 1 Push-Relabel Goldberg Tarjan. (earlier work by Karzanov, Dinic) Two \improvements" on blocking ows: be lazy: update distance labels only when necessary make y our work count: instead

More information

g(s, w) g(w, s) (in gross model).

g(s, w) g(w, s) (in gross model). 1 Maximum Flow 1.1 Definitions Tarjan: Data Structures and Network Algorithms Ford and Fulkerson, Flows in Networks, 1962 (paper 1956) Ahuja, Magnanti, Orlin Network Flows. Problem: do min-cost. Problem:

More information

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn Graphs Extremely important concept in computer science Graph, : node (or vertex) set : edge set Simple graph: no self loops, no multiple

More information

Maximum Flow. Flow Networks. Flow Networks Ford-Fulkerson Method Edmonds-Karp Algorithm Push-Relabel Algorithms. Example Flow Network

Maximum Flow. Flow Networks. Flow Networks Ford-Fulkerson Method Edmonds-Karp Algorithm Push-Relabel Algorithms. Example Flow Network Flow Networks Ford-Fulkerson Method Edmonds-Karp Algorithm Push-Relabel Algorithms Maximum Flow Flow Networks A flow network is a directed graph where: Each edge (u,v) has a capacity c(u,v) 0. If (u,v)

More information

A Lock-free Multi-threaded Algorithm for the Maximum Flow Problem

A Lock-free Multi-threaded Algorithm for the Maximum Flow Problem A Lock-free Multi-threaded Algorithm for the Maximum Flow Problem Bo Hong Drexel University, Philadelphia, PA 19104 bohong@coe.drexel.edu Abstract The maximum flow problem is an important graph problem

More information

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

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 7 Network Flow Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 * 7.13 Assignment Problem Assignment Problem Assignment problem. Input: weighted, complete bipartite

More information

Cuts, Connectivity, and Flow

Cuts, Connectivity, and Flow Cuts, Connectivity, and Flow Vertex Cut and Connectivity A separating set or vertex cut of a graph G is a set S V(G) such that G S G S has more than one component A graph G is k-connected if every vertex

More information

Lecture 6: Shortest distance, Eulerian cycles, Maxflow

Lecture 6: Shortest distance, Eulerian cycles, Maxflow DD2458, Problem Solving and Programming Under Pressure Lecture 6: Shortest distance, Eulerian cycles, Maxflow Date: 2008-10-06 Scribe(s): Adam Kull, David Vuorio Lecturer: Douglas Wikström 1 Shortest path

More information

Network Flows. 1. Flows deal with network models where edges have capacity constraints. 2. Shortest paths deal with edge costs.

Network Flows. 1. Flows deal with network models where edges have capacity constraints. 2. Shortest paths deal with edge costs. Network Flows. Flows deal with network models where edges have capacity constraints. 2. Shortest paths deal with edge costs. 4 u v 2 5 s 6 5 t 4 x 2 y 3 3. Network flow formulation: A network G = (V, E).

More information

Final Exam. Jonathan Turner 5/12/2010. CS 542 Advanced Data Structures and Algorithms

Final Exam. Jonathan Turner 5/12/2010. CS 542 Advanced Data Structures and Algorithms CS 542 Advanced Data Structures and Algorithms Final Exam Jonathan Turner 5/12/2010 1. (10 points) In the analysis that establishes an O(log log n) bound on the amortized time per operation for the partition

More information

Jessica Su (some parts copied from CLRS / last quarter s notes)

Jessica Su (some parts copied from CLRS / last quarter s notes) 1 Max flow Consider a directed graph G with positive edge weights c that define the capacity of each edge. We can identify two special nodes in G: the source node s and the sink node t. We want to find

More information

Network Design and Optimization course

Network Design and Optimization course Effective maximum flow algorithms Modeling with flows Network Design and Optimization course Lecture 5 Alberto Ceselli alberto.ceselli@unimi.it Dipartimento di Tecnologie dell Informazione Università degli

More information

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching

Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Reducing Directed Max Flow to Undirected Max Flow and Bipartite Matching Henry Lin Division of Computer Science University of California, Berkeley Berkeley, CA 94720 Email: henrylin@eecs.berkeley.edu Abstract

More information

Minimum Cost Edge Disjoint Paths

Minimum Cost Edge Disjoint Paths Minimum Cost Edge Disjoint Paths Theodor Mader 15.4.2008 1 Introduction Finding paths in networks and graphs constitutes an area of theoretical computer science which has been highly researched during

More information

Lecture 11: Maximum flow and minimum cut

Lecture 11: Maximum flow and minimum cut Optimisation Part IB - Easter 2018 Lecture 11: Maximum flow and minimum cut Lecturer: Quentin Berthet 4.4. The maximum flow problem. We consider in this lecture a particular kind of flow problem, with

More information

Workshop In Advanced Data Structures Push-Relabel Heuristics. Maya Orshizer Sagi Hed

Workshop In Advanced Data Structures Push-Relabel Heuristics. Maya Orshizer Sagi Hed Workshop In Advanced Data Structures Push-Relabel Heuristics Maya Orshizer Sagi Hed 1 Contents 1 Overview And Goals 3 2 Our Implementation Of Push Relabel 3 2.1 Definitions...............................

More information

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

CSE 417 Network Flows (pt 3) Modeling with Min Cuts CSE 417 Network Flows (pt 3) Modeling with Min Cuts Reminders > HW6 is due on Friday start early bug fixed on line 33 of OptimalLineup.java: > change true to false Review of last two lectures > Defined

More information

Network Flow I. Lecture Overview The Network Flow Problem

Network Flow I. Lecture Overview The Network Flow Problem Lecture Network Flow I. Overview In these next two lectures we are going to talk about an important algorithmic problem called the Network Flow Problem. Network flow is important because it can be used

More information

ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED NETWORK

ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED NETWORK ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED NETWORK Nguyen Dinh Lau 1, Tran Quoc Chien 1, Phan Phu Cuong 2 and Le Hong Dung 3 1 University of Danang, Danang, Vietnam 2

More information

CS261: Problem Set #2

CS261: Problem Set #2 CS261: Problem Set #2 Due by 11:59 PM on Tuesday, February 9, 2016 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Submission instructions:

More information

Single Source Shortest Path: The Bellman-Ford Algorithm. Slides based on Kevin Wayne / Pearson-Addison Wesley

Single Source Shortest Path: The Bellman-Ford Algorithm. Slides based on Kevin Wayne / Pearson-Addison Wesley Single Source Shortest Path: The Bellman-Ford Algorithm Slides based on Kevin Wayne / Pearson-Addison Wesley Single Source Shortest Path Problem Shortest path network. Directed graph G = (V, E, w). Weight

More information

Lecture 3: Graphs and flows

Lecture 3: Graphs and flows Chapter 3 Lecture 3: Graphs and flows Graphs: a useful combinatorial structure. Definitions: graph, directed and undirected graph, edge as ordered pair, path, cycle, connected graph, strongly connected

More information

MAS SAUSETT INSTITUTE -;: S--OF: ;.i:-; zt :: E C H O:G : I., d , :, n0x f,. f;.v t 00 : : : 0 X a < er : : c : , : -. i... -; -I,.

MAS SAUSETT INSTITUTE -;: S--OF: ;.i:-; zt :: E C H O:G : I., d , :, n0x f,. f;.v t 00 : : : 0 X a < er : : c : , : -. i... -; -I,. ; ; : 0 X a < er : : : tt~~~~~~~~~ -. - it _.r)-1. -- ::- I :I.0-, - I -. i... -; -I,.1 i I l I- --... 1. i..- c : i : -;. -, : - c,-. --- ii i -i I,1:i ;. I:-. - ',:' : -.. I. i :- ; :.- -I: : i i :,

More information

Math 5490 Network Flows

Math 5490 Network Flows Math 590 Network Flows Lecture 7: Preflow Push Algorithm, cont. Stephen Billups University of Colorado at Denver Math 590Network Flows p./6 Preliminaries Optimization Seminar Next Thursday: Speaker: Ariela

More information

CSC 8301 Design & Analysis of Algorithms: Linear Programming

CSC 8301 Design & Analysis of Algorithms: Linear Programming CSC 8301 Design & Analysis of Algorithms: Linear Programming Professor Henry Carter Fall 2016 Iterative Improvement Start with a feasible solution Improve some part of the solution Repeat until the solution

More information

Chapter 4. Greedy Algorithms. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 4. Greedy Algorithms. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 4 Greedy Algorithms Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 4.5 Minimum Spanning Tree Minimum Spanning Tree Minimum spanning tree. Given a connected

More information

Solution for Homework set 3

Solution for Homework set 3 TTIC 300 and CMSC 37000 Algorithms Winter 07 Solution for Homework set 3 Question (0 points) We are given a directed graph G = (V, E), with two special vertices s and t, and non-negative integral capacities

More information

CSE 417 Network Flows (pt 4) Min Cost Flows

CSE 417 Network Flows (pt 4) Min Cost Flows CSE 417 Network Flows (pt 4) Min Cost Flows Reminders > HW6 is due Monday Review of last three lectures > Defined the maximum flow problem find the feasible flow of maximum value flow is feasible if it

More information

Network Flow. November 23, CMPE 250 Graphs- Network Flow November 23, / 31

Network Flow. November 23, CMPE 250 Graphs- Network Flow November 23, / 31 Network Flow November 23, 2016 CMPE 250 Graphs- Network Flow November 23, 2016 1 / 31 Types of Networks Internet Telephone Cell Highways Rail Electrical Power Water Sewer Gas... CMPE 250 Graphs- Network

More information

Parametric Maximum Flow Problem: Techniques and Algorithms. Deepika Sareen, Dr Deepak Garg. Thapar University, Patiala

Parametric Maximum Flow Problem: Techniques and Algorithms. Deepika Sareen, Dr Deepak Garg. Thapar University, Patiala Parametric Maximum Flow Problem: Techniques and Algorithms Deepika Sareen, Dr Deepak Garg Thapar University, Patiala sareendeepika@yahoo.co.in, dgarg@thapar.edu Abstract We encounter many different types

More information

and 6.855J March 6, Maximum Flows 2

and 6.855J March 6, Maximum Flows 2 5.08 and.855j March, 00 Maximum Flows Network Reliability Communication Network What is the maximum number of arc disjoint paths from s to t? How can we determine this number? Theorem. Let G = (N,A) be

More information

arxiv: v2 [cs.dm] 28 Dec 2010

arxiv: v2 [cs.dm] 28 Dec 2010 Multiple-source multiple-sink maximum flow in planar graphs Yahav Nussbaum arxiv:1012.4767v2 [cs.dm] 28 Dec 2010 Abstract In this paper we show an O(n 3/2 log 2 n) time algorithm for finding a maximum

More information

Shortest Paths: Basics. Algorithms and Networks 2016/2017 Johan M. M. van Rooij Hans L. Bodlaender

Shortest Paths: Basics. Algorithms and Networks 2016/2017 Johan M. M. van Rooij Hans L. Bodlaender Shortest Paths: Basics Algorithms and Networks 2016/2017 Johan M. M. van Rooij Hans L. Bodlaender 1 Shortest path problem(s) Undirected single-pair shortest path problem Given a graph G=(V,E) and a length

More information

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department CS473-Algorithms I Lecture 3-A Graphs Graphs A directed graph (or digraph) G is a pair (V, E), where V is a finite set, and E is a binary relation on V The set V: Vertex set of G The set E: Edge set of

More information

7. NETWORK FLOW II. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne

7. NETWORK FLOW II. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne 7. NETWORK FLOW II Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 203 Kevin Wayne http://www.cs.princeton.edu/~wayne/kleinberg-tardos bipartite matching disjoint paths extensions

More information

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms

Source. Sink. Chapter 10: Iterative Programming Maximum Flow Problem. CmSc250 Intro to Algorithms Chapter 10: Iterative Programming Maximum Flow Problem CmSc20 Intro to Algorithms A flow network is a model of a system where some material is produced at its source, travels through the system, and is

More information

Network flows and Menger s theorem

Network flows and Menger s theorem Network flows and Menger s theorem Recall... Theorem (max flow, min cut strong duality). Let G be a network. The maximum value of a flow equals the minimum capacity of a cut. We prove this strong duality

More information

Shortest Paths: Algorithms for standard variants. Algorithms and Networks 2017/2018 Johan M. M. van Rooij Hans L. Bodlaender

Shortest Paths: Algorithms for standard variants. Algorithms and Networks 2017/2018 Johan M. M. van Rooij Hans L. Bodlaender Shortest Paths: Algorithms for standard variants Algorithms and Networks 2017/2018 Johan M. M. van Rooij Hans L. Bodlaender 1 Shortest path problem(s) Undirected single-pair shortest path problem Given

More information

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch. Iterative Improvement Algorithm design technique for solving optimization problems Start with a feasible solution Repeat the following step until no improvement can be found: change the current feasible

More information

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs CMPUT 675: Topics in Algorithms and Combinatorial Optimization (Fall 2009) Lecture 10,11: General Matching Polytope, Maximum Flow Lecturer: Mohammad R Salavatipour Date: Oct 6 and 8, 2009 Scriber: Mohammad

More information

What is a minimal spanning tree (MST) and how to find one

What is a minimal spanning tree (MST) and how to find one What is a minimal spanning tree (MST) and how to find one A tree contains a root, the top node. Each node has: One parent Any number of children A spanning tree of a graph is a subgraph that contains all

More information

LECTURES 3 and 4: Flows and Matchings

LECTURES 3 and 4: Flows and Matchings LECTURES 3 and 4: Flows and Matchings 1 Max Flow MAX FLOW (SP). Instance: Directed graph N = (V,A), two nodes s,t V, and capacities on the arcs c : A R +. A flow is a set of numbers on the arcs such that

More information

Problem Set 7 Solutions

Problem Set 7 Solutions Design and Analysis of Algorithms March 0, 2015 Massachusetts Institute of Technology 6.046J/18.410J Profs. Erik Demaine, Srini Devadas, and Nancy Lynch Problem Set 7 Solutions Problem Set 7 Solutions

More information

Stable Flows over Time

Stable Flows over Time Stable Flows over Time Ágnes Cseh Jannik Matuschke Martin Skutella Preprint 023-2012 July 10, 2012 Abstract In this paper, the notion of stability is extended to network flows over time. As a useful device

More information

Sublinear-Time Parallel Algorithms. for Matching and Related Problems. Andrew V. Goldberg y. Stanford University. Stanford, CA 94305

Sublinear-Time Parallel Algorithms. for Matching and Related Problems. Andrew V. Goldberg y. Stanford University. Stanford, CA 94305 Sublinear-Time Parallel Algorithms for Matching and Related Problems Andrew V. Goldberg y Department of Computer Science Stanford University Stanford, CA 94305 Serge A. Plotkin z Department of Computer

More information

Contents. shortest paths. Notation. Shortest path problem. Applications. Algorithms and Networks 2010/2011. In the entire course:

Contents. shortest paths. Notation. Shortest path problem. Applications. Algorithms and Networks 2010/2011. In the entire course: Content Shortet path Algorithm and Network 21/211 The hortet path problem: Statement Verion Application Algorithm (for ingle ource p problem) Reminder: relaxation, Dijktra, Variant of Dijktra, Bellman-Ford,

More information

Syllabus. simple: no multi-edges undirected edges in-/out-/degree /0: absent 1: present (strongly) connected component subgraph, induced graph

Syllabus. simple: no multi-edges undirected edges in-/out-/degree /0: absent 1: present (strongly) connected component subgraph, induced graph Introduction to Algorithms Syllabus Recap on Graphs: un/directed, weighted Shortest Paths: single-source, all-pairs Minimum Spanning Tree: Prim, Kruskal Maximum Flow: Ford-Fulkerson, Edmonds-Karp Maximum

More information

An example of LP problem: Political Elections

An example of LP problem: Political Elections Linear Programming An example of LP problem: Political Elections Suppose that you are a politician trying to win an election. Your district has three different types of areas: urban, suburban, and rural.

More information

Lecture and notes by: Sarah Fletcher and Michael Xu November 3rd, Multicommodity Flow

Lecture and notes by: Sarah Fletcher and Michael Xu November 3rd, Multicommodity Flow Multicommodity Flow 1 Introduction Suppose we have a company with a factory s and a warehouse t. The quantity of goods that they can ship from the factory to the warehouse in a given time period is limited

More information

so when retreat on edge, can \delete" edge when vertex has no outgoing arcs, know it is blocked when augment along path, can also \delete" edges so to

so when retreat on edge, can \delete edge when vertex has no outgoing arcs, know it is blocked when augment along path, can also \delete edges so to advance: follow some outgoing edge from current v ertex eventually, r e a c h sink: augment along current path seems much l i k e aug path algorithm but can save info since don't create residual arcs No

More information

Solutions for the Exam 6 January 2014

Solutions for the Exam 6 January 2014 Mastermath and LNMB Course: Discrete Optimization Solutions for the Exam 6 January 2014 Utrecht University, Educatorium, 13:30 16:30 The examination lasts 3 hours. Grading will be done before January 20,

More information

Outline: Finish uncapacitated simplex method Negative cost cycle algorithm The max-flow problem Max-flow min-cut theorem

Outline: Finish uncapacitated simplex method Negative cost cycle algorithm The max-flow problem Max-flow min-cut theorem Outline: Finish uncapacitated simplex method Negative cost cycle algorithm The max-flow problem Max-flow min-cut theorem Uncapacitated Networks: Basic primal and dual solutions Flow conservation constraints

More information

Mathematics for Decision Making: An Introduction. Lecture 18

Mathematics for Decision Making: An Introduction. Lecture 18 Mathematics for Decision Making: An Introduction Lecture 18 Matthias Köppe UC Davis, Mathematics March 5, 2009 18 1 Augmenting Circuit Algorithm for Min Cost Flow Augmenting Circuit Algorithm, Kantoróvich

More information

SEQUENTIAL AND PARALLEL ALGORITHMS FOR MINIMUM FLOWS

SEQUENTIAL AND PARALLEL ALGORITHMS FOR MINIMUM FLOWS J. Appl. Math. & Computing Vol. 15(2004), No. 1-2, pp. 53-75 SEQUENTIAL AND PARALLEL ALGORITHMS FOR MINIMUM FLOWS ELEONOR CIUREA AND LAURA CIUPALĂ Abstract. First, we present two classes of sequential

More information

Test 1 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. 2 points each t 1

Test 1 Last 4 Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. 2 points each t 1 CSE 0 Name Test Fall 00 Last Digits of Mav ID # Multiple Choice. Write your answer to the LEFT of each problem. points each t. What is the value of k? k=0 A. k B. t C. t+ D. t+ +. Suppose that you have

More information

Stereo Matching and Graph Cuts

Stereo Matching and Graph Cuts 21 Stereo Matching and Graph Cuts Ayman Zureiki 1,2, Michel Devy 1,2 and Raja Chatila 1,2 1 CNRS; LAAS; 7 avenue du Colonel Roche, F-31077 Toulouse, 2 Université de Toulouse; UPS, INSA, INP, ISAE; LAAS-CNRS

More information

Homework 3 Solutions

Homework 3 Solutions CS3510 Design & Analysis of Algorithms Section A Homework 3 Solutions Released: 7pm, Wednesday Nov 8, 2017 This homework has a total of 4 problems on 4 pages. Solutions should be submitted to GradeScope

More information

Parallel Breadth First Search

Parallel Breadth First Search CSE341T/CSE549T 11/03/2014 Lecture 18 Parallel Breadth First Search Today, we will look at a basic graph algorithm, breadth first search (BFS). BFS can be applied to solve a variety of problems including:

More information

Maximum flows & Maximum Matchings

Maximum flows & Maximum Matchings Chapter 9 Maximum flows & Maximum Matchings This chapter analyzes flows and matchings. We will define flows and maximum flows and present an algorithm that solves the maximum flow problem. Then matchings

More information

Implementation of Hopcroft s Algorithm

Implementation of Hopcroft s Algorithm Implementation of Hopcroft s Algorithm Hang Zhou ENS 7 January 2009 Hang Zhou (ENS) Hopcroft s Algorithm 7 January 2009 1 / 24 1 Introduction 2 Data Structures 3 Analysis of Time Complexity Hang Zhou (ENS)

More information

Smoothed Analysis of the Minimum-Mean Cycle Canceling Algorithm and the Network Simplex Algorithm

Smoothed Analysis of the Minimum-Mean Cycle Canceling Algorithm and the Network Simplex Algorithm Smoothed Analysis of the Minimum-Mean Cycle Canceling Algorithm and the Network Simplex Algorithm Kamiel Cornelissen and Bodo Manthey University of Twente, Enschede, The Netherlands k.cornelissen@utwente.nl,

More information

COMP 251 Winter 2017 Online quizzes with answers

COMP 251 Winter 2017 Online quizzes with answers COMP 251 Winter 2017 Online quizzes with answers Open Addressing (2) Which of the following assertions are true about open address tables? A. You cannot store more records than the total number of slots

More information

CS/COE 1501 cs.pitt.edu/~bill/1501/ Network Flow

CS/COE 1501 cs.pitt.edu/~bill/1501/ Network Flow CS/COE 1501 cs.pitt.edu/~bill/1501/ Network Flow Defining network flow Consider a directed, weighted graph G(V, E) Weights are applied to edges to state their capacity c(u, w) is the capacity of edge (u,

More information

Bipartite Matching & the Hungarian Method

Bipartite Matching & the Hungarian Method Bipartite Matching & the Hungarian Method Last Revised: 15/9/7 These notes follow formulation originally developed by Subhash Suri in http://www.cs.ucsb.edu/ suri/cs/matching.pdf We previously saw how

More information

Pebbling on Directed Graphs

Pebbling on Directed Graphs Pebbling on Directed Graphs Gayatri Gunda E-mail: gundagay@notes.udayton.edu Dr. Aparna Higgins E-mail: Aparna.Higgins@notes.udayton.edu University of Dayton Dayton, OH 45469 Submitted January 25 th, 2004

More information

Important separators and parameterized algorithms

Important separators and parameterized algorithms Important separators and parameterized algorithms Dániel Marx 1 1 Institute for Computer Science and Control, Hungarian Academy of Sciences (MTA SZTAKI) Budapest, Hungary School on Parameterized Algorithms

More information

6.854J / J Advanced Algorithms Fall 2008

6.854J / J Advanced Algorithms Fall 2008 MIT OpenCourseWare http://ocw.mit.edu 6.854J / 18.415J Advanced Algorithms Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advanced

More information

Test points UTA Student ID #

Test points UTA Student ID # CSE Name Test points UTA Student ID # Multiple Choice. Write your answer to the LEFT of each problem. points each. Which of the following statements is true about HEAPSOT? A. It is stable.. It has a worse-case

More information

arxiv: v2 [cs.ds] 14 Sep 2010

arxiv: v2 [cs.ds] 14 Sep 2010 Multiple-source single-sink maximum flow in directed planar graphs in O(n 1.5 log n) time arxiv:1008.5332v2 [cs.ds] 14 Sep 2010 Philip N. Klein and Shay Mozes Brown University October 28, 2018 Abstract

More information

Sample chapter. Springer Verlag, CATBox An Interactive Course in Combinatorial Optimization. Winfried Hochstättler Alexander Schliep

Sample chapter. Springer Verlag, CATBox An Interactive Course in Combinatorial Optimization. Winfried Hochstättler Alexander Schliep Winfried Hochstättler Alexander Schliep CATBox An Interactive Course in Combinatorial Optimization SPIN XXX Monograph Mathematics March 4, 2011 Springer Berlin Heidelberg NewYork Barcelona Hong Kong London

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 7 Greedy Graph Algorithms Topological sort Shortest paths Adam Smith The (Algorithm) Design Process 1. Work out the answer for some examples. Look for a general principle

More information

7. NETWORK FLOW III. assignment problem input-queued switching. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley

7. NETWORK FLOW III. assignment problem input-queued switching. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley 7. NETWORK FLOW III assignment problem input-queued switching Lecture slides by Kevin Wayne Copyright 5 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos Last updated on Apr 3,

More information

Lecture 3: Totally Unimodularity and Network Flows

Lecture 3: Totally Unimodularity and Network Flows Lecture 3: Totally Unimodularity and Network Flows (3 units) Outline Properties of Easy Problems Totally Unimodular Matrix Minimum Cost Network Flows Dijkstra Algorithm for Shortest Path Problem Ford-Fulkerson

More information

CS 125 Section #5 Graph Traversal and Linear Programs October 6, 2016

CS 125 Section #5 Graph Traversal and Linear Programs October 6, 2016 CS 125 Section #5 Graph Traversal and Linear Programs October 6, 2016 1 Depth first search 1.1 The Algorithm Besides breadth first search, which we saw in class in relation to Dijkstra s algorithm, there

More information

All Shortest Paths. Questions from exercises and exams

All Shortest Paths. Questions from exercises and exams All Shortest Paths Questions from exercises and exams The Problem: G = (V, E, w) is a weighted directed graph. We want to find the shortest path between any pair of vertices in G. Example: find the distance

More information

CAP5415-Computer Vision Lecture 13-Image/Video Segmentation Part II. Dr. Ulas Bagci

CAP5415-Computer Vision Lecture 13-Image/Video Segmentation Part II. Dr. Ulas Bagci CAP-Computer Vision Lecture -Image/Video Segmentation Part II Dr. Ulas Bagci bagci@ucf.edu Labeling & Segmentation Labeling is a common way for modeling various computer vision problems (e.g. optical flow,

More information

Homework #5 Algorithms I Spring 2017

Homework #5 Algorithms I Spring 2017 Homework #5 Algorithms I 600.463 Spring 2017 Due on: Saturday, March 18th, 11:59pm Late submissions: will NOT be accepted Format: Please start each problem on a new page. Where to submit: On Gradescope,

More information

Final Exam Spring 2003

Final Exam Spring 2003 .8 Final Exam Spring Name Instructions.. Please answer all questions in the exam books that are provided.. Please budget your time carefully. It is often a good idea to read the entire exam first, so that

More information

COS 423 Lecture 22. Robert E. Tarjan 2011

COS 423 Lecture 22. Robert E. Tarjan 2011 COS 423 Lecture 22 Minimum-cost matchingsand flows Robert E. Tarjan 2011 Given a directed graph with source s, sink t, arc capacities u(v, w), and antisymmetricarc costs c(v, w) (= c(w, v)), the costof

More information

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016 GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS ZOÉ HAMEL March 3, 2016 1. Introduction Let G = (V (G), E(G)) be a graph G (loops and multiple edges not allowed) on the set of vertices V (G) and the set

More information

Solving problems on graph algorithms

Solving problems on graph algorithms Solving problems on graph algorithms Workshop Organized by: ACM Unit, Indian Statistical Institute, Kolkata. Tutorial-3 Date: 06.07.2017 Let G = (V, E) be an undirected graph. For a vertex v V, G {v} is

More information

CSE 417: Algorithms and Computational Complexity. 3.1 Basic Definitions and Applications. Goals. Chapter 3. Winter 2012 Graphs and Graph Algorithms

CSE 417: Algorithms and Computational Complexity. 3.1 Basic Definitions and Applications. Goals. Chapter 3. Winter 2012 Graphs and Graph Algorithms Chapter 3 CSE 417: Algorithms and Computational Complexity Graphs Reading: 3.1-3.6 Winter 2012 Graphs and Graph Algorithms Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

More information

Parasitic Flow Loops in Networks

Parasitic Flow Loops in Networks International Journal of Operations Research International Journal of Operations Research Vol. 0, No. 3, 09 (03) Parasitic Flow Loops in Networks M.Todinov Department of Mechanical Engineering and Mathematical

More information

Implementation of Hopcroft's Algorithm

Implementation of Hopcroft's Algorithm Implementation of Hopcroft's Algorithm Hang Zhou 19 December 2009 Abstract Minimization of a deterministic nite automaton(dfa) is a well-studied problem of formal language. An ecient algorithm for this

More information

Network Flow and Matching

Network Flow and Matching Chapter 4 Network Flow and Matching In this chapter, we examine the network flow problem, a graph problem to which many problems can be reduced. In fact, some problems that don t even appear to be graph

More information

Minimum-Cost Flow Network

Minimum-Cost Flow Network Minimum-Cost Flow Network Smoothed flow network: G = (V,E) balance values: b : V Z costs: c : E R capacities: u : E N 2 1/2 3/1-1 1/3 3/2 3/1 1 3/1 1/2-2 cost/capacity 2/ 17 Smoothed 2 1 1/2 3/1 1 1 11/3

More information

Network Flow. The network flow problem is as follows:

Network Flow. The network flow problem is as follows: Network Flow The network flow problem is as follows: Given a connected directed graph G with non-negative integer weights, (where each edge stands for the capacity of that edge), and two distinguished

More information

1 Weighted matchings in bipartite graphs

1 Weighted matchings in bipartite graphs Praktikum Algorithmen-Entwurf (Teil ) 19.11.1 1 1 Weighted matchings in bipartite graphs LetG = (V,E)beanundirectedgraphwithintegeredgeweightsw : E Z.Amatching in G is a subset M E of edges such that no

More information

הקטנת הזרימה המקסימלית Reducing The Maximum Flow

הקטנת הזרימה המקסימלית Reducing The Maximum Flow Thesis for the degree Master of Science Submitted to the Scientific Council of the Weizmann Institute of Science Rehovot, Israel עבודת גמר (תזה) לתואר מוסמך למדעים מוגשת למועצה המדעית של מכון ויצמן למדע

More information

Two-Level Push-Relabel Algorithm for the Maximum Flow Problem

Two-Level Push-Relabel Algorithm for the Maximum Flow Problem Two-Level Push-Relabel Algorithm for the Maximum Flow Problem Andrew V. Goldberg Microsoft Research Silicon Valley 1065 La Avenida, Mountain View, CA 94062. goldberg@microsoft.com Abstract. We describe

More information

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

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018 CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Chapter 11 Approximation Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved.

More information