Table of Contents
Fetching ...

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

Heman Shakeri, Torben Amtoft, Behnaz Moradi-Jamei, Nathan Albin, Pietro Poggi-Corradini

TL;DR

The paper addresses the challenge of efficiently finding the Minimum Weight Cycle (MWC) in general weighted graphs by reframing the search as a composite-distance minimization problem, where $d^+(x,c)=d(x,c)+\ell(c)$. It introduces a deterministic, Dijkstra-like algorithm that iteratively minimizes this composite distance for each root vertex, supported by rigorous loop-invariant proofs to guarantee correctness. Key contributions include a provable vertex-discarding rule and a practical graph-pruning heuristic that accelerate searches without sacrificing global optimality, demonstrated on grid-like and spanning-tree–based graph structures. The approach is applied to accelerate Loop Modulus computations, yielding substantial empirical speedups in constraint finding, as shown on the Cholera dataset, and offering a scalable primitive for broader cyclic-structure analyses in networks.

Abstract

Cyclic structures are fundamental topological features in graphs, playing critical roles in network robustness, information flow, community structure, and various dynamic processes. Algorithmic tools that can efficiently probe and analyze these cyclic topologies are increasingly vital for tasks in graph mining, network optimization, bioinformatics, and social network analysis. A core primitive for quantitative analysis of cycles is finding the Minimum Weight Cycle (MWC), representing the shortest cyclic path in a weighted graph. However, computing the MWC efficiently remains a challenge, particularly compared to shortest path computations. This paper introduces a novel deterministic algorithm for finding the MWC in general weighted graphs. Our approach adapts the structure of Dijkstra's algorithm by introducing and minimizing a \textit{composite distance} metric, effectively translating the global cycle search into an iterative node-centric optimization. We provide a rigorous proof of correctness based on loop invariants. We detail two mechanisms for accelerating the search: a provable node discarding technique based on intermediate results, and a highly effective graph pruning heuristic. This heuristic dynamically restricts the search to relevant subgraphs, leveraging the principle of locality often present in complex networks to achieve significant empirical speedups, while periodic resets ensure global optimality is maintained. The efficiency of the proposed MWC algorithm enables its use as a core component in more complex analyses focused on cyclic properties. We illustrate this through a detailed application case study: accelerating the computation of the Loop Modulus, a measure of cycle richness used in advanced network characterization. Our algorithm dramatically reduces the runtime of the iterative constraint-finding bottleneck in this computation.

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

TL;DR

The paper addresses the challenge of efficiently finding the Minimum Weight Cycle (MWC) in general weighted graphs by reframing the search as a composite-distance minimization problem, where . It introduces a deterministic, Dijkstra-like algorithm that iteratively minimizes this composite distance for each root vertex, supported by rigorous loop-invariant proofs to guarantee correctness. Key contributions include a provable vertex-discarding rule and a practical graph-pruning heuristic that accelerate searches without sacrificing global optimality, demonstrated on grid-like and spanning-tree–based graph structures. The approach is applied to accelerate Loop Modulus computations, yielding substantial empirical speedups in constraint finding, as shown on the Cholera dataset, and offering a scalable primitive for broader cyclic-structure analyses in networks.

Abstract

Cyclic structures are fundamental topological features in graphs, playing critical roles in network robustness, information flow, community structure, and various dynamic processes. Algorithmic tools that can efficiently probe and analyze these cyclic topologies are increasingly vital for tasks in graph mining, network optimization, bioinformatics, and social network analysis. A core primitive for quantitative analysis of cycles is finding the Minimum Weight Cycle (MWC), representing the shortest cyclic path in a weighted graph. However, computing the MWC efficiently remains a challenge, particularly compared to shortest path computations. This paper introduces a novel deterministic algorithm for finding the MWC in general weighted graphs. Our approach adapts the structure of Dijkstra's algorithm by introducing and minimizing a \textit{composite distance} metric, effectively translating the global cycle search into an iterative node-centric optimization. We provide a rigorous proof of correctness based on loop invariants. We detail two mechanisms for accelerating the search: a provable node discarding technique based on intermediate results, and a highly effective graph pruning heuristic. This heuristic dynamically restricts the search to relevant subgraphs, leveraging the principle of locality often present in complex networks to achieve significant empirical speedups, while periodic resets ensure global optimality is maintained. The efficiency of the proposed MWC algorithm enables its use as a core component in more complex analyses focused on cyclic properties. We illustrate this through a detailed application case study: accelerating the computation of the Loop Modulus, a measure of cycle richness used in advanced network characterization. Our algorithm dramatically reduces the runtime of the iterative constraint-finding bottleneck in this computation.

Paper Structure

This paper contains 22 sections, 6 theorems, 14 equations, 6 figures, 1 table, 2 algorithms.

Key Result

Theorem 1

Minimizing $d^+(x)$ over $x\in V$ is equivalent to finding the length of the minimum weight cycle in $G$. Moreover, the minimum value $\min_{x \in V} d^+(x)$ equals $\ell(c^*)$ for any MWC $c^*$, and this minimum is attained for any vertex $x \in \text{vertices}(c^*)$.

Figures (6)

  • Figure 1: Composite distance $d^+(x,c)$ is the shortest path distance from vertex $x$ to cycle $c$ plus $c$'s length $\ell(c)$. The plot shows cycles $c_1$ and $c_2$ with edge weights. The Minimum Weight Cycle (MWC) length is $\ell(c^*) = \min_{x \in V} \min_{c \in \mathscr{C}} d^+(x,c)$.
  • Figure 2: Fraction of the total possible edges examined ($|E_i|/|E|$) if vertices are removed one by one, sorted by degree (highest first), simulating an upper bound on the effect of vertex discarding on the worst case term $F$. Models shown: Erdős-Rényi (ER), Barabasi-Albert (BA), Watts-Strogatz (WS), Complete graph (K). The area under the curve relative to 1 indicates the potential reduction in edge processing compared to the naive $|V||E|$ term.
  • Figure 3: (left) A $5\times 5$ weighted grid such that the MWC is localized near the highest labeled vertex. (middle) Comparison of the number of $\arg\min$ operations performed by the proposed Algorithm \ref{['alg:MWC_Dijkstra']} (dashed line) versus the rooted girth algorithm (solid line) to find the MWC on $d \times d$ grids. (right) A shortest cycle (thick blue/cyan edges) formed by adding one light non-tree edge (cyan) to a light spanning tree (red edges) within a larger spatial graph.
  • Figure 4: (left) Graph structure derived from the 1854 Cholera outbreak data using Delaunay triangulation of case locations networkx_delaunay. (middle) Visualization of Loop Modulus results ($\rho^*$ edge densities) on the Cholera graph. (right) Edge thickness/color intensity corresponds to higher $\rho^*$ values, highlighting edges frequently part of important loops.
  • Figure : MWC Algorithm based on Composite Distance Minimization
  • ...and 1 more figures

Theorems & Definitions (15)

  • Definition 1: Composite Distance
  • Theorem 1: Equivalence to MWC
  • proof
  • Theorem 2: Vertex Discarding Criterion
  • proof
  • Definition 2: $Q$-path
  • Lemma 1: Inner Loop Invariants
  • proof
  • Lemma 2: Outer Loop Invariants
  • proof
  • ...and 5 more