CS 170 DISCUSSION 10 MAXIMUM FLOW. Raymond Chan raychan3.github.io/cs170/fa17.html UC Berkeley Fall 17

Size: px
Start display at page:

Download "CS 170 DISCUSSION 10 MAXIMUM FLOW. Raymond Chan raychan3.github.io/cs170/fa17.html UC Berkeley Fall 17"

Transcription

1 7 IUION MXIMUM FLOW Raymond han raychan.github.io/cs7/fa7.html U erkeley Fall 7

2 MXIMUM FLOW Given a directed graph G = (V, E), send as many units of flow from source node s to sink node t. Edges have capacity constraints. When sending flow through some path, flow must be at most the capacity constraint of every edge. Number of units sent from s = number of units received by t. pplications: supply chain shipping, network flows, supply and demand shipping (need modification). Raymond han, U erkeley Fall 7

3 MXIMUM FLOW Max Flow Linear Program Raymond han, U erkeley Fall 7

4 REIUL GRPH When sending f uv through edge (u, v), we create a residual back edge (v, u). apacity of (u, v) = c uv - f uv apacity of (v, u) = f uv Keep sending flows from s to t. Once we have no path from s to t, we have the maximum flow. Edges can be removed if capacity reaches. his will ensure we won t have a path eventually. an use residual edges later to go back on previous flow decisions. Raymond han, U erkeley Fall 7

5 MX FLOW LGORIHM Ford-Fulkerson algorithm. In each iteration, send as many units of flow as possible and build residual graph. top condition: no s-t path in residual graph. Edmond-Karp algorithm. Find shortest s-t path via F in terms of edge hops. end as many units of flow as possible and build residual graph until no s-t path. If capacities are integral, solution flows are integral, runtime is O( V E ). Raymond han, U erkeley Fall 7

6 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE

7 MX FLOW REIUL GRPH EXMPLE Raymond han, U erkeley Fall 7

8 MX FLOW REIUL GRPH EXMPLE Raymond han, U erkeley Fall 7

9 MX FLOW REIUL GRPH EXMPLE uppose we send units through first. Raymond han, U erkeley Fall 7

10 MX FLOW REIUL GRPH EXMPLE end units via. Raymond han, U erkeley Fall 7

11 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via.

12 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via.

13 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via.

14 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via.

15 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via. end unit via.

16 Raymond han, U erkeley Fall 7 end units via. end units via. end unit via. MX FLOW REIUL GRPH EXMPLE

17 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via. end unit via.

18 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via. end unit via. end unit via.

19 Raymond han, U erkeley Fall 7 MX FLOW REIUL GRPH EXMPLE end units via. end units via. end unit via. end unit via.

20 MX FLOW REIUL GRPH EXMPLE end units via. end units via. end unit via. end unit via. Raymond han, U erkeley Fall 7

21 MX FLOW REIUL GRPH EXMPLE end units via. end units via. end unit via. end unit via. No more s-t path. Maximum flow is 6. fter computing max flow, output edges with their respective flows (see flow graph). Raymond han, U erkeley Fall 7

22 MINIMUM U cut partitions the vertices into two disjoint sets L and R. he capacity of a cut is the sum of edges that crosses the cut (go from L to R). (s, t)-cut partitions graph such that L contains s and all vertices s can reach and R contain t and all vertices that can reach t. For any flow f and any (s, t)-cut (L, R), size(f) capacity(l, R). he capacity of the cuts provide an upper bound of the maximum flow. ize of maximum flow equals to capacity of smallest s-t cut. Raymond han, U erkeley Fall 7

23 MINIMUM U {} and {,,,, } forms a min cut. {,,,, } and {} forms another min cut. Minimum cut will contain only edges in the residual graph that goes from R to L. In the original graph, only edges from L to R in the minimum cut. hese edges are fully saturated (at full capacity). Raymond han, U erkeley Fall 7

24 REUION When using Max Flow to solve problems, make use of reduction. Reduction: solve problem by solving problem. uppose we have a problem, Preprocess input to fit inputs for problem (suppose max flow). olve problem. Postprocess output of problem to fit output of problem. Example. Use Max flow to solve network flows with supply and demand nodes. Raymond han, U erkeley Fall 7

1 Review for Lecture 2 MaxFlow

1 Review for Lecture 2 MaxFlow Comp 260: Advanced Algorithms Tufts University, Spring 2009 Prof. Lenore Cowen Scribe: Wanyu Wang Lecture 13: Back to MaxFlow/Edmonds-Karp 1 Review for Lecture 2 MaxFlow A flow network showing flow and

More information

CMPSCI 611: Advanced Algorithms

CMPSCI 611: Advanced Algorithms CMPSCI 611: Advanced Algorithms Lecture 12: Network Flow Part II Andrew McGregor Last Compiled: December 14, 2017 1/26 Definitions Input: Directed Graph G = (V, E) Capacities C(u, v) > 0 for (u, v) E and

More information

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

Running Time. Assumption. All capacities are integers between 1 and C. Running Time Assumption. All capacities are integers between and. Invariant. Every flow value f(e) and every residual capacities c f (e) remains an integer throughout the algorithm. Theorem. The algorithm

More information

The maximum flow problem

The maximum flow problem The maximum flow problem A. Agnetis 1 Basic properties Given a network G = (N, A) (having N = n nodes and A = m arcs), and two nodes s (source) and t (sink), the maximum flow problem consists in finding

More information

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

Flow Network. The following figure shows an example of a flow network: Maximum Flow 1 Flow Network The following figure shows an example of a flow network: 16 V 1 12 V 3 20 s 10 4 9 7 t 13 4 V 2 V 4 14 A flow network G = (V,E) is a directed graph. Each edge (u, v) E has a

More information

Lecture 8 Network Optimization Algorithms

Lecture 8 Network Optimization Algorithms Advanced Algorithms Floriano Zini Free University of Bozen-Bolzano Faculty of Computer Science Academic Year 2013-2014 Lecture 8 Network Optimization Algorithms 1 21/01/14 Introduction Network models have

More information

10 Max-Flow Min-Cut Flows and Capacitated Graphs 10 MAX-FLOW MIN-CUT

10 Max-Flow Min-Cut Flows and Capacitated Graphs 10 MAX-FLOW MIN-CUT 10 Max-Flow Min-Cut 10.1 Flows and Capacitated Graphs Previously, we considered weighted graphs. In this setting, it was natural to thinking about minimizing the weight of a given path. In fact, we considered

More information

Algorithms: COMP3121/3821/9101/9801

Algorithms: COMP3121/3821/9101/9801 NEW SOUTH WALES Algorithms: COMP32/382/90/980 Aleks Ignjatović School of Computer Science and Engineering University of New South Wales LECTURE 7: MAXIMUM FLOW COMP32/382/90/980 / 24 Flow Networks A flow

More information

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

Maximum Flow. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Maximum Flow 1 / 27 Maximum Flow Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) Maximum Flow 1 / 27 Flow Networks A flow network is a weighted digraph G = (V, E), where the

More information

CSC 373: Algorithm Design and Analysis Lecture 12

CSC 373: Algorithm Design and Analysis Lecture 12 CSC 373: Algorithm Design and Analysis Lecture 12 Allan Borodin February 4, 2013 1 / 16 Lecture 12: Announcements and Outline Announcements Term test 1 in tutorials. Need to use only two rooms due to sickness

More information

Algorithms and Theory of Computation. Lecture 11: Network Flow

Algorithms and Theory of Computation. Lecture 11: Network Flow Algorithms and Theory of Computation Lecture 11: Network Flow Xiaohui Bei MAS 714 September 18, 2018 Nanyang Technological University MAS 714 September 18, 2018 1 / 26 Flow Network A flow network is a

More information

CS 1501 Recitation. Xiang Xiao

CS 1501 Recitation. Xiang Xiao CS 1501 Recitation Xiang Xiao Network Flow A flow network G=(V,E): a directed graph, where each edge (u,v) E has a nonnegative capacity c(u,v)>=0. If (u,v) E, we assume that c(u,v)=0. two distinct vertices

More information

Agenda. Soviet Rail Network, We ve done Greedy Method Divide and Conquer Dynamic Programming

Agenda. Soviet Rail Network, We ve done Greedy Method Divide and Conquer Dynamic Programming Agenda We ve done Greedy Method Divide and Conquer Dynamic Programming Now Flow Networks, Max-flow Min-cut and Applications c Hung Q. Ngo (SUNY at Buffalo) CSE 531 Algorithm Analysis and Design 1 / 52

More information

Types of Networks. Internet Telephone Cell Highways Rail Electrical Power Water Sewer Gas

Types of Networks. Internet Telephone Cell Highways Rail Electrical Power Water Sewer Gas Flow Networks Network Flows 2 Types of Networks Internet Telephone Cell Highways Rail Electrical Power Water Sewer Gas 3 Maximum Flow Problem How can we maximize the flow in a network from a source or

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LETURE 28 Network Flow hoosing good augmenting paths apacity scaling algorithm A. Smith /4/2008 A. Smith; based on slides by K. Wayne and S. Raskhodnikova Pre-break: Ford-Fulkerson

More information

Energy minimization via graph-cuts

Energy minimization via graph-cuts Energy minimization via graph-cuts Nikos Komodakis Ecole des Ponts ParisTech, LIGM Traitement de l information et vision artificielle Binary energy minimization We will first consider binary MRFs: Graph

More information

Discrete Optimization 2010 Lecture 3 Maximum Flows

Discrete Optimization 2010 Lecture 3 Maximum Flows Remainder: Shortest Paths Maximum Flows Discrete Optimization 2010 Lecture 3 Maximum Flows Marc Uetz University of Twente m.uetz@utwente.nl Lecture 3: sheet 1 / 29 Marc Uetz Discrete Optimization Outline

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LETURE 2 Network Flow Finish bipartite matching apacity-scaling algorithm Adam Smith 0//0 A. Smith; based on slides by E. Demaine,. Leiserson, S. Raskhodnikova, K. Wayne Marriage

More information

Two Applications of Maximum Flow

Two Applications of Maximum Flow Two Applications of Maximum Flow The Bipartite Matching Problem a bipartite graph as a flow network maximum flow and maximum matching alternating paths perfect matchings 2 Circulation with Demands flows

More information

CSE 326: Data Structures Network Flow. James Fogarty Autumn 2007

CSE 326: Data Structures Network Flow. James Fogarty Autumn 2007 CSE 36: Data Structures Network Flow James Fogarty Autumn 007 Network Flows Given a weighted, directed graph G=(V,E) Treat the edge weights as capacities How much can we flow through the graph? A 1 B 7

More information

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

Problem set 1. (c) Is the Ford-Fulkerson algorithm guaranteed to produce an acyclic maximum flow? CS261, Winter 2017. Instructor: Ashish Goel. Problem set 1 Electronic submission to Gradescope due 11:59pm Thursday 2/2. Form a group of 2-3 students that is, submit one homework with all of your names.

More information

Maximum flow problem

Maximum flow problem Maximum flow problem 7000 Network flows Network Directed graph G = (V, E) Source node s V, sink node t V Edge capacities: cap : E R 0 Flow: f : E R 0 satisfying 1. Flow conservation constraints e:target(e)=v

More information

Review Questions, Final Exam

Review Questions, Final Exam Review Questions, Final Exam A few general questions. What does the Representation Theorem say (in linear programming)? In words, the representation theorem says that any feasible point can be written

More information

Lecture 2: Network Flows 1

Lecture 2: Network Flows 1 Comp 260: Advanced Algorithms Tufts University, Spring 2011 Lecture by: Prof. Cowen Scribe: Saeed Majidi Lecture 2: Network Flows 1 A wide variety of problems, including the matching problems discussed

More information

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

Graph Algorithms -2: Flow Networks. N. H. N. D. de Silva Dept. of Computer Science & Eng University of Moratuwa CS4460 Advanced d Algorithms Batch 08, L4S2 Lecture 9 Graph Algorithms -2: Flow Networks Dept. of Computer Science & Eng University of Moratuwa Announcement Assignment 2 is due on 18 th of November Worth

More information

p 3 p 2 p 4 q 2 q 7 q 1 q 3 q 6 q 5

p 3 p 2 p 4 q 2 q 7 q 1 q 3 q 6 q 5 Discrete Fréchet distance Consider Professor Bille going for a walk with his personal dog. The professor follows a path of points p 1,..., p n and the dog follows a path of points q 1,..., q m. We assume

More information

2.13 Maximum flow with a strictly positive initial feasible flow

2.13 Maximum flow with a strictly positive initial feasible flow ex-.-. Foundations of Operations Research Prof. E. Amaldi. Maximum flow and minimum cut iven the following network with capacities on the arcs find a maximum (feasible) flow from node to node, and determine

More information

Internet Routing Example

Internet Routing Example Internet Routing Example Acme Routing Company wants to route traffic over the internet from San Fransisco to New York. It owns some wires that go between San Francisco, Houston, Chicago and New York. The

More information

Maximum Flow. Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai

Maximum Flow. Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai Maximum Flow Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai Flow Network A low network G ( V, E) is a directed graph with a source node sv, a sink node tv, a capacity unction c. Each edge ( u,

More information

The max flow problem. Ford-Fulkerson method. A cut. Lemma Corollary Max Flow Min Cut Theorem. Max Flow Min Cut Theorem

The max flow problem. Ford-Fulkerson method. A cut. Lemma Corollary Max Flow Min Cut Theorem. Max Flow Min Cut Theorem The max flow problem Ford-Fulkerson method 7 11 Ford-Fulkerson(G) f = 0 while( simple path p from s to t in G f ) 10-2 2 1 f := f + f p output f 4 9 1 2 A cut Lemma 26. + Corollary 26.6 Let f be a flow

More information

Max Flow: Algorithms and Applications

Max Flow: Algorithms and Applications Max Flow: Algorithms and Applications Outline for today Quick review of the Max Flow problem Applications of Max Flow The Ford-Fulkerson (FF) algorithm for Max Flow Analysis of FF, and the Max Flow Min

More information

The min cost flow problem Course notes for Optimization Spring 2007

The min cost flow problem Course notes for Optimization Spring 2007 The min cost flow problem Course notes for Optimization Spring 2007 Peter Bro Miltersen February 7, 2007 Version 3.0 1 Definition of the min cost flow problem We shall consider a generalization of the

More information

Maximum flow problem CE 377K. February 26, 2015

Maximum flow problem CE 377K. February 26, 2015 Maximum flow problem CE 377K February 6, 05 REVIEW HW due in week Review Label setting vs. label correcting Bellman-Ford algorithm Review MAXIMUM FLOW PROBLEM Maximum Flow Problem What is the greatest

More information

6.046 Recitation 11 Handout

6.046 Recitation 11 Handout 6.046 Recitation 11 Handout May 2, 2008 1 Max Flow as a Linear Program As a reminder, a linear program is a problem that can be written as that of fulfilling an objective function and a set of constraints

More information

Lecture 1. 1 Overview. 2 Maximum Flow. COMPSCI 532: Design and Analysis of Algorithms August 26, 2015

Lecture 1. 1 Overview. 2 Maximum Flow. COMPSCI 532: Design and Analysis of Algorithms August 26, 2015 COMPSCI 532: Design and Analysis of Algorithms August 26, 205 Lecture Lecturer: Debmalya Panigrahi Scribe: Allen Xiao Oeriew In this lecture, we will define the maximum flow problem and discuss two algorithms

More information

The min cost flow problem Course notes for Search and Optimization Spring 2004

The min cost flow problem Course notes for Search and Optimization Spring 2004 The min cost flow problem Course notes for Search and Optimization Spring 2004 Peter Bro Miltersen February 20, 2004 Version 1.3 1 Definition of the min cost flow problem We shall consider a generalization

More information

(1,3) (3,4) (2,2) (1,2) (2,4) t

(1,3) (3,4) (2,2) (1,2) (2,4) t Maximum flows Some catastrophe has happened in some far away place, and help is needed badly. Fortunately, all that is needed is available, but it is stored in some depot that is quite remote from the

More information

The Simplest and Smallest Network on Which the Ford-Fulkerson Maximum Flow Procedure May Fail to Terminate

The Simplest and Smallest Network on Which the Ford-Fulkerson Maximum Flow Procedure May Fail to Terminate Journal of Information Processing Vol.24 No.2 390 394 (Mar. 206) [DOI: 0.297/ipsjjip.24.390] Regular Paper The Simplest and Smallest Network on Which the Ford-Fulkerson Maximum Flow Procedure May Fail

More information

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

We say that a flow is feasible for G (or just feasible if the graph and capacity function in question are obvious) if CS787: Advanced Algorithms Lecture 4: Network Flow We devote this lecture to the network flow problem and the max-flow min-cut theorem. A number of other problems can be cast into a maximum flow or minimum

More information

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

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time Network Flow 1 The Maximum-Flow Problem directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time 2 Maximum Flows and Minimum Cuts flows and cuts max flow equals

More information

Soviet Rail Network, 1955

Soviet Rail Network, 1955 Ch7. Network Flow Soviet Rail Network, 955 Reference: On the history of the transportation and maximum flow problems. Alexander Schrijver in Math Programming, 9: 3, 2002. 2 Maximum Flow and Minimum Cut

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 7 Network Flow Application: Bipartite Matching Adam Smith 0//008 A. Smith; based on slides by S. Raskhodnikova and K. Wayne Recently: Ford-Fulkerson Find max s-t flow

More information

CMSC 451: Max-Flow Extensions

CMSC 451: Max-Flow Extensions CMSC 51: Max-Flow Extensions Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Section 7.7 of Algorithm Design by Kleinberg & Tardos. Circulations with

More information

Algorithms: Lecture 12. Chalmers University of Technology

Algorithms: Lecture 12. Chalmers University of Technology Algorithms: Lecture 1 Chalmers University of Technology Today s Topics Shortest Paths Network Flow Algorithms Shortest Path in a Graph Shortest Path Problem Shortest path network. Directed graph G = (V,

More information

Exposition of the Dinitz algorithm

Exposition of the Dinitz algorithm Exposition of the Dinitz algorithm Yefim Dinitz and Avraham A. Melkman Department of Computer Science Ben Gurion University of the Negev, 84105 Beer-Sheva, Israel {dinitz,melkman}@cs.bgu.ac.il June 6,

More information

Graphs and Network Flows IE411. Lecture 12. Dr. Ted Ralphs

Graphs and Network Flows IE411. Lecture 12. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 12 Dr. Ted Ralphs IE411 Lecture 12 1 References for Today s Lecture Required reading Sections 21.1 21.2 References AMO Chapter 6 CLRS Sections 26.1 26.2 IE411 Lecture

More information

Parallel Graph Algorithms (con4nued)

Parallel Graph Algorithms (con4nued) Parallel Graph Algorithms (con4nued) MaxFlow A flow network G=(V,E): a directed graph, where each edge (u,v) E has a nonnega4ve capacity c(u,v)>=0. If (u,v) E, we assume that c(u,v)=0. Two dis4nct ver4ces

More information

7.5 Bipartite Matching

7.5 Bipartite Matching 7. Bipartite Matching Matching Matching. Input: undirected graph G = (V, E). M E is a matching if each node appears in at most edge in M. Max matching: find a max cardinality matching. Bipartite Matching

More information

Minimum cost transportation problem

Minimum cost transportation problem Minimum cost transportation problem Complements of Operations Research Giovanni Righini Università degli Studi di Milano Definitions The minimum cost transportation problem is a special case of the minimum

More information

Basics on the Graphcut Algorithm. Application for the Computation of the Mode of the Ising Model

Basics on the Graphcut Algorithm. Application for the Computation of the Mode of the Ising Model Basics on the Graphcut Algorithm. Application for the Computation of the Mode of the Ising Model Bruno Galerne bruno.galerne@parisdescartes.fr MAP5, Université Paris Descartes Master MVA Cours Méthodes

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

Network Flow Problems Luis Goddyn, Math 408

Network Flow Problems Luis Goddyn, Math 408 Network Flow Problems Luis Goddyn, Math 48 Let D = (V, A) be a directed graph, and let s, t V (D). For S V we write δ + (S) = {u A : u S, S} and δ (S) = {u A : u S, S} for the in-arcs and out-arcs of S

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. 7.5 Bipartite Matching Matching Matching. Input: undirected graph G = (V, E). M E is a matching

More information

CSE 202 Homework 4 Matthias Springer, A

CSE 202 Homework 4 Matthias Springer, A CSE 202 Homework 4 Matthias Springer, A99500782 1 Problem 2 Basic Idea PERFECT ASSEMBLY N P: a permutation P of s i S is a certificate that can be checked in polynomial time by ensuring that P = S, and

More information

Mathematics for Decision Making: An Introduction. Lecture 13

Mathematics for Decision Making: An Introduction. Lecture 13 Mathematics for Decision Making: An Introduction Lecture 13 Matthias Köppe UC Davis, Mathematics February 17, 2009 13 1 Reminder: Flows in networks General structure: Flows in networks In general, consider

More information

New Theory and Algorithms for Scheduling Arc Shutdown Jobs in Networks

New Theory and Algorithms for Scheduling Arc Shutdown Jobs in Networks New Theory and Algorithms for Scheduling Arc Shutdown Jobs in Networks Patrick Andersen February 27, 2014 This project explores a recently developed type of scheduling problem that combines the two Operations

More information

Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities

Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities Maximum Integer Flows in Directed Planar Graphs with Multiple Sources and Sinks and Vertex Capacities Yipu Wang University of Illinois at Urbana-Champaign ywang298@illinois.edu July 12, 2018 Abstract We

More information

Parallel Graph Algorithms (con4nued)

Parallel Graph Algorithms (con4nued) Parallel Graph Algorithms (con4nued) MaxFlow A flow network G=(V,E): a directed graph, where each edge (u,v) E has a nonnega4ve capacity c(u,v)>=0. If (u,v) E, we assume that c(u,v)=0. Two dis4nct ver4ces

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 Recap Network Flow Problems Max-Flow Min Cut Theorem Ford Fulkerson Augmenting Paths Residual Flow Graph Integral Solutions

More information

Selected partial inverse combinatorial optimization problems with forbidden elements. Elisabeth Gassner

Selected partial inverse combinatorial optimization problems with forbidden elements. Elisabeth Gassner FoSP Algorithmen & mathematische Modellierung FoSP Forschungsschwerpunkt Algorithmen und mathematische Modellierung Selected partial inverse combinatorial optimization problems with forbidden elements

More information

Computer Science & Engineering 423/823 Design and Analysis of Algorithms

Computer Science & Engineering 423/823 Design and Analysis of Algorithms Bipartite Matching Computer Science & Engineering 423/823 Design and s Lecture 07 (Chapter 26) Stephen Scott (Adapted from Vinodchandran N. Variyam) 1 / 36 Spring 2010 Bipartite Matching 2 / 36 Can use

More information

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

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)} Preliminaries Graphs G = (V, E), V : set of vertices E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) 1 2 3 5 4 V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} 1 Directed Graph (Digraph)

More information

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs LP-Duality ( Approximation Algorithms by V. Vazirani, Chapter 12) - Well-characterized problems, min-max relations, approximate certificates - LP problems in the standard form, primal and dual linear programs

More information

Maximum flow problem (part I)

Maximum flow problem (part I) Maximum flow problem (part I) Combinatorial Optimization Giovanni Righini Università degli Studi di Milano Definitions A flow network is a digraph D = (N,A) with two particular nodes s and t acting as

More information

Maximum Flow Problem (Ford and Fulkerson, 1956)

Maximum Flow Problem (Ford and Fulkerson, 1956) Maximum Flow Problem (Ford and Fulkerson, 196) In this problem we find the maximum flow possible in a directed connected network with arc capacities. There is unlimited quantity available in the given

More information

Midterm Exam 2 Solutions

Midterm Exam 2 Solutions Algorithm Design and Analysis November 12, 2010 Pennsylvania State University CSE 565, Fall 2010 Professor Adam Smith Exam 2 Solutions Problem 1 (Miscellaneous). Midterm Exam 2 Solutions (a) Your friend

More information

C&O 355 Mathematical Programming Fall 2010 Lecture 18. N. Harvey

C&O 355 Mathematical Programming Fall 2010 Lecture 18. N. Harvey C&O 355 Mathematical Programming Fall 2010 Lecture 18 N. Harvey Network Flow Topics Max Flow / Min Cut Theorem Total Unimodularity Directed Graphs & Incidence Matrices Proof of Max Flow / Min Cut Theorem

More information

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11 Undirected Graphs Undirected graph. G = (V, E) V = nodes. E = edges between pairs of nodes. Captures pairwise relationship between objects. Graph size parameters: n = V, m = E. V = {, 2, 3,,,, 7, 8 } E

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: NP-Completeness I Date: 11/13/18

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: NP-Completeness I Date: 11/13/18 601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: NP-Completeness I Date: 11/13/18 20.1 Introduction Definition 20.1.1 We say that an algorithm runs in polynomial time if its running

More information

. CS711008Z Algorithm Design and Analysis. Lecture 10. Algorithm design technique: Network flow and its applications 1. Dongbo Bu

. CS711008Z Algorithm Design and Analysis. Lecture 10. Algorithm design technique: Network flow and its applications 1. Dongbo Bu CS711008Z Algorithm Design and Analysis Lecture 10 Algorithm design technique: Network flow and its applications 1 Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China

More information

Lecture 18: More NP-Complete Problems

Lecture 18: More NP-Complete Problems 6.045 Lecture 18: More NP-Complete Problems 1 The Clique Problem a d f c b e g Given a graph G and positive k, does G contain a complete subgraph on k nodes? CLIQUE = { (G,k) G is an undirected graph with

More information

Algorithms and Data Structures 2014 Exercises and Solutions Week 14

Algorithms and Data Structures 2014 Exercises and Solutions Week 14 lgorithms and ata tructures 0 xercises and s Week Linear programming. onsider the following linear program. maximize x y 0 x + y 7 x x 0 y 0 x + 3y Plot the feasible region and identify the optimal solution.

More information

The partial inverse minimum cut problem with L 1 -norm is strongly NP-hard. Elisabeth Gassner

The partial inverse minimum cut problem with L 1 -norm is strongly NP-hard. Elisabeth Gassner FoSP Algorithmen & mathematische Modellierung FoSP Forschungsschwerpunkt Algorithmen und mathematische Modellierung The partial inverse minimum cut problem with L 1 -norm is strongly NP-hard Elisabeth

More information

Flows. Chapter Circulations

Flows. Chapter Circulations Chapter 4 Flows For a directed graph D = (V,A), we define δ + (U) := {(u,v) A : u U,v / U} as the arcs leaving U and δ (U) := {(u,v) A u / U,v U} as the arcs entering U. 4. Circulations In a directed graph

More information

The α-maximum Flow Model with Uncertain Capacities

The α-maximum Flow Model with Uncertain Capacities International April 25, 2013 Journal7:12 of Uncertainty, WSPC/INSTRUCTION Fuzziness and Knowledge-Based FILE Uncertain*-maximum*Flow*Model Systems c World Scientific Publishing Company The α-maximum Flow

More information

Maximum Skew-Symmetric Flows. September Abstract

Maximum Skew-Symmetric Flows. September Abstract Maximum Skew-Symmetric Flows Andrew V. Goldberg NEC Research Institute 4 Independence Way Princeton, NJ 08540 avg@research.nj.nec.com Alexander V. Karzanov Institute for Systems Analysis 9, Prospect 60

More information

Friday, September 21, Flows

Friday, September 21, Flows Flows Building evacuation plan people to evacuate from the offices corridors and stairways capacity 10 10 5 50 15 15 15 60 60 50 15 10 60 10 60 15 15 50 For each person determine the path to follow to

More information

ORIE 633 Network Flows October 4, Lecture 10

ORIE 633 Network Flows October 4, Lecture 10 ORIE 633 Network Flows October 4, 2007 Lecturer: David P. Williamson Lecture 10 Scribe: Kathleen King 1 Efficient algorithms for max flows 1.1 The Goldberg-Rao algorithm Recall from last time: Dinic s

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 208 Midterm Exam Anticipate having midterm graded at this point Look for comments on Piazza Common Mistakes Average, Max,

More information

Lecture 5 January 16, 2013

Lecture 5 January 16, 2013 UBC CPSC 536N: Sparse Approximations Winter 2013 Prof. Nick Harvey Lecture 5 January 16, 2013 Scribe: Samira Samadi 1 Combinatorial IPs 1.1 Mathematical programs { min c Linear Program (LP): T x s.t. a

More information

Module 7-2 Decomposition Approach

Module 7-2 Decomposition Approach Module 7-2 Decomposition Approach Chanan Singh Texas A&M University Decomposition Approach l Now we will describe a method of decomposing the state space into subsets for the purpose of calculating the

More information

Network Flows made simple

Network Flows made simple Network Flows made simple A mild but rigorous introduction to Network Flows Periklis A. Papakonstantinou York University Network Flows is the last algorithmic paradigm we consider. Actually, we only address

More information

Lecture 21 November 11, 2014

Lecture 21 November 11, 2014 CS 224: Advanced Algorithms Fall 2-14 Prof. Jelani Nelson Lecture 21 November 11, 2014 Scribe: Nithin Tumma 1 Overview In the previous lecture we finished covering the multiplicative weights method and

More information

(tree searching technique) (Boolean formulas) satisfying assignment: (X 1, X 2 )

(tree searching technique) (Boolean formulas) satisfying assignment: (X 1, X 2 ) Algorithms Chapter 5: The Tree Searching Strategy - Examples 1 / 11 Chapter 5: The Tree Searching Strategy 1. Ex 5.1Determine the satisfiability of the following Boolean formulas by depth-first search

More information

2. A vertex in G is central if its greatest distance from any other vertex is as small as possible. This distance is the radius of G.

2. A vertex in G is central if its greatest distance from any other vertex is as small as possible. This distance is the radius of G. CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh (rezab@stanford.edu) HW#1 Due at the beginning of class Thursday 01/21/16 1. Prove that at least one of G and G is connected. Here, G

More information

22 Max-Flow Algorithms

22 Max-Flow Algorithms A process cannot be understood by stopping it. Understanding must move with the flow of the process, must join it and flow with it. The First Law of Mentat, in Frank Herbert s Dune (965) There s a difference

More information

Symmetric chain decompositions of partially ordered sets

Symmetric chain decompositions of partially ordered sets Symmetric chain decompositions of partially ordered sets A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL OF THE UNIVERSITY OF MINNESOTA BY Ondrej Zjevik IN PARTIAL FULFILLMENT OF THE REQUIREMENTS

More information

Network Flows. 7. Multicommodity Flows Problems. Fall 2010 Instructor: Dr. Masoud Yaghini

Network Flows. 7. Multicommodity Flows Problems. Fall 2010 Instructor: Dr. Masoud Yaghini In the name of God Network Flows 7. Multicommodity Flows Problems 7.3 Column Generation Approach Fall 2010 Instructor: Dr. Masoud Yaghini Path Flow Formulation Path Flow Formulation Let first reformulate

More information

Mathematical Programs Linear Program (LP)

Mathematical Programs Linear Program (LP) Mathematical Programs Linear Program (LP) Integer Program (IP) Can be efficiently solved e.g., by Ellipsoid Method Cannot be efficiently solved Cannot be efficiently solved assuming P NP Combinatorial

More information

Network Flows. 4. Maximum Flows Problems. Fall 2010 Instructor: Dr. Masoud Yaghini

Network Flows. 4. Maximum Flows Problems. Fall 2010 Instructor: Dr. Masoud Yaghini In the name of God Network Flows 4. Maximum Flows Problems 4.1 Introduction Fall 2010 Instructor: Dr. Masoud Yaghini Introduction Introduction The maximum flow problem In a capacitated network, we wish

More information

Network Flows. CTU FEE Department of control engineering. March 28, 2017

Network Flows. CTU FEE Department of control engineering. March 28, 2017 Network Flows Zdeněk Hanzálek, Přemysl Šůcha hanzalek@fel.cvut.cz CTU FEE Department of control engineering March 28, 2017 Z. Hanzálek (CTU FEE) Network Flows March 28, 2017 1 / 44 Table of contents 1

More information

Maximum skew-symmetric flows and matchings

Maximum skew-symmetric flows and matchings Math. Program., Ser. A 100: 537 568 (2004) Digital Object Identifier (DOI) 10.1007/s10107-004-0505-z Andrew V. Goldberg Alexander V. Karzanov Maximum skew-symmetric flows and matchings Received: May 14,

More information

GRAPH ALGORITHMS Week 7 (13 Nov - 18 Nov 2017)

GRAPH ALGORITHMS Week 7 (13 Nov - 18 Nov 2017) GRAPH ALGORITHMS Week 7 (13 Nov - 18 Nov 2017) C. Croitoru croitoru@info.uaic.ro FII November 12, 2017 1 / 33 OUTLINE Matchings Analytical Formulation of the Maximum Matching Problem Perfect Matchings

More information

Algorithm Theory - Exercise Class

Algorithm Theory - Exercise Class Algorithm Theory - Exercise Class Exercise Lesson 3 Albert-Ludwigs-Universität Freiburg Philipp Schneider Algorithms and Complexity - Professor Dr. Fabian Kuhn Organizational Matters English Tutorial in

More information

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows Matching Input: undirected graph G = (V, E). M E is a matching if each node appears in at most one Part V edge in M. Maximum Matching: find a matching of maximum cardinality Matchings Ernst Mayr, Harald

More information

Bulletin of the Transilvania University of Braşov Vol 8(57), No Series III: Mathematics, Informatics, Physics,

Bulletin of the Transilvania University of Braşov Vol 8(57), No Series III: Mathematics, Informatics, Physics, Bulletin of the Transilvania University of Braşov Vol 8(57), No. - 05 Series III: Mathematics, Informatics, Physics, -8 MAXIMUM CUTS FOR A MINIMUM FLOW Eleonor CIUREA Abstract In this paper we resolve

More information

III. Linear Programming

III. Linear Programming III. Linear Programming Thomas Sauerwald Easter 2017 Outline Introduction Standard and Slack Forms Formulating Problems as Linear Programs Simplex Algorithm Finding an Initial Solution III. Linear Programming

More information

An Introduction to Network Flows Over Time

An Introduction to Network Flows Over Time An Introduction to Network Flows Over Time Martin Skutella Abstract We give an introduction into the fascinating area of flows over time also called dynamic flows in the literature. Starting from the early

More information

The Transportation Problem. Experience the Joy! Feel the Excitement! Share in the Pleasure!

The Transportation Problem. Experience the Joy! Feel the Excitement! Share in the Pleasure! The Transportation Problem Experience the Joy! Feel the Excitement! Share in the Pleasure! The Problem A company manufactures a single product at each of m factories. i has a capacity of S i per month.

More information

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47

Linear Programming. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Linear Programming 1 / 47 Linear Programming Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) Linear Programming 1 / 47 Linear function: f (x 1, x 2,..., x n ) = n a i x i, i=1 where

More information