Skip to main navigation Skip to search Skip to main content

New Algorithms for Girth and Cycle Detection

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution › peer-review

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 (Equation presented) that returns a cycle of length at most (Equation presented), where ℓ ≥ 2 is an integer and ε ∈ [0, 1], for every graph with g = polylog(n). Our algorithm generalizes an algorithm of Kadria et al. [SODA'22] that computes a cycle of length at most (Equation presented) time. Kadria et al. presented also an algorithm that finds a cycle of length at most (Equation presented) 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 (Equation presented) time randomized algorithm that returns a cycle of length at most (Equation presented), 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. Both may prove useful in broader contexts, including other cycle detection and approximation problems. Among our techniques is a new cycle searching technique, in which we search for a cycle from a given vertex and possibly all its neighbors in linear time. Using this technique together with more ideas we develop two hybrid algorithms. The first allows us to obtain an (Equation presented)-time, (+1)-approximation of g. The second is used to obtain our (Equation presented)-time and (Equation presented)-time approximation algorithms.

Original languageEnglish
Title of host publication20th Scandinavian Symposium on Algorithm Theory, SWAT 2026
EditorsPierre Fraigniaud
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959774215
DOIs
StatePublished - 8 Jun 2026
Event20th Scandinavian Symposium on Algorithm Theory, SWAT 2026 - Copenhagen, Denmark
Duration: 17 Jun 2026 → 19 Jun 2026

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume370

Conference

Conference20th Scandinavian Symposium on Algorithm Theory, SWAT 2026
Country/TerritoryDenmark
CityCopenhagen
Period17/06/26 → 19/06/26

Keywords

  • All pairs shortest path
  • Cycle approximation
  • Girth
  • Graph algorithms

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'New Algorithms for Girth and Cycle Detection'. Together they form a unique fingerprint.

Cite this