Prove that for any vertices u, v, w in graph G d(u, w) ≤ d(u, v) + d(u, w)?
It is trivially true.
d(u,v) ≥ 0
if you add it to d(u,w) you will get
d(u, w) ≤ d(u, v) + d(u, w)
if you had meant to ask about:
d(u, w) ≤ d(u, v) + d(v, w)
this is true since the shortest distance between two points is a straight line
you can also use pythagoras' theorem or the distance formula for these three distances.
Copyright © 2024 1QUIZZ.COM - All rights reserved.
Answers & Comments
Verified answer
It is trivially true.
d(u,v) ≥ 0
if you add it to d(u,w) you will get
d(u, w) ≤ d(u, v) + d(u, w)
if you had meant to ask about:
d(u, w) ≤ d(u, v) + d(v, w)
this is true since the shortest distance between two points is a straight line
d(u, w) ≤ d(u, v) + d(v, w)
you can also use pythagoras' theorem or the distance formula for these three distances.