Presentation is loading. Please wait.

Presentation is loading. Please wait.

Excess Scaling Approach Algorithm

Similar presentations


Presentation on theme: "Excess Scaling Approach Algorithm"— Presentation transcript:

1 Excess Scaling Approach Algorithm
January 31,2008 Instructor Dr. Naveen Garg Scribe by : Anjali Agarwal(2007mcs2900) Nidhi Arora(2007mcs2913)

2 Excess Scaling Approach
Need For Excess Scaling Approach: To reduce the time spent in non saturating pushes in the preflow - push algorithm covered before. Let, U = Maximum capacity edge in the network. (It can also be maximum capacity edge e originating from source as maximum flow along any path cannot be more than capacity of e) = the scaling parameter. It is chosen to be minimum value greater than U in the power of two. e(i) = Excess on node i. e(i) = jN xji - jN xij  0, for all i  N – {s, t}. level(i) = d(i) (ie distance label of node i)

3 Excess scaling approach algorithm
Let U be the maximum capacity edge originating from the source. Let  be the minimum power of two, greater than U. Excess approach( ) begin push all the flow from the source s to its neighbour level(s)=n Do select a node j(except source and sink) with excess e(j) such that e(j)>=/2 level(j) is minimum (lowest level node with excess >=/2)

4 Algorithm continue 62 28 24 2 64 
Check whether selected node has valid distance label if not relabel otherwise Push the flow from the selected node such that no node j has excess e(j) >  Until(No node left with excess >=/2) =/2 Until(No node left with excess except source and sink) 62  2 40 28 24 2 36 4 2 64 Fig:-residual graph with excess and residual capacity when 

5 Analysis of excess flow algorithm
Number of relabelling steps: A node can be relabelled at most 2n-1 times. A node if has an excess then there is a path from node to the source. Distance label of the source is n. Therefore node can have highest distance label as 2n-1. Thus a node can be relabelled at most 2n times (distance label never decreases). Since there are n nodes, Thus number of relabels can be at most O(n2).

6 Analysis continued:- Relabeling time:
To relabel node j, one needs to scan each arc of A(j). So, each arc gets scanned at most 2n times. Total relabel time is O(nm). Saturating push time: Saturating push is the flow send along any edge which is equal to the residual capacity of that edge. To push the flow again from this edge the end nodes need to relabeled As a node can be relabeled at most 2n times and number of edges are m, therefore time taken for saturating pushes is O(nm).

7 Saturating push decreases the potential which is negligible.
Analysis continued:- Time taken for non saturating pushes:- Let potential function be ɸ=∑((e(j).d(j))/) Now,relabeling increases the potential by at most 1 and at by least ½. d(j) increases by one(because of relabellings). <=e(j)<=. therefore, 1/2<=(e(j)/)<=1. Number of relabels n2 Total increase in potential due to relabel O(n2). Potential always decreases after a flow . Saturating push decreases the potential which is negligible. Let non saturating push be x Non saturating pushes decrease potential by at least ½. Push is done only when excess >= /2. so, at least /2 excess is increased at the lower level and /2 is decreased at this(node) level. Potential decrease due to non-saturating pushes is at least x/2.

8 Analysis continued:- The total time taken by excess scaling algorithm :- time taken for relabel O(nm) time taken by saturating pushes O(nm) time taken by non – saturating pushes O(n2log U) total time taken O(nm + n2log U) Initial potential : 2n2. final potential : zero. Therefore, -x/2+2n2+c*n2=0 x=c1*n2 Time taken by non – saturating pushes in a phase is O(n2) Number of phases log U. Time taken due to non saturating pushes are O(n2log U).


Download ppt "Excess Scaling Approach Algorithm"

Similar presentations


Ads by Google