Proving $\delta(s,u)+w(u,v)=\delta(s,v)$ in a Shortest Path

  • MHB
  • Thread starter evinda
  • Start date
  • Tags
    Path
In summary, the conversation discusses a proof of an algorithm called Relaxation, which involves relaxing edges in a shortest path from vertex s to vertex v. The proof shows that after relaxation, the distance from s to v is equal to the distance along the shortest path. This is because the shortest path itself is equal to the distance from s to u, plus the weight of the edge (u,v), which is also equal to the distance from s to v. The conversation concludes with the questioner understanding the explanation.
  • #1
evinda
Gold Member
MHB
3,836
0
Hey! (Blush)

I am looking at the proof of the following sentence:

Let $s \to u \to v$ a shortest path from the vertex $s$ to the vertex $v$.
Suppose that we relax at some time the edge $(u,v)$.If,before the call of Relaxation(u,v,w),it stands that $d=\delta(s,u)$,then after the call of Relaxation(u,v,w),it stands that $d[v]=\delta(s,v)$.

The algorithm of the function Relaxation(u,v,w) is the following:

Code:
Relaxation(u,v,w)
 if d[v]>d[u]+w(u,v)
    d[v]<-d[u]+w(u,v)
    p[v]<-u

This is the proof (Wait) :

If $d$ gets at some time the value $\delta(s,u)$,$d$ remains unchanged.After the relaxation,we have:

$$d[v] \leq d+w(u,v) \\ \ \ \ = \delta(s,u)+w(u,v) \\ \ \ \ = \delta(s,v)$$

So,we have: $d[v] \leq \delta(s,v)$.

However, it is known that $d[v] \geq \delta(s,v)$.

So,we conclude that $d[v]=\delta(s,v)$.

Could you explain me why $\delta(s,u)+w(u,v)=\delta(s,v)$ ? (Thinking)
 
Physics news on Phys.org
  • #2
Hi! (Smirk)

evinda said:
Could you explain me why $\delta(s,u)+w(u,v)=\delta(s,v)$ ? (Thinking)

Let $s \to u \to v$ a shortest path from the vertex $s$ to the vertex $v$.

Since $s \to u \to v$ is a shortest path, it follows that $\delta(s,u)+w(u,v)=\delta(s,v)$.
 
  • #3
I like Serena said:
Hi! (Smirk)Since $s \to u \to v$ is a shortest path, it follows that $\delta(s,u)+w(u,v)=\delta(s,v)$.

I got it now! Thank you very much! (Smirk)
 

FAQ: Proving $\delta(s,u)+w(u,v)=\delta(s,v)$ in a Shortest Path

How do you define $\delta(s,u)$ and $w(u,v)$ in the context of shortest path algorithms?

In the context of shortest path algorithms, $\delta(s,u)$ represents the shortest distance from a starting node $s$ to a node $u$, while $w(u,v)$ represents the weight or cost of the edge between nodes $u$ and $v$. Both of these are crucial components in determining the shortest path between two nodes.

What is the significance of proving $\delta(s,u)+w(u,v)=\delta(s,v)$ in a shortest path?

Proving the equation $\delta(s,u)+w(u,v)=\delta(s,v)$ is important because it demonstrates that the shortest path algorithm being used is valid and can accurately determine the shortest path between any two nodes. It also helps to understand the relationship between the shortest distance from the starting node to a specific node and the weight of the edge between that node and its neighbor.

Can you provide an example of how this equation is used in real-world applications?

Yes, this equation is commonly used in various transportation and logistics applications, such as finding the shortest route between two locations or optimizing delivery routes for packages. It can also be applied in network routing, where the shortest path between two nodes is needed for efficient data transmission.

Are there any cases where this equation may not hold true?

In certain situations, such as when there are negative edge weights or cycles in the graph, this equation may not hold true. In these cases, alternative shortest path algorithms may be needed to accurately determine the shortest path between two nodes.

How can this equation be proven in a shortest path algorithm?

This equation can be proven using mathematical induction or by using the properties of shortest paths, such as the triangle inequality. Proving it requires showing that the shortest path from the starting node to a specific node is equal to the shortest path from the starting node to a neighboring node, plus the weight of the edge between those two nodes. This can be done for all nodes in the graph, demonstrating that the equation holds true for all shortest paths.

Similar threads

Replies
11
Views
3K
Replies
6
Views
2K
Replies
1
Views
999
Replies
1
Views
982
Replies
13
Views
3K
Replies
6
Views
2K
Replies
2
Views
2K
Replies
3
Views
731
Back
Top