CSE 5311 Section 501 Fall 1998
Homework 6
Due: April 15, 1998, in class
Initialize-Single-Source(G,s)
for each vertex v in V[G]
d[v] = infinity
pi[v] = nil
d[s] = 0
Relax(u,v,w)
if d[v] > d[u] + w(u,v)
then d[v] = d[u] + w(u,v)
pi[v] = u
Bellman-Ford(G,w,s)
1. Initialize-Single-Source(G,s)
2. for i = 1 to |V[G]| - 1
3. for each edge (u,v) in E[G]
4. Relax(u,v,w)
5. for each edge (u,v) in E[G]
6. if d[v] > d[u] + w(u,v)
7. then return {\sc false}
8. return true
What is the running time, the speedup, and the efficiency of the parallel algorithm?
Diane J. Cook