Cycle detection using a stack

Research output: Contribution to journalArticlepeer-review

52 Scopus citations

Abstract

We present an algorithm for detecting periodicity in sequences produced by repeated application of a given function. Our algorithm uses logarithmic memory with high probability, runs in linear time, and is guaranteed to stop within the second loop through the cycle. We also present a partitioning technique that offers a time/memory tradeoff. Our algorithm is especially well suited for sequences where the cycle length is typically small compared to the length of the acyclic prefix.

Original languageEnglish
Pages (from-to)135-140
Number of pages6
JournalInformation Processing Letters
Volume90
Issue number3
DOIs
StatePublished - 16 May 2004
Externally publishedYes

Keywords

  • Algorithms
  • Analysis of algorithms
  • Cycle detection
  • Random function
  • Stack
  • Time/memory tradeoff

Fingerprint

Dive into the research topics of 'Cycle detection using a stack'. Together they form a unique fingerprint.

Cite this