New algorithms for girth and cycle detection
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 O( · n1 + 1 - ) that returns a cycle of length at most 2 g2 - 2 g2 , where ≥ 2 is an integer and ∈ [0,1], for every graph with g = polylog(n). Our algorithm generalizes an algorithm of Kadria ηl [SODA'22] that computes a cycle of length at most 4 g2 - 2 g2 in O(n1 + 12 - ) time. Kadria ηl presented also an algorithm that finds a cycle of length at most 2 g2 in O(n1 + 1) time, where must be an integer. Our algorithm generalizes this algorithm, as well, by replacing the integer parameter in the running time exponent with a real-valued parameter - , 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 O(· m1+1/(-)) time randomized algorithm that returns a cycle of length at most 2( g-12) - 2( g-12 +1), where ≥ 3 is an integer and ∈ [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. [...]
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.