English

Finding All Bounded-Length Simple Cycles in a Directed Graph

Data Structures and Algorithms 2021-05-27 v2

Abstract

A new efficient algorithm is presented for finding all simple cycles that satisfy a length constraint in a directed graph. When the number of vertices is non-trivial, most cycle-finding problems are of practical interest for sparse graphs only. We show that for a class of sparse graphs in which the vertex degrees are almost uniform, our algorithm can find all cycles of length less than or equal to kk in O((c+n)(k1)dk)O((c+n)(k-1)d^k) steps, where nn is the number of vertices, cc is the total number of cycles discovered, dd is the average degree of the graph's vertices, and k>1k > 1. While our analysis for the running time addresses only a class of sparse graphs, we provide empirical and experimental evidence of the efficiency of the algorithm for general sparse graphs. This algorithm is a significant improvement over the only other deterministic algorithm for this problem known to us; it also lends itself to massive parallelism. Experimental results of a serial implementation on some large real-world graphs are presented.

Keywords

Cite

@article{arxiv.2105.10094,
  title  = {Finding All Bounded-Length Simple Cycles in a Directed Graph},
  author = {Anshul Gupta and Toyotaro Suzumura},
  journal= {arXiv preprint arXiv:2105.10094},
  year   = {2021}
}
R2 v1 2026-06-24T02:19:32.492Z