$\mathcal{P}_{u, v}$ is the set of all paths joining $u$ and $v$ in $G$. If $G$ is a tree, then, for any pair of distinct $u$, $v \in G$, the set $\mathcal{P}_{u, v}$ contains the unique path. Thus, the metrics $d_w$ and $\rho_w$ coincide for trees.

The metric defined by  is called *additive*. If $w(e) = 1$ holds for every $e \in E(G)$, then $d_{w}$ is called the *graph metric* on $G$.

It is easy to prove that the connected graphs $G_1$ and $G_2$ are isomorphic as free, unweighted graphs if and only if the metric spaces $(V(G_1), d_1)$ and $(V(G_2), d_2)$ are isometric, where $d_i$ is graph metric on $G_i$, $i = 1$, $2$. The following theorem is a partial generalization of this fact.

\[t3.4\] Let $T_1 = T_1(w_1)$ and $T_2 = T_2(w_2)$ be weighted trees with strictly positive weights. Then a mapping $f \colon V(T_1) \to V(T_2)$ is an isometry of the metric spaces $(V(T_1), d_{w_1})$ and $(V(T_2), d_{w_2})$ if and only if it is an isomorphism of the weighted trees $T_1(w_1)$ and $T_2(w_2)$.

Let $u$, $v \in V(T_1)$. If $f$ is an isomorphism of $T_1(w_1)$ and $T_2(w_2)$, then, using , and the uniqueness of the path $P_{u, 