Prove that if graph G is connectivity so for any 3 vertices $v,u,w$ :$ d(v,w)+d(w,u) \geq d(v,u)$

1k Views Asked by At

d(v,u) denotes the shortest distance between 2 vertices: v,u. Prove that if graph G is connected, so for any 3 vertices v,u,w : $d(v,w)+d(w,u) \geq d(v,u)$. Any help will be much appreciated.

1

There are 1 best solutions below

2
On

I'd rather comment on this, but since I am not allowed to, I'll just post an answer. If $d(u,v) = m$ and $d(v,w) = n$, there are paths from $u$ to $v$ of length $m$ and from $v$ to $w$ of length $n$. But the concatenation of those two paths is a path from $u$ to $w$ of length $m+n$, witnessing that the shortest path from $u$ to $w$ has at most length $m+n$, which gives the desired inequality.