Notes about math, research, and more.
Let \(V_{n}\) be a set of \(n\) elements (\emph{e.g.} graph with \(n\)
vertices).
For some finite \(m > 0\) and each \(k \in \{ 1,\ldots, m \}\) let
\(S_{k} \subseteq V_{n}\) and \(\lambda_{k} > 0\). For
\(1 \leq i < j \leq n\), define
\[
{δ(Sk)}i,j =
\begin{cases}
1 & \text{ if } |S_{k} \cap \{ i,j \}| = 1 \\
0 & \text{ otherwise}.
\end{cases}
\]
Then \(d_{w}(i,j) = \sum_{k} \lambda_{k}\delta(S_{k})_{i,j}\) defines a
semimetric on \(V_{n}\).
Note that if we have a graph with \(n\) vertices, this semimetric is
based on a partition of the vertices, it does not take the edges of a
graph into account (hence \(S_{k}\) and \(V_{n}\setminus S_{k}\) may not
be connected components).