Monday, 15 August 2011

data structures - Some claims on shortest path between two vertex in Diagraph? -


If we show the shortest path between two headers with delta (u, v) We can guess: weighted and guided graphs; (maybe we have negative edges) I can guess:

(1) -If we have no negative cycle, then delta (U, T)) and Lieutenant; = Delta (U, V) + Delta (V, T)

(2) - If we did not have any negative cycles, then for each two head, v, Delta (U, V) is equal to -infinity

(3) -If we have negative edges, but there was no negative cycle, then Sigma Delta (U, V) (Yoga on all top joints) can not be negative.

is not mentioned here (3), why is delta, v) where there is no way from U to V? Maybe 0, anyone can verify me

Yes, no and depends.

- If we did not have any negative cycles, then delta (u, t) & lt; = Delta (U, V) + Delta (V, T)

By having delta (u, v) and delta ( V, T) , we know that u to V > delta (U, V) and V to t with length Delta (V, T) . By inserting them, we get the path from u to t length Delta (U, V) + Delta (V, T) . Unfortunately, the minimum length of time for u to t is equal to or equal to the length of this path.

If we do not have any negative circle, then for every two top, v, delta (u, v) is equal to -infinity

You probably do not have enough to create Delta (U, V) " If we done negative cycle "

wanted to write equal to -infinity for any U, V ; Only for those people where the path connecting them goes through any of the chakras of that circle, this will be true in a firmly linked graph.

- If we have negative edges, but there is no negative circle, then sigma (u, v) on delta (yoga on all top pairs) is not negative so may.

For a diagram in general, it is not well defined - Delta (U, V) is u There is no way to v from? If you say that delta (u, v) = infinity in that case, then your statement is correct (as given below).

If you only consider a firm connected graph, where each pair is connected to the corner and delta (u, v) is defined, the length of the sum is non-negative This is because the u, v yoga for both the specific pair contains both the delta (u, v) and delta (v, u) . Because there is no negative cycle, delta (u, v) + delta (v, u) & gt; = 0 . Except for a pair of Delta (U, V) and Delta (V, U) , only in the Delta (U, U) = 0 u for everyone. Explained, we get a non-negative number.


No comments:

Post a Comment