6 (a) (b (c) BELLMAN-FORD(G,w,s) 6 1 INITIALIZE-SINGLE-SOURCE(G,S) 2 for i 1to |G.V]-1 3 for each edge (u.v)G.E (d) (e) 遍历顺序 RELAX(u,v,w) 5 for each edge (u,v)G.E (t,x),(1,y),(亿,z,(x,t),y,x),y,z,(3,x),(3,S),(s,1,(s,y)6 if v.d>u.d+w(u,v) 7 return FALSE 8 return TRUE遍历顺序