up:: 040 MOC Complex Systems

Given a graph with Adjacency Matrix , to find the shortest path from nodes to , one can investigate the components of different powers of :

  • finds -paths between them (i.e. direct paths)
  • finds -paths between them, etc

The shortest path between nodes and will be an -path, where

That is, is the shortest a path has to be to allow for to reach .

Denoting the shortest path between and by , one can also calculate their Node Closeness through the inverse , with the caveat that disconnected nodes have .

Finding the existence of shortest paths

Finding the existence of shortest distance paths through finding the minimal as above is a Breadth-First Search, since it’s essentially calculating

for all , until it is greater than (if , then no search is done, just get the edge ). Note it doesn’t necessarily spit out the shortest paths themselves, it just says “is ?“.

Since we’re talking about finite graphs, this routine is guaranteed to terminate at, at most, steps, where is the total number of nodes in the entire graph; if it doesn’t terminate by then, then both nodes are disconnected, i.e. couldn’t be reached in any more iterations. Thus, it makes sense to say that , since, no matter how many steps one takes, starting from , one cannot reach .

Of course the most famous algorithm for finding shortest distances is Dijkstra’s Algorithm.


References

  • NEWMAN, Mark. Networks. Oxford University Press, 2018.