1 / 13

Algorithm that allows (conservation of flow not maintained) before completion.

3.4 Push- Relabel ( Preflow -Push) Maximum Flow Alg. Algorithm that allows (conservation of flow not maintained) before completion. For ease of exposition, take ( i ) if and (conceptual device)

livana
Download Presentation

Algorithm that allows (conservation of flow not maintained) before completion.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3.4 Push-Relabel(Preflow-Push) Maximum Flow Alg. • Algorithm that allows (conservation of flow not maintained) before completion. • For ease of exposition, take (i) if and (conceptual device) (ii) Define auxiliary digraph as before, but do not bother with parallel arcs, i. e., we put iff or . If , up to can be “pushed” from to (residual capacity of ) (increase to and decrease to 0 )

  2. Definitions: We call a preflow if it satisfies for all feasible preflow if it also satisfies pushon : For pair with and , pushing up to min from to . (it produces new feasible preflow ) (If both and are arcs of and , we decrease first as much as possible, then increase ) (pushing 2 units on ab) 4,0 4,0 3,3 3,3 1,0 4,1 1,1 4,0 4,4 4,4 2,1 2,1

  3. Definitions: We call activeif (has positive net flow) • Idea: • choose an active node and push flow toward sink. • difficulties • order of selection • pushing on , then , ... causes infinite loop. • Possible to have situation that we cannot push toward sink, but there are still active nodes. • retreat to restore conservation of flow • to identify the direction of push, use estimate of distances in

  4. We say vector is a valid labellingwith respect to a preflow if , (3.14) for every arc of , (Recall that denotes the number of arcs in a shortest dipath in . satisfies all conditions except .) • Valid labelling gives an estimate of the shortest distance of the node to in . Given an active node , we try to push excess flow to the node closer to using the valid label as estimate. • However, valid labelling may not exist for some feasible preflow. So, start with some feasible preflow and valid labelling which we can easily identify and maintain the validity of labelling.

  5. Constructing initial feas. preflow and valid labelling(initialize ) Put for all arcs having tail for all other arcs Put , for all other nodes (Assume each ) (1,0) (Initialize ) 0 0 (1,0) (1,0) (1,1) (3,0) (3,0) 6 0 (4,4) (4,0) (1,0) 0 0 (1,0)

  6. Prop 3.22: If is a feasible preflow and is a valid labelling for , then there exists an -cut such that for all and for all . (feasible preflow and valid labelling saturates a cut) (pf) There exists , , such that for all . Take . Then and . (3.14) implies that no arc of leaves .  • Cor 3.23: If a feasible flow has a valid labelling, then is a maximum flow. In what sense a valid labelling gives an approximation to distances in ? • Lemma 3.24: For any feasible preflow, and any valid labelling for , we have , for all . (pf) If , true. So suppose finite. Consider any shortest dipath in . Add inequality on the arcs on the dipath. 

  7. Observations: is a lower bound on is a lower bound on If , it means , and excess flow at should be moved toward the source . • At a node with excess flow, we try to move flow toward nodes having . and is an arc of (We have for a valid labelling) push the preflow only on the arc in with . (admissiblearc) Note that push does not affect the validity of the labelling ( a possible new arc in satisfies . • If active, but no in with increase to min (labelling still valid) ; relabel

  8. Process While there exists an admissible arc Push on ; If is active Relabel. Push-Relabel Algorithm Initialize ; While is not a flow Choose an active node ; Process .

  9. Modification on basic form: Maximum distance push-relabel algorithm - Choose active node whose distance label is maximum ( ) • Bounds on the number of operations relabels: pushes: (1) saturating push : , value pushed is , leaves : (2) nonsaturating push: is no longer active : total pushes max distance push-relabel has nonsaturating pushes. total pushes • Proofs: reading assignment

  10. (Implementation of Push-Relabel Algorithms) • For each , we keep list of pairs such that or (or both) is an arc of (possible arcs in ) For each in , keep . Keep links between and (update residual capacity on and in constant time) For each , keep and • Each relabel of node takes . Each push on takes constant time once the arc is selected for push. Total time looking for admissible arcs and determining whether it is time to relabel?

  11. Lemma 3.32: Suppose is active and arc is not admissible. Then before becomes admissible, there will be a relabel of . (pf) If not admissible, then (1) or (2) . In the case of (2), need push on before becomes admissible, which needs , i.e. . Hence need relabel of before becomes admissible. • Processing of results in (1) relabelling of or (2) push that makes inactive. If case (2), when we process node again, we do not need to push on the arcs that became inadmissible earlier by Lemma 3.32. Hence, remember the current element of where we stopped scanning, and start from that point when we process node again. relabel node when and only when a traversal of is completed.

  12. can be relabeled at most times (Lemma 3.28), hence only need traversal of . => Total time spent looking for admissible arcs is Total time spent on relabelis the same, since each relabel of takes . Let be the number of pushes. Total time spent on choosing the next active node is since each one leads to a push or a relabel. (For general algorithm, maintain list of active nodes) Total time for general algorithm is

  13. For maximum distance push-relabel algorithm, not sure if choosing the next active node can be done in constant time. (may need if we use list) Maintain doubly linked list for the (active) nodes s.t.. Also maintain pointer for node to its position in . If a node is relabelled, we remove it from its list and insert it into its new list. If we use max distance rule, after is relabeled, it still has max distance. If becomes inactive and empty, there almost always exists with and active (unless ), so can look at . Some abnomalities can be handled with bounds. • Thm 3.34: Maximum distance push-relabel max flow algorithm can be implemented to run in time .

More Related