Distance metric on vector space associated with edges of an undirected graph Let $G = (V, E)$ be some graph representing for example, a physical road network. Intuitively, I can imagine that I can associate a distance between any two edges $e_1$ and $e_2$, $d(e_1, e_2)$, which measures how close the two edges are (e.g., if they share a node, then they are very close).


*

*Given a planar graph (in 2D say), how can I construct a meaningful distance function? 

*Given the above distance function and given two vectors $v_1, v_2 \in \mathbb{R}^{|E|}$, how can I construct a meaningful metric that measures the distance between $v_1$ and $v_2$?
My motivation is the following: each quantity $v \in [0, 1]^{|E|}$ measures the "degradation" state of the road network, with $0$ indicating that the link is fully functional (not degraded at all) and $1$ indicating that the link is fully degraded (not functional). I want to be able to compare two different degradation states. Intuitively, I want the network with state $v = (1, 0, \ldots, 0)$ to be "similar" to the same network with state $(0,1,\ldots,0)$ if edges $1$ and $2$ share a common node.
 A: 1) I think a natural approach is to consider a graph $G’$ whose vertex set $V’$ is $E$ and two distinct vertices $e_1,e_2$ of $V’$ are adjacent iff they share a common vertex of $G$. Given two vertices $e_1$ and $e_2$ belonging to one connected component of $G’$ let $d(e_1,e_2)$ be the length of a shortest path from $e_1$ to $e_2$. Now pick a number $D$ bigger than a diameter of each connected component of $G’$  and put $d(e_1,e_2)=D$ for each vertices $e_1$ and $e_2$ from distinct components of $G’$.
2) We can try the following approach. Each vector $v\in [0, 1]^E$ is a function from $E\to [0,1]$. We associate with $v$ its graph $$\bar v=\{(e,v(e))\in E\times [0,1]: e\in E\}.$$ Given the distance $d$, we define first a distance $d’$ on $E\times [0,1]$ by putting $$d’((e_1,t_1), (e_2,t_2))=\lambda d(e_1,e_2)+|t_1-t_2|$$ for all $(e_1,t_1), (e_2,t_2)\in E\times [0,1]$. Here $\lambda$ is a constant which allows us to adjust influence of $d$ in $d’$. At last, let a distance between given two vectors $v_1,v_2\in [0, 1]^E$ equals $d’_H(\bar v_1,\bar v_2)$ where  $d’_H$ is a Hausdorff distance induced by the distance $d’$.
