variations on max flow problems
play

Variations on Max-Flow Problems Math 482, Lecture 27 Misha Lavrov - PowerPoint PPT Presentation

Introduction Supply and demand problems Feasible circulations Bipartite matchings Variations on Max-Flow Problems Math 482, Lecture 27 Misha Lavrov April 8, 2020 Introduction Supply and demand problems Feasible circulations Bipartite


  1. Introduction Supply and demand problems Feasible circulations Bipartite matchings Variations on Max-Flow Problems Math 482, Lecture 27 Misha Lavrov April 8, 2020

  2. Introduction Supply and demand problems Feasible circulations Bipartite matchings Plan for the lecture The goal of today is to talk about several problems which can be reduced to max-flow problems (and solved using max-flow algorithms).

  3. Introduction Supply and demand problems Feasible circulations Bipartite matchings Plan for the lecture The goal of today is to talk about several problems which can be reduced to max-flow problems (and solved using max-flow algorithms). Problems we’ll consider: Supply and demand problems.

  4. Introduction Supply and demand problems Feasible circulations Bipartite matchings Plan for the lecture The goal of today is to talk about several problems which can be reduced to max-flow problems (and solved using max-flow algorithms). Problems we’ll consider: Supply and demand problems. Finding feasible flows with lower and upper bounds.

  5. Introduction Supply and demand problems Feasible circulations Bipartite matchings Plan for the lecture The goal of today is to talk about several problems which can be reduced to max-flow problems (and solved using max-flow algorithms). Problems we’ll consider: Supply and demand problems. Finding feasible flows with lower and upper bounds. Bipartite matchings and vertex covers (again).

  6. Introduction Supply and demand problems Feasible circulations Bipartite matchings Posing a supply/demand problem Recall: given a network ( N , A ), a flow x , and a node k ∈ N , the excess at k is � � ∆ k ( x ) := x ik − x kj . i :( i , k ) ∈ A j :( k , j ) ∈ A

  7. Introduction Supply and demand problems Feasible circulations Bipartite matchings Posing a supply/demand problem Recall: given a network ( N , A ), a flow x , and a node k ∈ N , the excess at k is � � ∆ k ( x ) := x ik − x kj . i :( i , k ) ∈ A j :( k , j ) ∈ A In a network flow problem, we want ∆ k ( x ) = 0 for k � = s , t . We want to maximize ∆ t ( x ).

  8. Introduction Supply and demand problems Feasible circulations Bipartite matchings Posing a supply/demand problem Recall: given a network ( N , A ), a flow x , and a node k ∈ N , the excess at k is � � ∆ k ( x ) := x ik − x kj . i :( i , k ) ∈ A j :( k , j ) ∈ A In a network flow problem, we want ∆ k ( x ) = 0 for k � = s , t . We want to maximize ∆ t ( x ). In a supply/demand problem, there is no source or sink. We have a vector d of demands. For every node k , we want ∆ k ( x ) = d k .

  9. Introduction Supply and demand problems Feasible circulations Bipartite matchings Posing a supply/demand problem Recall: given a network ( N , A ), a flow x , and a node k ∈ N , the excess at k is � � ∆ k ( x ) := x ik − x kj . i :( i , k ) ∈ A j :( k , j ) ∈ A In a network flow problem, we want ∆ k ( x ) = 0 for k � = s , t . We want to maximize ∆ t ( x ). In a supply/demand problem, there is no source or sink. We have a vector d of demands. For every node k , we want ∆ k ( x ) = d k . When d k < 0, k is a supply node : it has extra flow it wants to get rid of. When d k > 0, k is a demand node : it wants more entering than leaving flow.

  10. Introduction Supply and demand problems Feasible circulations Bipartite matchings Properties of supply/demand problems Observations: The supply/demand problem is a feasibility problem: we have no objective function, we just want to see if it’s possible to satisfy all demands.

  11. Introduction Supply and demand problems Feasible circulations Bipartite matchings Properties of supply/demand problems Observations: The supply/demand problem is a feasibility problem: we have no objective function, we just want to see if it’s possible to satisfy all demands. We know it’s impossible if � k ∈ N d k � = 0. Total supply must equal total demand!

  12. Introduction Supply and demand problems Feasible circulations Bipartite matchings Properties of supply/demand problems Observations: The supply/demand problem is a feasibility problem: we have no objective function, we just want to see if it’s possible to satisfy all demands. We know it’s impossible if � k ∈ N d k � = 0. Total supply must equal total demand! Example problem: a [ − 3 ] c [ 5 ] 2 4 6 b [ − 2 ]

  13. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation.

  14. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t .

  15. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k .

  16. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k . 3 For every k with d k < 0, add an arc ( s , k ) with capacity − d k .

  17. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k . 3 For every k with d k < 0, add an arc ( s , k ) with capacity − d k . a [ − 3 ] c [ 5 ] 2 4 6 b [ − 2 ]

  18. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k . 3 For every k with d k < 0, add an arc ( s , k ) with capacity − d k . a [ − 3 ] c [ 5 ] 2 s t 4 6 b [ − 2 ]

  19. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k . 3 For every k with d k < 0, add an arc ( s , k ) with capacity − d k . c a [ − 3 ] 2 5 s 6 t 4 b [ − 2 ]

  20. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k . 3 For every k with d k < 0, add an arc ( s , k ) with capacity − d k . a c 2 3 5 s 4 6 t b [ − 2 ]

  21. Introduction Supply and demand problems Feasible circulations Bipartite matchings Reducing supply/demand problems to max-flow We solve supply/demand problems by turning them into an equivalent max-flow problem. Then, we solve the max-flow problem and undo the transformation. Rule for constructing the max-flow instance: 1 Add new nodes s and t . 2 For every k with d k > 0, add an arc ( k , t ) with capacity d k . 3 For every k with d k < 0, add an arc ( s , k ) with capacity − d k . a c 2 3 5 s 4 6 t 2 b

  22. Introduction Supply and demand problems Feasible circulations Bipartite matchings Going from max-flow back to supply/demand The supply/demand problem is only feasible if all the arcs into t are at capacity in the maximum flow. (Then, all arcs out of s will also be at capacity.)

  23. Introduction Supply and demand problems Feasible circulations Bipartite matchings Going from max-flow back to supply/demand The supply/demand problem is only feasible if all the arcs into t are at capacity in the maximum flow. (Then, all arcs out of s will also be at capacity.) If this happens, we get the supply/demand solution by erasing nodes s , t and all their arcs.

Recommend


More recommend