Graph Theory

(a) Prove that the distance function d(u,v)d(u,v) on a pair of vertices of a graph satisfies the triangle inequality: d(u,v)+d(v,w)d(u,w).d(u,v)+d(v,w)d(u,w).

728x90
반응형

문제출처

광주과학기술원 GIST 최정옥 교수님의 “그래프 이론” 수업, 2024년 가을학기 중 Homework 5

풀이

1. The distance d(u,v)d(u,v) between two vertices uu and vv is the length of the shortest path connecting uu and vv.

2. Suppose d(u,v)+d(v,w)<d(u,w)d(u,v)+d(v,w)<d(u,w).

  • By definition, d(u,v)d(u,v) is the length of the shortest path from uu to vv, and d(v,w)d(v,w) is the length of the shortest path from vv to ww.
  • However, d(u,w)d(u,w) is the length of the shortest path from uu to ww.
  • If d(u,v)+d(v,w)d(u,v)+d(v,w) is less than d(u,w)d(u,w), then d(u,w)d(u,w) is not the shortest path between uu and ww.

3. This contradicts the definition of d(u,w)d(u,w). Therefore,
d(u,v)+d(v,w)d(u,w).d(u,v)+d(v,w)d(u,w).

Thus, the distance function d(u,v)d(u,v) satisfies the triangle inequality.

728x90
반응형