Discrete Optimization 2010 Lecture 3 Maximum Flows

Size: px
Start display at page:

Download "Discrete Optimization 2010 Lecture 3 Maximum Flows"

Transcription

1 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

2 Outline Remainder: Shortest Paths Maximum Flows 1 Remainder: Shortest Paths Acyclic Graphs Bellman Equations 2 Maximum Flows Augmenting Path Algorithms Ford-Fulkerson Edmonds-Karp Max-Flow Min-Cut Lecture 3: sheet 2 / 29 Marc Uetz Discrete Optimization

3 Remainder: Shortest Paths Maximum Flows Acyclic G Bellman Eqns Computation Time Dijkstra Simple Initialization O( n ) n iterations of while-loop, in each need to find smallest label in V \ S, which is doable in O( n ) O( n 2 ) in total m relabeling steps of O( 1 ) O( m ) Which gives O( n ) + O( n 2 ) + O( m ) O( n 2 ) time Less simple An O( m log n ) implementation, which uses priority queue (also called heap) to manage finding minimal d(v) in O( 1 ) time. (log n comes from overhead in organization of the heap) Lecture 3: sheet 3 / 29 Marc Uetz Discrete Optimization

4 Remainder: Shortest Paths Maximum Flows Acyclic G Bellman Eqns BFS - breadth-first-search Let all arc lengths c vw = 1. What about Dijkstra s algorithm? distance labels d(v) = minimal # arcs to reach v from s (shortest path tree = BFS tree) d(v) = for non-reachable v ( reachability algorithm ) Computation time? once assigned (finite) value, no node needs relabeling (otherwise contradiction to choice of v = argmin{d(v)}) hence organize such nodes as a FIFO list Q (queue): when d(w) is assigned a (finite) value, w end of Q then minimal d(v) is found in O( 1 ) time, at top of Q Total time O( n + m ) Lecture 3: sheet 4 / 29 Marc Uetz Discrete Optimization

5 Remainder: Shortest Paths Maximum Flows Acyclic G Bellman Eqns Acyclic Graphs Definition!"#"$"%&'($)*+,-+&.% A digraph G = (V, A), V = n, has a linearization if there exists bijection!"#$%&'&(")$*+$(&,)'-.&!/01234&5"+.&%&%6($7&'%(&8&')*79&:.$%&+.$ π : V {1,..., n} such that %;8<$)"%,&!=&1&!>?2@2%A&"7&'&!"#"$"%&'($)"*+,*!"#"$"%&'($)"*+,* 6B&+.$&%6($7&"B& π(v) <! π(w) 0-2.4&" 3=&! for all(v, 0-4C! 0.4 w) A!0#4! " $ # % &'()*(+,-./0*12' '1:-1-;!"!#!$%&'#(!)*+) /<- all arcs from left to right 1=>-)=?@-/<-3-A)=;1/=:-=)->/*(A;(>-A@A?(: Lecture 3: sheet 5 / 29 Marc Uetz Discrete Optimization

6 Remainder: Shortest Paths Maximum Flows Acyclic G Bellman Eqns Acyclic Graphs Theorem A graph has a linearization if and only if it has no (directed) cycle. only if a cycle (v, w,..., v) yields π(v) < π(w) < < π(v) if acyclic graphs have a node v without ingoing arc (why?) let π(v) = 1, delete all arcs (v, w), by induction, can get a linearization on G v (with numbers 2,..., n) Lecture 3: sheet 6 / 29 Marc Uetz Discrete Optimization

7 Remainder: Shortest Paths Maximum Flows Acyclic G Bellman Eqns Linear Time Algorithm Theorem Shortest paths from some source node s to all other nodes v can be computed in time O( n + m ) for acyclic graphs. Note: best possible, as encoding length of a graph is in Ω( n + m ) Idea Like in Dijkstra s algorithm, make sure to make only one relabeling per edge. Namely, take a linearization of G, and in iteration k correct -inequality for all outgoing arcs of node π(k), k = 1,..., n Easy inductive proof: In iteration k, the labels of nodes π(1),..., π(k) are correct, since there are no backward arcs Thereby, each node & arc touched only once, O( n + m ) Lecture 3: sheet 7 / 29 Marc Uetz Discrete Optimization

8 Remainder: Shortest Paths Maximum Flows Acyclic G Bellman Eqns Bellman Equations & Shortest Path Lengths Definition ( ) Given digraph G = (V, A), s V, consider system of equations d(s) = 0, d(w) = min{d(v) + c vw (v, w) A} w s Solution of ( ) as linear program: Find maximal solution d of ( ) maximize v V d(v) s.t. d(w) d(v) + c vw d(s) = 0 w V \ s and (v, w) A Claim: Solution of this LP are shortest path lengths. Lecture 3: sheet 8 / 29 Marc Uetz Discrete Optimization

9 Outline 1 Remainder: Shortest Paths Acyclic Graphs Bellman Equations 2 Maximum Flows Augmenting Path Algorithms Ford-Fulkerson Edmonds-Karp Max-Flow Min-Cut Lecture 3: sheet 9 / 29 Marc Uetz Discrete Optimization

10 !"#$%&%'()*+',-*.)/% Maximum Flow Problem Remainder: Shortest Paths Maximum Flows Augmenting Path Algorithms Max-Flow Min-Cut! Any!"#$%&'(")*+,-'!./01231'+*4'4+,+4"5"$6'7&'2! instance given by 8'/4+99$:&'!"#$%&'!"#$%&'3! 5;<':$6")%+5$:'%<:$6'(1'# " 0'/6<7*4$'+%:'5+*)$53 digraph G = (V, A), arc capacities u : A N (N important) (G, u) = network!!<+9&'=$%:'>+?">7>'@9<;'@*<>'( two designated nodes, s and t 5<'#1'*$6,$45"%)'+*4'4+,+4"5"$6 goal: send maximum flow from s to t numbers at arcs : s=1 (3,6) (2,6) (1,1) (1,3) (3,3) ( flow, capacity (1,2) (3,7) 4 (4,4) (1,5) t=6 ) (s, t)-flow Lecture 3: sheet 10 / 29 Marc Uetz Discrete Optimization

11 Linear Programming Formulation x ij = amount of flow through arc (i, j) max v(x) := x sj s.t. j:(s,j) A x ij j:(i,j) A j:(j,i) A j:(j,s) A x js x ji = 0 i s, t (1) 0 x ij u ij (i, j) A (2) v(x) = value of the flow = flow out of s (= flow into t) (1) = flow balance constraints at intermediate nodes (2) = capacity constraints along arcs Lecture 3: sheet 11 / 29 Marc Uetz Discrete Optimization

12 Feasible Flow Problem Assume given b(i) = required outflow (excess) at node i x ij = amount of flow through arc (i, j) Question: Is there a feasible flow x with x ij x ji = b(i) i V j:(i,j) A j:(j,i) A 0 x ij u ij (i, j) A b(i) > 0 excess node b(i) < 0 deficit node if all b(i) = 0 problem is called circulation problem Lecture 3: sheet 12 / 29 Marc Uetz Discrete Optimization

13 Augmenting Paths (0,1) 3 (0,2) s=1 (0,3) (0,2) 2 3 s= (0,1) 2 t=4 t=4 flow augmentation along path (1, 2, 3, 4), by 2 units Flow augmentation over th 1,2,3,4 with 2 units. Lecture 3: sheet 13 / 29 Marc Uetz Discrete Optimization

14 Augmenting Paths s=1 (0,1) (2,2) s=1-1 2 (2,3) (2,2) (0,1) 1 t=4 t=4 Flow after augmentation o the path 1,2,3,4 with 2 uni flow augmentation along path (1, 3, 2, 4), by 1 unit note: thereby decrease flow value along (2, 3) Flow augmentation over t 1,3,2,4 with 1 unit: decrea arc (2,3) in the wrong d Lecture 3: sheet 14 / 29 Marc Uetz Discrete Optimization

15 Augmenting Paths!"#$%&'(&#)*+',- (1,1) 3 (2,2) s=1 (2,2) 2 (1,3) (1,1) t=4 No further improvements possible. Lecture 3: sheet 15 / 29 Marc Uetz Discrete Optimization

16 Residual Graph G(x)!"#$%&'()*"+,-./)!0"1 s=1 (0,1) (2,2) 3 2 (2,3) (2,2) (0,1) t=4 Consider flow x over path 1,2,3,4 with 2 units. (x 12 = x 23 = x 34 = 2, x ij = 0 otherwise) Residual Network G(x): Represents all possibilities to change the flow on top of given flow x s= t=4 Lecture 3: sheet 16 / 29 Marc Uetz Discrete Optimization

17 !"#$%&'()*"+,-./)!"#$ Residual Graph G(x) Remainder: Shortest Paths Maximum Flows Augmenting Path Algorithms Max-Flow Min-Cut For a given flow x, the network G contains arcs over which the flow Definition can be increased and/or decreased. Arcs over which the flow Forcan anybe given decreased (feasible) are flow reversed x in G, with define capacity a network equal G(x) to the amount forward of possible arc: possible decrease. amount of flow increase backward arc: possible amount of flow decrease i (x ij, u ij ) j i x ij < u ij u ij -x ij j i x ij > 0 x ij j Note: any possible flow increase can be achieved by finding Note: directed Anypaths augmenting the residual path for network flow x is a directed augmenting path paths. in G(x) Lecture 3: sheet 17 / 29 Marc Uetz Discrete Optimization

18 Generic Augmenting Path Algorithm (Ford-Fulkerson) Algorithm 1: Ford-Fulkerson input : network (G, u) with capacities u 0, s, t V output: x = maximum (s, t)-flow let x = 0 and G(x) = G; while (G(x) contains (s, t)-path P) do determine smallest residual capacity ū on P [ 1]; x P = flow of value ū along P (so, x a = ū a P); augment flow x = x + x P ; update residual capacities, i.e., re-compute G(x); Theorem An (s, t)-flow x is maximum if and only if the residual graph G(x) does not have any (s, t)-path Lecture 3: sheet 18 / 29 Marc Uetz Discrete Optimization

19 Proof of Augmenting Path Theorem Necessity If G(x) has an (s, t)-path, could augment flow x along that path (by at least one unit), contradiction. Sufficiency have: (s, t)-path in G(x), assume flow x with v(x ) > v(x) Consider flow x x, can show: feasible flow in G(x) By assumption v(x x) = v(x ) v(x) > 0, so x x has flow out of s By flow balance, must reach t on some path(s) So we have found an (s, t) path in G(x), contradiction Lecture 3: sheet 19 / 29 Marc Uetz Discrete Optimization

20 Computation Time Ford-Fulkerson Algorithm s=1 1 t= !"#$%%$&'"(%&)"*+,#-'.*.$&'/")0-'"/-%-1.$',"23* flow augmentations if we are unlucky 6*.0/ [for u a R, might even fail to converge to optimum value, there s a paper by Uri Zwick (1995) containing the smallest example] 7&%+.$&'/8"90&&/- :; 70&<.-/. *+,#-'.$', 6*.0/ =#$'$#+#"'+#3-< &("*<1/> Possible!;?*@$#+#"1*6*1$.A"*+,#-'.$',"6*.0/ Solutions shortest augmenting paths (minimal # arcs) maximum capacity augmenting paths Lecture 3: sheet 20 / 29 Marc Uetz Discrete Optimization

21 Edmonds-Karp Augmenting Path Algorithm Algorithm 2: Edmonds-Karp Use Ford-Fulkerson augmenting path algorithm But always use shortest augmenting paths (# arcs) How to find shortest augmenting paths? Needed: shortest (s, t)-path in G(x), in terms of # arcs Problem: after flow augmentation, arcs deleted/added to G(x) Brute Force Solution After flow augmentation and update of G(x), make BFS in G(x) Denote by d(v) these distances (from source s), v V Note, if t is no longer reachable (d(t) = ), we are done Lecture 3: sheet 21 / 29 Marc Uetz Discrete Optimization

22 Analysis Edmonds-Karp Algorithm Lemma 1 At least one arc is removed from G(x) in each iteration (but may come back in a later iteration) Proof: One arc (at least) is saturated, thus disappears in G(x) P Lemma 2 Distance labels d(v) never decrease u v Lemma 3 Each arc is removed at most O( n ) times Lecture 3: sheet 22 / 29 Marc Uetz Discrete Optimization

23 Lemma 2: d(u) can only increase P s u v w An arc removal cannot decrease any d(u), but arc addition? Say, arc (v, u) is added (backward along augmenting path P) (let u be first node with this property along P) creating a new (s, u)-path via w but d(w) d(u), because P was shortest path before so d(u) cannot decrease by this new path Lecture 3: sheet 23 / 29 Marc Uetz Discrete Optimization

24 Lemma 3: Any arc is removed at most O( n ) times P Let d k (v) be the distance label before iteration k consider arc (u, v), removed in some iteration k it holds d k (v) = d k (u) + 1, because P shortest path if (u, v) is removed in a later iteration again, it first must come back, say in iteration h > k it holds d h (u) = d h (v) + 1 by Lemma 2, d h (u) = d h (v) + 1 d k (v) + 1 = d k (u) + 2 but n 1 is an upper bound on any label u v Lecture 3: sheet 24 / 29 Marc Uetz Discrete Optimization

25 Edmonds-Karp: Computation Time Claims 1 O( nm ) augmentations 2 Each augmentation in O( m ) Hence total computation time is O( m 2 n ) Claim 1 In each augmentation at least one arc is removed Claim 2 No arc is removed more than O( n ) times In total at most O( nm ) augmentations Each augmentation is one BFS from s, takes O( m ) time Remarks: Improvement to O( n 2 m ) is possible ( Literature) Algorithm (& runtime analysis) works for any u a R Lecture 3: sheet 25 / 29 Marc Uetz Discrete Optimization

26 Cuts in Networks!"#$%&'%()#*+,-$ Definitions An (s,t)-cut is a partition [S,T] of V, such that s!sand t!t, S!T = ". An (s, t)-cut is a partition [S, T ] of V, such that s S, t T The arcs in the cut [!"#] [S, are T ] those are those with the with tail tail in S inand S, the head in T The capacity u(s, T ) of a cut [S, T ] is u(s, T ) = head in T. a [S,T ] u a The capacity of the cut [S,T], denoted by u(s,t) is the cumulative capacity of the arcs in the cut, " a#[s,t] u a Cut [{1,2,3},{4,5,6}] Capacity: 3+2+3=8 s=1 (3,6) (1,1) (1,3) 2 5 (1,2) (0,2) (3,7) (4,4) t=6 (2,6) 3 (3,3) 4 (1,5) Lecture 3: sheet 26 / 29 Marc Uetz Discrete Optimization

27 Max-Flow Min-Cut Theorem(s) Weak Duality Theorem The value of any flow is at most equal to the capacity of any cut. So for any flow x and any cut [S, T ], v(x) u(s, T ). Strong Duality Theorem There is a flow x and a cut [S, T ] such that v(x) = u(s, T ). Lecture 3: sheet 27 / 29 Marc Uetz Discrete Optimization

28 Proof: Weak Duality Take any (s, t)-flow x and any (s, t)-cut [S, T ], then v(x) = x sj j:(s,j) A j:(j,s) A j:(s,j) A j:(j,s) A x js = x sj x js + = x ij i S j:(i,j) A = x ij (i,j) [S,T ] j:(j,i) A (j,i) [T,S] x ji i S\s x ji x ij u ij = u(s, T ) (i,j) [S,T ] (i,j) [S,T ] x ij j:(i,j) A j:(j,i) A x ji Lecture 3: sheet 28 / 29 Marc Uetz Discrete Optimization

29 Proof: Strong Duality!"#$%&'()*+,"- Take a maximum (s, t)-flow x, with value v(x), we construct a cut with Take theany same maximum capacity. (s,t) flow x in the network, with value v(x). We construct a cut [S,T] with the same capacity: Let S be the set of vertices Let S be the set of vertices reachable from s in residual graph reachable from s in the residual graph G(x). Let T = V!S. G(x), We know T = V t!s, \ S. by the previous Theorem (! augmenting path). Know t T by previous Theorem ( augmenting (s, t)-path) S s G(x) t T # # ( i, j) $ [ S, T ] ( i, j) $ [ T, S ] x x ij ij " u " 0 ij Hence, flow from S to T is u(s, T ), by flow balance = v(x) Hence, flow from S to T equals cut capacity, u(s,t), and by flow conservation, v(x) equals the flow from S to T. Lecture 3: sheet 29 / 29 Marc Uetz Discrete Optimization

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

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees , 2009 Lecture 5: Shortest Paths & Spanning Trees University of Twente m.uetz@utwente.nl wwwhome.math.utwente.nl/~uetzm/dw/ Shortest Path Problem "#$%&'%()*%"()$#+,&- Given directed "#$%&'()*+,%+('-*.#/'01234564'.*,'7+"-%/8',&'5"4'84%#3

More information

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths

Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Matroids Shortest Paths Discrete Optimization 2010 Lecture 2 Matroids & Shortest Paths Marc Uetz University of Twente m.uetz@utwente.nl Lecture 2: sheet 1 / 25 Marc Uetz Discrete Optimization Matroids

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

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

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

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

Graphs and Network Flows IE411. Lecture 15. Dr. Ted Ralphs Graphs and Network Flows IE411 Lecture 15 Dr. Ted Ralphs IE411 Lecture 15 1 Preflow-Push Algorithms First developed by A. V. Goldberg in 1985. Best preflow-push algorithms outperform best augmenting path

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

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

Single Source Shortest Paths

Single Source Shortest Paths CMPS 00 Fall 017 Single Source Shortest Paths Carola Wenk Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk Paths in graphs Consider a digraph G = (V, E) with an edge-weight

More information

CS 4407 Algorithms Lecture: Shortest Path Algorithms

CS 4407 Algorithms Lecture: Shortest Path Algorithms CS 440 Algorithms Lecture: Shortest Path Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Outline Shortest Path Problem General Lemmas and Theorems. Algorithms Bellman-Ford

More information

CMPS 6610 Fall 2018 Shortest Paths Carola Wenk

CMPS 6610 Fall 2018 Shortest Paths Carola Wenk CMPS 6610 Fall 018 Shortest Paths Carola Wenk Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk Paths in graphs Consider a digraph G = (V, E) with an edge-weight function w

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Design and Analysis of Algorithms CSE 5311 Lecture 21 Single-Source Shortest Paths Junzhou Huang, Ph.D. Department of Computer Science and Engineering CSE5311 Design and Analysis of Algorithms 1 Single-Source

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

Math 5490 Network Flows

Math 5490 Network Flows Math 90 Network Flows Lecture 8: Flow Decomposition Algorithm Stephen Billups University of Colorado at Denver Math 90Network Flows p./6 Flow Decomposition Algorithms Two approaches to modeling network

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

Introduction to Algorithms

Introduction to Algorithms Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 18 Prof. Erik Demaine Negative-weight cycles Recall: If a graph G = (V, E) contains a negativeweight cycle, then some shortest paths may not exist.

More information

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Dynamic Programming: Shortest Paths and DFA to Reg Exps CS 374: Algorithms & Models of Computation, Fall 205 Dynamic Programming: Shortest Paths and DFA to Reg Exps Lecture 7 October 22, 205 Chandra & Manoj (UIUC) CS374 Fall 205 / 54 Part I Shortest Paths with

More information

Dynamic Programming: Shortest Paths and DFA to Reg Exps

Dynamic Programming: Shortest Paths and DFA to Reg Exps CS 374: Algorithms & Models of Computation, Spring 207 Dynamic Programming: Shortest Paths and DFA to Reg Exps Lecture 8 March 28, 207 Chandra Chekuri (UIUC) CS374 Spring 207 / 56 Part I Shortest Paths

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

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

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

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

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

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

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

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness Marc Uetz University of Twente m.uetz@utwente.nl Lecture 9: sheet 1 / 31 Marc Uetz Discrete Optimization Outline 1 N P and co-n P 2 N P-completeness

More information

Introduction to Algorithms

Introduction to Algorithms Introduction to Algorithms 6.046J/18.401J LECTURE 14 Shortest Paths I Properties of shortest paths Dijkstra s algorithm Correctness Analysis Breadth-first search Prof. Charles E. Leiserson Paths in graphs

More information

CMPS 2200 Fall Carola Wenk Slides courtesy of Charles Leiserson with small changes by Carola Wenk. 10/8/12 CMPS 2200 Intro.

CMPS 2200 Fall Carola Wenk Slides courtesy of Charles Leiserson with small changes by Carola Wenk. 10/8/12 CMPS 2200 Intro. CMPS 00 Fall 01 Single Source Shortest Paths Carola Wenk Slides courtesy of Charles Leiserson with small changes by Carola Wenk 1 Paths in graphs Consider a digraph G = (V, E) with edge-weight function

More information

Lecture 3. 1 Polynomial-time algorithms for the maximum flow problem

Lecture 3. 1 Polynomial-time algorithms for the maximum flow problem ORIE 633 Network Flows August 30, 2007 Lecturer: David P. Williamson Lecture 3 Scribe: Gema Plaza-Martínez 1 Polynomial-time algorithms for the maximum flow problem 1.1 Introduction Let s turn now to considering

More information

Introduction to Algorithms

Introduction to Algorithms Introduction to Algorithms, Lecture 5 // Introduction to Algorithms 6.46J/.4J LECTURE Shortest Paths I Properties o shortest paths Dijkstra s Correctness Analysis Breadth-irst Pro. Manolis Kellis March,

More information

Lecture 13: Polynomial-Time Algorithms for Min Cost Flows. (Reading: AM&O Chapter 10)

Lecture 13: Polynomial-Time Algorithms for Min Cost Flows. (Reading: AM&O Chapter 10) Lecture 1: Polynomial-Time Algorithms for Min Cost Flows (Reading: AM&O Chapter 1) Polynomial Algorithms for Min Cost Flows Improvements on the two algorithms for min cost flow: Successive Shortest Path

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

Single Source Shortest Paths

Single Source Shortest Paths CMPS 00 Fall 015 Single Source Shortest Paths Carola Wenk Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk 1 Paths in graphs Consider a digraph G = (V, E) with an edge-weight

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

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

Introduction to Algorithms

Introduction to Algorithms Introduction to Algorithms 6.046J/8.40J/SMA550 Lecture 7 Prof. Erik Demaine Paths in graphs Consider a digraph G = (V, E) with edge-weight function w : E R. The weight of path p = v v L v k is defined

More information

Introduction to Algorithms

Introduction to Algorithms Introduction to Algorithms 6.046J/18.401J LECTURE 17 Shortest Paths I Properties of shortest paths Dijkstra s algorithm Correctness Analysis Breadth-first search Prof. Erik Demaine November 14, 005 Copyright

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

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

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

The Max Flow Problem

The Max Flow Problem The Max Flow Problem jla,jc@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark 1 1 3 4 6 6 1 2 4 3 r 3 2 4 5 7 s 6 2 1 8 1 3 3 2 6 2 Max-Flow Terminology We consider a digraph

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

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

Analysis of Algorithms. Outline. Single Source Shortest Path. Andres Mendez-Vazquez. November 9, Notes. Notes

Analysis of Algorithms. Outline. Single Source Shortest Path. Andres Mendez-Vazquez. November 9, Notes. Notes Analysis of Algorithms Single Source Shortest Path Andres Mendez-Vazquez November 9, 01 1 / 108 Outline 1 Introduction Introduction and Similar Problems General Results Optimal Substructure Properties

More information

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P Marc Uetz University of Twente m.uetz@utwente.nl Lecture 8: sheet 1 / 32 Marc Uetz Discrete Optimization Outline 1 Lagrangian

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

Breadth-First Search of Graphs

Breadth-First Search of Graphs Breadth-First Search of Graphs Analysis of Algorithms Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Applications of Breadth-First Search of Graphs a) Single Source

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

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

Introduction to Discrete Optimization

Introduction to Discrete Optimization Prof. Friedrich Eisenbrand Martin Niemeier Due Date: April 28, 2009 Discussions: April 2, 2009 Introduction to Discrete Optimization Spring 2009 s 8 Exercise What is the smallest number n such that an

More information

A FAST MAX FLOW ALGORITHM

A FAST MAX FLOW ALGORITHM A FAST MAX FLOW ALGORITHM Xiaoyue Gong MIT, xygong@mit.edu James B. Orlin MIT, jorlin@mit.edu Abstract. In 2013, Orlin proved that the max flow problem could be solved in O(nm) time. His algorithm ran

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

CS60020: Foundations of Algorithm Design and Machine Learning. Sourangshu Bhattacharya

CS60020: Foundations of Algorithm Design and Machine Learning. Sourangshu Bhattacharya CS6000: Foundations of Algorithm Design and Machine Learning Sourangshu Bhattacharya Paths in graphs Consider a digraph G = (V, E) with edge-weight function w : E R. The weight of path p = v 1 v L v k

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

INVERSE SPANNING TREE PROBLEMS: FORMULATIONS AND ALGORITHMS

INVERSE SPANNING TREE PROBLEMS: FORMULATIONS AND ALGORITHMS INVERSE SPANNING TREE PROBLEMS: FORMULATIONS AND ALGORITHMS P. T. Sokkalingam Department of Mathematics Indian Institute of Technology, Kanpur-208 016, INDIA Ravindra K. Ahuja Dept. of Industrial & Management

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

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

(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

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

Breadth First Search, Dijkstra s Algorithm for Shortest Paths

Breadth First Search, Dijkstra s Algorithm for Shortest Paths CS 374: Algorithms & Models of Computation, Spring 2017 Breadth First Search, Dijkstra s Algorithm for Shortest Paths Lecture 17 March 1, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 42 Part I Breadth

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

Duality of LPs and Applications

Duality of LPs and Applications Lecture 6 Duality of LPs and Applications Last lecture we introduced duality of linear programs. We saw how to form duals, and proved both the weak and strong duality theorems. In this lecture we will

More information

15.082J and 6.855J and ESD.78J October 21, Max Flows 4

15.082J and 6.855J and ESD.78J October 21, Max Flows 4 5.08J and 6.855J and ESD.78J October, 00 Max Flows 4 Overview of today s lecture Scaling Algorithms Potential function analysis The Excess Scaling Algorithm O(n log U) non-saturating pushes, where U =

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

The Minimum Cost Network Flow Problem

The Minimum Cost Network Flow Problem EMIS 8374 [MCNFP Review] 1 The Minimum Cost Network Flow Problem Problem Instance: Given a network G = (N, A), with a cost c ij, upper bound u ij, and lower bound l ij associated with each directed arc

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

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

CS 170 DISCUSSION 10 MAXIMUM FLOW. Raymond Chan raychan3.github.io/cs170/fa17.html UC Berkeley Fall 17 7 IUION MXIMUM FLOW Raymond han raychan.github.io/cs7/fa7.html U erkeley Fall 7 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

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

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

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

Discrete Optimization Lecture 5. M. Pawan Kumar

Discrete Optimization Lecture 5. M. Pawan Kumar Discrete Optimization Lecture 5 M. Pawan Kumar pawan.kumar@ecp.fr Exam Question Type 1 v 1 s v 0 4 2 1 v 4 Q. Find the distance of the shortest path from s=v 0 to all vertices in the graph using Dijkstra

More information

Standard Diraphs the (unique) digraph with no vertices or edges. (modulo n) for every 1 i n A digraph whose underlying graph is a complete graph.

Standard Diraphs the (unique) digraph with no vertices or edges. (modulo n) for every 1 i n A digraph whose underlying graph is a complete graph. 5 Directed Graphs What is a directed graph? Directed Graph: A directed graph, or digraph, D, consists of a set of vertices V (D), a set of edges E(D), and a function which assigns each edge e an ordered

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

A Bound for the Number of Different Basic Solutions Generated by the Simplex Method

A Bound for the Number of Different Basic Solutions Generated by the Simplex Method ICOTA8, SHANGHAI, CHINA A Bound for the Number of Different Basic Solutions Generated by the Simplex Method Tomonari Kitahara and Shinji Mizuno Tokyo Institute of Technology December 12th, 2010 Contents

More information

Week 4. (1) 0 f ij u ij.

Week 4. (1) 0 f ij u ij. Week 4 1 Network Flow Chapter 7 of the book is about optimisation problems on networks. Section 7.1 gives a quick introduction to the definitions of graph theory. In fact I hope these are already known

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 Booklet. 1 Graph Searching. 1.1 Breadth First Search

Algorithms Booklet. 1 Graph Searching. 1.1 Breadth First Search Algorithms Booklet 2010 Note: in all algorithms, unless stated otherwise, the input graph G is represented by adjacency lists. 1 Graph Searching 1.1 Breadth First Search Algorithm 1: BFS(G, s) Input: G

More information

Discrete Optimization 2010 Lecture 7 Introduction to Integer Programming

Discrete Optimization 2010 Lecture 7 Introduction to Integer Programming Discrete Optimization 2010 Lecture 7 Introduction to Integer Programming Marc Uetz University of Twente m.uetz@utwente.nl Lecture 8: sheet 1 / 32 Marc Uetz Discrete Optimization Outline 1 Intro: The Matching

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

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

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

CSE 431/531: Analysis of Algorithms. Dynamic Programming. Lecturer: Shi Li. Department of Computer Science and Engineering University at Buffalo

CSE 431/531: Analysis of Algorithms. Dynamic Programming. Lecturer: Shi Li. Department of Computer Science and Engineering University at Buffalo CSE 431/531: Analysis of Algorithms Dynamic Programming Lecturer: Shi Li Department of Computer Science and Engineering University at Buffalo Paradigms for Designing Algorithms Greedy algorithm Make a

More information

CSC2420: Algorithm Design, Analysis and Theory Spring (or Winter for pessimists) 2017

CSC2420: Algorithm Design, Analysis and Theory Spring (or Winter for pessimists) 2017 CSC2420: Algorithm Design, Analysis and Theory Spring (or Winter for pessimists) 2017 Allan Borodin January 30, 2017 1 / 32 Lecture 4 Announcements: I have posted all 7 questions for assignment 1. It is

More information

2 GRAPH AND NETWORK OPTIMIZATION. E. Amaldi Introduction to Operations Research Politecnico Milano 1

2 GRAPH AND NETWORK OPTIMIZATION. E. Amaldi Introduction to Operations Research Politecnico Milano 1 2 GRAPH AND NETWORK OPTIMIZATION E. Amaldi Introduction to Operations Research Politecnico Milano 1 A variety of decision-making problems can be formulated in terms of graphs and networks Examples: - transportation

More information

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

CSC Design and Analysis of Algorithms. LP Shader Electronics Example CSC 80- Design and Analysis of Algorithms Lecture (LP) LP Shader Electronics Example The Shader Electronics Company produces two products:.eclipse, a portable touchscreen digital player; it takes hours

More information

6. DYNAMIC PROGRAMMING II. sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph

6. DYNAMIC PROGRAMMING II. sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph 6. DYNAMIC PROGRAMMING II sequence alignment Hirschberg's algorithm Bellman-Ford distance vector protocols negative cycles in a digraph Shortest paths Shortest path problem. Given a digraph G = (V, E),

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

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.1 Interval Scheduling Interval Scheduling Interval scheduling. Job j starts at s j and

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

Shortest Path Algorithms

Shortest Path Algorithms Shortest Path Algorithms Andreas Klappenecker [based on slides by Prof. Welch] 1 Single Source Shortest Path 2 Single Source Shortest Path Given: a directed or undirected graph G = (V,E) a source node

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

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

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs Instructor: Shaddin Dughmi Outline 1 Introduction 2 Shortest Path 3 Algorithms for Single-Source Shortest

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

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

- 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

On Végh s Strongly Polynomial Algorithm for Generalized Flows

On Végh s Strongly Polynomial Algorithm for Generalized Flows On Végh s Strongly Polynomial Algorithm for Generalized Flows by Venus Hiu Ling Lo A thesis presented to the University of Waterloo in fulfillment of the thesis requirement for the degree of Master of

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

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016) The final exam will be on Thursday, May 12, from 8:00 10:00 am, at our regular class location (CSI 2117). It will be closed-book and closed-notes, except

More information

Slides credited from Hsueh-I Lu & Hsu-Chun Hsiao

Slides credited from Hsueh-I Lu & Hsu-Chun Hsiao Slides credited from Hsueh-I Lu & Hsu-Chun Hsiao Homework 3 released Due on 12/13 (Thur) 14:20 (one week only) Mini-HW 9 released Due on 12/13 (Thur) 14:20 Homework 4 released Due on 1/3 (Thur) 14:20 (four

More information