cmsc 451 max flow extensions
play

CMSC 451: Max-Flow Extensions Slides By: Carl Kingsford Department - PowerPoint PPT Presentation

CMSC 451: 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 Demands Suppose we have


  1. CMSC 451: 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.

  2. Circulations with Demands • Suppose we have multiple sources and multiple sinks. • Each sink wants to get a certain amount of flow (its demand ). • Each source has a certain amount of flow to give (its supply ). • We can represent supply as negative demand .

  3. Demand Example 6 supply d1 = -4 d4 = 0 7 4 1 3 4 9 3 8 11 5 d8 = 8 14 3 7 2 3 4 2 10 4 5 supply d2 = -7 9 demand d5 = 3

  4. Constraints Goal: find a flow f that satisfies: 1 Capacity constraints: For each e ∈ E , 0 ≤ f ( e ) ≤ c e . 2 Demand constraints: For each v ∈ V , f in ( v ) − f out ( v ) = d v . The demand d v is the excess flow that should come into node.

  5. Sources and Sinks Let S be the set of nodes with negative demands (supply). Let T be the set of nodes with positive demands (demand). In order for there to be a feasible flow, we must have: � � − d s = d t s ∈ S t ∈ T Let D = � t ∈ T d t .

  6. Reduction How can we turn the circulation with demands problem into the maximum flow problem?

  7. Reduction How can we turn the circulation with demands problem into the maximum flow problem? 1 Add a new source s ∗ with an edge ( s ∗ , s ) from s ∗ to every node s ∈ S . 2 Add a new sink t ∗ with an edge ( t , t ∗ ) from t ∗ to every node t ∈ T .

  8. Reduction How can we turn the circulation with demands problem into the maximum flow problem? 1 Add a new source s ∗ with an edge ( s ∗ , s ) from s ∗ to every node s ∈ S . 2 Add a new sink t ∗ with an edge ( t , t ∗ ) from t ∗ to every node t ∈ T . The capacity of edges ( s ∗ , s ) = − d s (since d s < 0, this is +ve) The capacity of edges ( t , t ∗ ) = d t .

  9. Circulation Reduction Example 6 supply d1 = -4 7 4 4 3 1 4 9 s* 11 3 5 8 d8 = 8 7 14 3 7 3 4 2 8 2 4 9 10 supply d2 = -7 5 3 t* demand d5 = 3 Feasible circulation if and only if there is a flow of value D = � t ∈ T d t .

  10. Notes Intuition: • Capacity of edges ( s ∗ , s ) limit the supply for source nodes s . • Capacity of edges ( t , t ∗ ) require that d t flow reaches each t . Hence, we can use max-flow to find these circulations.

  11. Lower Bounds Another extension: what if we want lower bounds on what flow goes through some edges? In other words, we want to require that some edges are used. Goal: find a flow f that satisfies: 1 Capacity constraints: For each e ∈ E , ℓ e ≤ f ( e ) ≤ c e . 2 Demand constraints: For each v ∈ V , f in ( v ) − f out ( v ) = d v .

  12. Lower Bounds Suppose we defined an initial flow f 0 by setting the flow along each edge equal to the lower bound. In other words: f 0 ( e ) = ℓ e . This flow satisfies the capacity constraints, but not the demand constraints. Define: L v = f in 0 ( v ) − f out ( v ). 0 Recall that the demand constraints say that f in ( v ) − f out ( v ) = d v . Hence, L v is equal to the amount of the demand that f 0 satisfies at node v .

  13. New Graph For each node, our flow f 0 satisfies L v of its demand, hence we have: New demand constraints: f in ( v ) − f out ( v ) = d v − L v Also, f 0 uses some of the edge capacities already, so we have: New capacity constraints: 0 ≤ f ( e ) ≤ c e − ℓ e These constraints give a standard instance of the circulation problem.

  14. Lower Bound Example lower -3 -4 bound = 1 1 1 3 2 3 3 -1 3 -2 3 4 4 10 10 2 2 (a) Small instance where one edge (b) After transformation, we have has a lower bound. This makes an equivalent instance with no the most obvious flow not feasible. lower bounds.

  15. Reduction: Given a circulation instance G with lower bounds, we: 1 subtract ℓ e from the capacity of each edge e , and 2 subtract L v from the demand of each node v . (This may create some new “sources” or “sinks”.) We then solve the circulation problem on this new graph to get a flow f ′ . To find the flow that satisfies the original constraints, we add ℓ e to every f ′ ( e ).

  16. Summary We can efficiently find a feasible flow for the following general problem: Circulations with demands and lower bounds Given: • a directed graph G • a nonnegative lower bound ℓ e for each edge e ∈ G • a nonnegative upper bound c e ≥ ℓ e for each edge e ∈ G • and a demand d v for every node Find: a flow f such that • ℓ e ≤ f ( e ) ≤ c e for every e , and • f in ( v ) − f out ( v ) = d v for every v .

  17. Serial Reductions. . . We designed the algorithm for this general problem by reducing Circulation with Lower Bounds problem to the Circulation without Lower Bounds problem. We in turn reduced that problem to the Max Flow problem.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend