A Fast Algorithm for Finding Minimum Weight Cycles in Mining Cyclic Graph Topologies

Heman Shakeri, Torben Amtoft, Behnaz Moradijamei, Nathan Albin, Pietro Poggi-CorradiniarXiv 2025 · DOI

Abstract

Finding the Minimum Weight Cycle (MWC) is a fundamental problem in graph analysis with applications in network robustness and Loop Modulus computation. Traditional exact methods, such as the Rooted Girth Algorithm, are computationally expensive for large networks. This paper presents a novel deterministic algorithm that optimizes MWC discovery through a "composite distance" metric and aggressive pruning techniques. By leveraging vertex discarding and locality-based heuristics, the proposed method achieves up to a 184x speedup on real-world datasets while maintaining provable correctness.

Introduction

Finding the "shortest path" between two points is a cornerstone of modern navigation systems. However, finding the shortest loop—the Minimum Weight Cycle (MWC) or weighted girth—in a complex network is a significantly more challenging computational task. MWC discovery is a core primitive for analyzing cycle packing, network connectivity, and calculating Loop Modulus, a metric for the cycle density of a network.

Standard approaches, such as the Rooted Girth Algorithm, are exhaustive and often prohibitively slow for large-scale graphs as they require a shortest-path search for every edge. While randomized or approximation algorithms exist, many applications require exact, deterministic results. This research introduces a new algorithm that transforms the MWC search into a streamlined optimization process.

Methodology

The proposed algorithm accelerates the search for the MWC through three primary innovations: composite distance minimization, early termination, and vertex discarding.

Composite Distance Minimization

Instead of searching for cycles directly, the researchers define a new metric: the composite distance $d^+(x, c) = d(x, c) + \ell(c)$. This value represents the distance from a starting node $x$ to a cycle $c$, plus the length $\ell(c)$ of that cycle. The algorithm proves that finding the MWC is equivalent to minimizing this composite distance across all vertices in the graph.

Illustration of the composite distance $d^+(x, c)$ from a vertex $x$ to cycles $c_1$ and $c_2$.

Early Termination and Discarding

To avoid exhaustive searching, the algorithm employs a $\gamma/2$ termination rule inspired by Dijkstra’s algorithm. If the current path distance from a root node $x$ exceeds half the length of the best cycle found so far ($\gamma/2$), the search from that root terminates immediately. Furthermore, the researchers provide a rigorous vertex discarding theorem (Theorem 2), which allows the permanent removal of vertices that cannot mathematically participate in a new MWC from future iterations.

Locality-Based Pruning

Real-world networks often exhibit "locality," where significant cycles are topologically clustered. The algorithm exploits this by dynamically restricting searches to relevant subgraphs. This pruning heuristic drastically reduces the number of nodes processed in each step while periodically reverting to the full graph to ensure global optimality.

Experimental Evaluation

The algorithm was evaluated using both synthetic grid graphs and the historical Cholera dataset (324 nodes, 941 edges), which maps geographic proximity between cases in the 1854 London outbreak.

Key Results

The most significant performance gains were observed in Loop Modulus computation, which requires iterative cycle identification:

  • Speedup: On the Cholera dataset, the algorithm completed the task in 3.8 seconds, compared to 700 seconds for the baseline Dijkstra-based approach—a 184x speedup.
  • Computational Efficiency: The number of required Quadratic Programming (QP) solves was reduced from 475 to 28.
  • Scalability: In synthetic tests, the new algorithm maintained a significantly lower operation count than the baseline as graph size increased.

Conclusion

By rethinking MWC discovery as a vertex-centric composite distance optimization, this research provides a powerful tool for large-scale network analysis. The combination of provable vertex discarding and locality-based pruning allows for massive speedups without sacrificing exactness. Future work will explore parallelization and the adaptation of this framework for dynamic networks and graphs with directed or negative edge weights.

Summary updated

BibTeX
@misc{shakeri2025fast,
  author = {Heman Shakeri and Torben Amtoft and Behnaz Moradijamei and Nathan Albin and Pietro Poggi-Corradini},
  title = {{A Fast Algorithm for Finding Minimum Weight Cycles in Mining Cyclic Graph Topologies}},
  year = {2025},
  eprint = {2512.01049},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.01049},
}
Figure