Given a directed graph of nodes and edges connecting them, a common problem
is to find the shortest path between any two nodes. Here I show that the
shortest path distances can be found by a simple matrix inversion: If the edges
are given by the adjacency matrix Aijβ then with a suitably small value of
Ξ³ the shortest path distances are Dijβ=ceilβlogΞ³log[(1βΞ³A)β1]ijβββ I derive some bounds on Ξ³ useful
for a practical application. Even when the distance function is not globally
accurate across the entire graph, it still works locally to instruct pursuit of
the shortest path. In this mode, it also extends to weighted graphs with
positive edge weights. For a wide range of dense graphs this distance function
is computationally faster than the best available alternative. Finally I show
that this method leads naturally to a neural network solution of the
all-pairs-shortest-path problem.Comment: 11 pages, 4 figures, see also https://github.com/markusmeister/APS