I have Vertices V={s,u,v,x} as well as Edges E={(s,u),(s,x),(s,v),(u,v),(v,x),(x,u)) as well as the following Weights:
W(s, u) = 1
W(v, x) = W(x, u) = W(s, v)=2
W(u, v) = -3
W(s, x) = -1
Now I am executing Initialize(G,w,s) making s the starting point and initialize s.d = 0. I need the shortest path distances of u,v,x. Since they are all connected to s, I can just use the weight of W(s, u), W(s, v), W(s, x). But x.d would be -1. Is that even applicable ? Could I now use this distance to correctly execute Relax(s,x,w) and get a correct output?
Thanks in Advance