🤖 AI Summary
This work addresses shortest-cycle (girth) detection and general cycle detection in undirected graphs. To overcome the limited trade-off between accuracy and efficiency in existing algorithms, we propose the first hybrid cycle-detection framework parameterized by a real-valued parameter ℓ−ε—generalizing the conventional integer parameter to a continuous variable—thereby significantly enhancing design flexibility and generality. Our approach integrates randomized sampling, graph unfolding, and multi-scale search, underpinned by edge-count optimization tailored to sparse graphs. Theoretically, it outputs a cycle of length at most 2ℓ⌈g/2⌉ − 2⌊ε⌈g/2⌉⌋ in Õ(ℓ·n¹⁺¹/(ℓ−ε)) time; for sparse graphs with m edges, runtime improves to Õ(ℓ·m¹⁺¹/(ℓ−ε)). This is the first formalization of a hybrid cycle-detection model, establishing a refined parametric paradigm for approximate girth computation.
📝 Abstract
Let $G=(V,E)$ be an unweighted undirected graph with $n$ vertices and $m$ edges. Let $g$ be the girth of $G$, that is, the length of a shortest cycle in $G$. We present a randomized algorithm with a running time of $ ilde{O}ig(ell cdot n^{1 + frac{1}{ell - varepsilon}}ig)$ that returns a cycle of length at most $ 2ell leftlceil frac{g}{2}
ight
ceil - 2 leftlfloor varepsilon leftlceil frac{g}{2}
ight
ceil
ight
floor, $ where $ell geq 2$ is an integer and $varepsilon in [0,1]$, for every graph with $g = polylog(n)$.
Our algorithm generalizes an algorithm of Kadria etal{} [SODA'22] that computes a cycle of length at most $4leftlceil frac{g}{2}
ight
ceil - 2leftlfloor varepsilon leftlceil frac{g}{2}
ight
ceil
ight
floor $ in $ ilde{O}ig(n^{1 + frac{1}{2 - varepsilon}}ig)$ time. Kadria etal{} presented also an algorithm that finds a cycle of length at most $ 2ell leftlceil frac{g}{2}
ight
ceil $ in $ ilde{O}ig(n^{1 + frac{1}{ell}}ig)$ time, where $ell$ must be an integer. Our algorithm generalizes this algorithm, as well, by replacing the integer parameter $ell$ in the running time exponent with a real-valued parameter $ell - varepsilon$, thereby offering greater flexibility in parameter selection and enabling a broader spectrum of combinations between running times and cycle lengths.
We also show that for sparse graphs a better tradeoff is possible, by presenting an $ ilde{O}(ellcdot m^{1+1/(ell-varepsilon)})$ time randomized algorithm that returns a cycle of length at most $2ell(lfloor frac{g-1}{2}
floor) - 2(lfloor varepsilon lfloor frac{g-1}{2}
floor
floor+1)$, where $ellgeq 3$ is an integer and $varepsilonin [0,1)$, for every graph with $g=polylog(n)$.
To obtain our algorithms we develop several techniques and introduce a formal definition of hybrid cycle detection algorithms. [...]