A fast algorithm for All-Pairs-Shortest-Paths suitable for neural networks

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Jing, Zeyu, Meister, Markus
Natura: Preprint
Pubblicazione: 2023
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866916334459158528
author Jing, Zeyu
Meister, Markus
author_facet Jing, Zeyu
Meister, Markus
contents Given a directed graph of nodes and edges connecting them, a common problem is to find the shortest path between any two nodes. Here we show that the shortest path distances can be found by a simple matrix inversion: If the edges are given by the adjacency matrix $A_{ij}$ then with a suitably small value of $γ$ the shortest path distances are $$ D_{ij} = \operatorname{ceil} \left( \log_γ {\left[ {\left({\mathbf{I}}-γ{\mathbf{A}}\right)^{-1}} \right]}_{ij} \right)$$ We derive several graph-theoretic bounds on the value of $γ$, and explore its useful range with numerics on different graph types. 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 we show that this method leads naturally to a neural network solution of the all-pairs-shortest-path problem.
format Preprint
id arxiv_https___arxiv_org_abs_2308_07403
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle A fast algorithm for All-Pairs-Shortest-Paths suitable for neural networks
Jing, Zeyu
Meister, Markus
Data Structures and Algorithms
Neurons and Cognition
Given a directed graph of nodes and edges connecting them, a common problem is to find the shortest path between any two nodes. Here we show that the shortest path distances can be found by a simple matrix inversion: If the edges are given by the adjacency matrix $A_{ij}$ then with a suitably small value of $γ$ the shortest path distances are $$ D_{ij} = \operatorname{ceil} \left( \log_γ {\left[ {\left({\mathbf{I}}-γ{\mathbf{A}}\right)^{-1}} \right]}_{ij} \right)$$ We derive several graph-theoretic bounds on the value of $γ$, and explore its useful range with numerics on different graph types. 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 we show that this method leads naturally to a neural network solution of the all-pairs-shortest-path problem.
title A fast algorithm for All-Pairs-Shortest-Paths suitable for neural networks
topic Data Structures and Algorithms
Neurons and Cognition
url https://arxiv.org/abs/2308.07403