| Algorithm 1 Push-Relabel_MaximumFlow_Algorithm [28]. |
|
Input: PPI, Capacity = C, N = unique nodes of PPI, start_node = SDN, destination_node = DDN. Output: Maximum flow between SDN and DDN (1) FOR i = 1 to length [N]: a. HeightV [i] = 0//HeightV is height of every vertex b. FlowV [i] = 0//FlowV is the flow of every vertex (2) HeightV [start_node] = length [N] (3) FOR i = 1 to length [PPI]: a. FlowE [i] = 0//FlowE is the flow of every edge in the PPI (4) V = adjacentVetex[start_node] (5) FOR i = 1 to length [V]: a. FlowV [V[i]] = Capacity [V[i]] b. excessFlow [V[i]] = Capacity [V[i]] (6) PUSH: FOR i = 1 to length [N]: If excessFlow [N[i]] ≠ 0: (in the residual graph) tmpV = adjacentVetex[N[i]] if HeightV [N[i]] > lowest_height[tmpV] Push_flow from N[i] to lower height vertices (7) RELABEL: FOR i = 1 to length [N]: If excessFlow [N[i]] ≠ 0: (in the residual graph) tmpV = adjacentVetex[N[i]] if HeightV [N[i]] ≤ lowest_height[tmpV] HeightV [N[i]] = minimumHeight[tmp] |