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 $\tilde{O}\big(\ell \cdot n^{1 + \frac{1}{\ell - \varepsilon}}\big)$ that returns a cycle of length at most $ 2\ell \left\lceil \frac{g}{2} \right\rceil - 2 \left\lfloor \varepsilon \left\lceil \frac{g}{2} \right\rceil \right\rfloor, $ 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 $4\left\lceil \frac{g}{2} \right\rceil - 2\left\lfloor \varepsilon \left\lceil \frac{g}{2} \right\rceil \right\rfloor $ in $\tilde{O}\big(n^{1 + \frac{1}{2 - \varepsilon}}\big)$ time. Kadria \etal{} presented also an algorithm that finds a cycle of length at most $ 2\ell \left\lceil \frac{g}{2} \right\rceil $ in $\tilde{O}\big(n^{1 + \frac{1}{\ell}}\big)$ 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 $\tilde{O}(\ell\cdot m^{1+1/(\ell-\varepsilon)})$ time randomized algorithm that returns a cycle of length at most $2\ell(\lfloor \frac{g-1}{2}\rfloor) - 2(\lfloor \varepsilon \lfloor \frac{g-1}{2}\rfloor \rfloor+1)$, where $\ell\geq 3$ is an integer and $\varepsilon\in [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. [...]
翻译:设 $G=(V,E)$ 为具有 $n$ 个顶点和 $m$ 条边的无向无权图,$g$ 表示 $G$ 的周长(即 $G$ 中最短环的长度)。针对周长满足 $g = polylog(n)$ 的任意图,我们提出一种随机化算法,其运行时间为 $\tilde{O}\big(\ell \cdot n^{1 + \frac{1}{\ell - \varepsilon}}\big)$,并返回长度不超过 $2\ell \left\lceil \frac{g}{2} \right\rceil - 2 \left\lfloor \varepsilon \left\lceil \frac{g}{2} \right\rceil \right\rfloor$ 的环,其中 $\ell \geq 2$ 为整数,$\varepsilon \in [0,1]$。该算法推广了 Kadria 等人 [SODA'22] 提出的算法——该算法可在 $\tilde{O}\big(n^{1 + \frac{1}{2 - \varepsilon}}\big)$ 时间内返回长度不超过 $4\left\lceil \frac{g}{2} \right\rceil - 2\left\lfloor \varepsilon \left\lceil \frac{g}{2} \right\rceil \right\rfloor$ 的环。Kadria 等人还提出一种算法,可在 $\tilde{O}\big(n^{1 + \frac{1}{\ell}}\big)$ 时间内返回长度不超过 $2\ell \left\lceil \frac{g}{2} \right\rceil$ 的环(其中 $\ell$ 必须为整数)。我们的算法进一步推广了该算法:将运行时间指数中的整数参数 $\ell$ 替换为实值参数 $\ell - \varepsilon$,从而在参数选择上提供更大灵活性,并实现运行时间与环长度之间更广泛的组合谱系。我们还证明,对于稀疏图可实现更优的折衷方案:针对周长满足 $g=polylog(n)$ 的任意图,提出一种运行时间为 $\tilde{O}(\ell\cdot m^{1+1/(\ell-\varepsilon)})$ 的随机化算法,可返回长度不超过 $2\ell(\lfloor \frac{g-1}{2}\rfloor) - 2(\lfloor \varepsilon \lfloor \frac{g-1}{2}\rfloor \rfloor+1)$ 的环,其中 $\ell\geq 3$ 为整数,$\varepsilon\in [0,1)$。为获得这些算法,我们发展了多项技术,并引入了混合环检测算法的形式化定义。