# Principle - We can determine distance between ideas in a Zettelkasten

Previously, we determined that a zettelkasten was a directed graph1. As such, we can run standard graph algorithms on the graph. For example, we can determine the distance between two notes in a zettelkasten by using dijkstra’s algorithm.2

So in general we have a set of notes $$N$$ and a way to measure some distance between notes $$d$$. What does this distance tell us? It should give us a rough idea of how related two notes are. There are a few things we can do with this distance3.

• We can compute the max distance (diameter) of the graph.
• This could be a measure of breadth of knowledge
• We can compute the central vertex
• This could represent a super key idea, assumption or world-view
• We could compute the peripheral vertices
• These could provide us with points to research to expand our knowledge further

Note: this distance $$d$$ by itself does not obey the properties of a metric space4. You can tell this because it fails the symmetric condition, also it may not be defined on the whole space. However, if we assume weak connectivity and add the additional conditions

Let

$$\bar{d}(n_i, n_j) = \begin{cases} \text{dijkstra distance}: \text{ path exists from } n_i \to n_j \\ \infty: \text{ otherwise} \end{cases}$$ $$d(n_i, n_j) = \min \left(\bar{d}(n_i, n_j), \bar{d}(n_j, n_i)\right)$$

now $$d$$ is a proper distance metric.

1. Principle - Zettelkasten is a directed graph

↩︎
2. Yeah we are going to assume the zettelkasten is [weakly connected](https://en.wikipedia.org/wiki/Connectivity_(graph_theory), if it’s not then just split it into distinct weakly connected components and treat them as separate zettelkasten., if it’s not then just split it into distinct connected components and treat them as separate zettelkasten., if it’s not then just split it into distinct connected components and treat them as separate zettelkasten.

↩︎
3. https://en.wikipedia.org/wiki/Distance_(graph_theory)

↩︎
4. Principle - Metric spaces generalize distance

↩︎