and $w_2 \colon E(G_2) \to \mathbb{R}^{+}$. We write $G_1(w_1) \simeq G_2(w_2)$ and say that $G_1(w_1)$ and $G_2(w_2)$ are isomorphic if there is a bijection $f \colon V(G_1) \to V(G_2)$ such that $$(\{u, v\} \in E(G_1)) \Leftrightarrow (\{f(u), f(v)\} \in E(G_2))$$ for all $u$, $v \in V(G_1)$ and, moreover, $$w_1(\{u, v\}) = w_2(\{f(u), f(v)\})$$ holds whenever $\{u, v\} \in E(G_1)$.

The following result shows that the validity of is a characteristic property of trees.

\[p3.4\] Let $G_1$ and $G_2$ be connected, nonempty graphs. Then the following statements are equivalent:

1.  \[p3.4:s1\] $G_1$ and $G_2$ are trees.

2.  \[p3.4:s2\] The equivalence $$(G_1(w_1) \simeq G_2(w_2)) \Leftrightarrow ((V(G_1), \rho_{w_1}) \simeq (V(G_2), \rho_{w_2}))$$ is valid for all strictly positive $w_1 \colon E(G_1) \to \mathbb{R}^{+}$ and $w_2 \colon E(G_2) \to \mathbb{R}^{+}$.

$\ref{p3.4:s1} \Rightarrow \ref{p3.4:s2}$. This implication is valid by Corollary \[c3.2\].

$\ref{p3.4:s2} \Rightarrow \ref{p3.4:s1}$. As in the proof of Theorem \[t3.4\], it is easy to see that the implication $$(G_1(w_1) \simeq G_2(w_2)) \Rightarrow ((V(G_1), \rho_{w_1}) \simeq (V(G_2), \rho_{w_2}))$$ is valid. But, in general, the converse implication is false.

Indeed, suppose that $G$ is a finite, connected, nonempty graph which contains a cycle $C$, $C \subseteq G$. Let $e_0$ be a fixed edge of $C$, $e_0 \in 