English

Enumerating Small Cycles

Data Structures and Algorithms 2026-07-29 v1

Abstract

In a seminal result of Yuster and Zwick, they showed that for any fixed kk, the even cycle C2kC_{2k} can be detected in an nn-vertex graph in time O(n2)O(n^2). For 44-cycles, a folklore algorithm extends to listing: for any tt, we can list tt different 44-cycles, if such exist, in O(n2+t)O(n^2+t) time. Recently, Jin, Vassilevska-Williams, and Zhou obtained similar bounds for listing 66-cycles. In this work, we generalize the above to cycles of sizes 8,10,12,14,8, 10, 12, 14, and 1616; we show that for all k8k\leq 8, we can list tt distinct 2k2k-cycles in O~(n2+t)\tilde{O}(n^2+t) time. In fact, our algorithm gives enumeration with pre-processing time O~(n2)\tilde{O}(n^2) and delay O~(1)\tilde{O}(1). Additionally, for any fixed kk, we present an optimal enumeration (and hence also listing) algorithm for all cycles of size at most 2k2k. More generally, for any fixed kk and any 3i4k33\le i\le \frac{4k}{3}, we present an algorithm with preprocessing time O~(n2)\tilde{O}(n^2) and delay O~(1)\tilde{O}(1) that enumerates all cycles of sizes in the range [i,2k][i,2k].

Cite

@article{arxiv.2607.27147,
  title  = {Enumerating Small Cycles},
  author = {Or Stern and Or Zamir},
  journal= {arXiv preprint arXiv:2607.27147},
  year   = {2026}
}