Fast algorithm approximates shortest cycle length in big weighted graphs

Approximating the Girth of an Undirected, Weighted Graph for Larger Approximation Factors

Data Structures and Algorithms

Summary

Finding the shortest loop (cycle) in a network with weighted connections can be time-consuming. The authors present a new randomized algorithm that estimates the length of the shortest cycle faster than previous methods for large graphs when allowing a bigger margin of error. Their method avoids complex steps used before and introduces a new idea called random filtering. However, it only gives an approximate number, not the actual loop itself.

What this means in practice

  • For network engineers: Quickly estimate the shortest feedback loop length in large communication or transportation networks to identify potential bottlenecks.
  • For data mining teams: Improve efficiency when analyzing cycle structures in large weighted graphs representing social or financial connections.

Authors

Eliyahu Yablon

Abstract

The girth of a weighted undirected graph is defined as the length of a shortest cycle in the graph. In this paper, we give a randomized $O\left(m^{1+2/(k-1)} n^{1/(k-1)}\right)$ algorithm to approximate the girth of a graph with $n$ vertices and $m$ edges to within a factor of $k$ for any real $k$. We assume that all edge weights are non-negative. For sufficiently high approximation factors, our algorithm outperforms the state of the art by polylogarithmic factors. Specifically, for approximation factors $k = c\frac{\log n}{\log \log n}$ where $c>5$, our algorithm gives a runtime of $O\left(m (\log n)^{5/c}\right)$, while instantiating the previous best $k$-approximation algorithms with $k = c\frac{\log n}{\log \log n}$ yields a running time of $O\left( \frac{cn (\log n)^{2 + 4/(3c)} }{\log \log n} + m\log n\right)$ (Kadria, Roditty, and Vassilevska Williams, arXiv:2607.00938). Furthermore, the algorithm presented here is conceptually simple, has relatively small constants, eschews single-source shortest path and sparse spanner algorithms, and employs a new technique, which we call ``random filtering.'' That being said, the basic algorithm returns only a numerical estimate for the girth, rather than a witness cycle.