mlsanityData to 14 Oct 2026

A general purpose algorithm for counting simple cycles and simple paths of any length

arXiv 1612.05531 ↗First posted 16 Dec 2016cs.DS cs.DM math.COcited by 3

Not on the map. Why?

Abstract (arXiv)

We describe a general purpose algorithm for counting simple cycles and simple paths of any length ℓ on a (weighted di)graph on N vertices and M edges, achieving a time complexity of Oleft(N+M+big(ℓω+ℓDeltabig) |Sℓ|right). In this expression, |Sℓ| is the number of (weakly) connected induced subgraphs of G on at most ℓ vertices, Delta is the maximum degree of any vertex and ω is the exponent of matrix multiplication. We compare the algorithm complexity both theoretically and experimentally with most of the existing algorithms for the same task. These comparisons show that the algorithm described here is the best general purpose algorithm for the class of graphs where (ℓω-1Delta-1+1) |Sℓ|≤ |Cycleℓ|, with |Cycleℓ| the total number of simple cycles of length at most ℓ, including backtracks and self-loops. On ErdHos-R'enyi random graphs, we find empirically that this happens when the edge probability is larger than circa 4/N. In addition, we show that some real-world networks also belong to this class. Finally, the algorithm permits the enumeration of simple cycles and simple paths on networks where vertices are labeled from an alphabet on n letters with a time complexity of Oleft(N+M+big(nℓℓω+ℓDeltabig) |Sℓ|right). A Matlab implementation of the algorithm proposed here is available for download.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). First posted on arXiv 16 Dec 2016.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 2.

3 papers.