E(C)$, and let $S_1 := |E(G)|$. Write $G_1 = G$ and $G = G_2$. We can define two weights $w_1 \colon E(G_1) \to \mathbb{R}^{+}$ and $w_2 \colon E(G_2) \to \mathbb{R}^{+}$ such that $$\label{p3.4:e1}
w_1(e_0) = 1 + |E(G_1)|, \quad w_2(e_0) = 2 + |E(G_2)|$$ and $w_1(e) = w_2(e) = 1$ whenever $e \in E(G)$ but $e \neq e_0$. Since $$w_1(E(G)) = \{1, 1 + |E(G_1)|\} \neq \{1, 2 + |E(G_1)|\} = w_2(E(G))$$ holds, the weighted graphs $G_1(w_1)$ and $G_2(w_2)$ cannot be isomorphic. Now using and we see that both the metric spaces $(V(G_1), \rho_{w_1})$ and $(V(G_2), \rho_{w_2})$ are isometric to the metric space $(V(G\setminus e_0), d)$, where $G\setminus e_0$ denotes the connected graph obtained from $G$ by deleting $e_0$ and $d$ is the graph metric on $V(G\setminus e_0)$.

\[r3.5\] The characterization of trees obtained in Proposition \[p3.4\] is similar to the characterizations of trees which were given in Corollary 3.6 of [@DMV2013AC] and Corollary 5 of [@DP2013SM].

Theorem \[t3.4\] and Proposition \[p3.4\] give rise the following problem:

\[pr1\] Let $G_1(w_1)$ and $G_2(w_2)$ be connected, weighted graphs with the strictly positive weights. Find conditions under which every isometry $f \colon V(G_1) \to V(G_2)$ of the metric spaces $(V(G_1), \rho_{w_1})$ and $(V(G_2), 