🤖 AI Summary
We address the problem of approximating the girth (length of the shortest cycle) in weighted undirected graphs with arbitrary positive real edge weights. We present the first algorithm achieving a joint optimization of approximation ratio and running time. Given a graph with girth $g$, our algorithm outputs a cycle of length at most $(4k/3)g$ in expected time $O(kn^{1+1/k}log n + m(k+log n))$. Methodologically, we generalize the classic $k$-hop distance estimation technique—previously restricted to unweighted graphs—to the weighted setting. This is achieved via a carefully designed edge-length function and expectation-based analysis, eliminating prior dependencies on integer weights or the high-cost $log(nM)$ factor. Our contribution is threefold: (i) the first girth approximation algorithm for general positive weights with subquadratic runtime; (ii) a tunable trade-off between approximation ratio $(4k/3)$ and efficiency for any $k geq 1$; and (iii) a significant improvement in time complexity over the previous state of the art.
📝 Abstract
Let $G = (V,E,ell)$ be a $n$-node $m$-edge weighted undirected graph, where $ell: E
ightarrow (0,infty)$ is a real emph{length} function defined on its edges, and let $g$ denote the girth of $G$, i.e., the length of its shortest cycle. We present an algorithm that, for any input, integer $k geq 1$, in $O(kn^{1+1/k}log{n} + m(k+log{n}))$ expected time finds a cycle of length at most $frac{4k}{3}g$. This algorithm nearly matches a $O(n^{1+1/k}log{n})$-time algorithm of cite{KadriaRSWZ22} which applied to unweighted graphs of girth $3$. For weighted graphs, this result also improves upon the previous state-of-the-art algorithm that in $O((n^{1+1/k}log n+m)log (nM))$ time, where $ell: E
ightarrow [1, M]$ is an integral length function, finds a cycle of length at most $2kg$~cite{KadriaRSWZ22}. For $k=1$ this result improves upon the result of Roditty and Tov~cite{RodittyT13}.