Skip to main content
. 2013 Nov 5;139(17):174105. doi: 10.1063/1.4827495

Table 2.

Algorithm 2 - Modified Dijkstra's algorithm for finding maximum weights and bottleneck (EMW) edges from s to all other vertices in a graph G. Refer to the algorithm description for the meaning of all variables.

Procedure maxWeightPath(G,s)  
For each v in G 1
  M(v) = −1 2
  3
M(s) = ∞ 4
Q = V  // Add all the vertices in G 5
  6
while Q ≠ NULL 7
  u = EXTRACT_MAX(Q) 8
  for each v in Adj(u) 9
   if M(v) < min(M(u),w(u,v))  // M(v) = max(M(v),min(M(u),w(u,v))) 10
    M(v) = min(M(u),w(u,v)) 11
  12
    if M(u) < w(u,v) 13
     bottleneck(v) = bottleneck(u) 14
    Else 15
      bottleneck(v) = (u,v) 16
return bottleneck, M 17