Research Article

DMGA: A Distributed Shortest Path Algorithm for Multistage Graph

Algorithm 3

Local shortest path calculation.
Require: The graph partition
 Ensure: list of shortest paths
(1)for to do
(2)
(3)
(4)end for
(5)for to do for each stage
(6) for to do for each vertex of stage
(7) for to do for each vertex of the first stage
(8)  
(9)  for all do
(10)   if then a shorter path than before
(11)    
(12)    
(13)    end if
(14)   end for
(15)  end for
(16) end for
(17)end for
(18)for to do backtrack the shortest paths
(19) for to do
(20)  
(21)  
(22)  
(23)  while do
(24)   
(25)   
(26)   
(27)  end while
(28) end for
(29)end for