{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T19:30:31Z","timestamp":1787340631011,"version":"build-2736575974"},"reference-count":5,"publisher":"Society for Industrial & Applied Mathematics (SIAM)","issue":"2","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["SIAM J. Comput."],"published-print":{"date-parts":[[1982,5]]},"abstract":"<jats:p>Given a function f over a finite domain D and an arbitrary starting point x, the sequence $f^0 (x),f^1 (x),f^2 (x), \\cdots $ is ultimately periodic. Such sequences are typically the output of random number generators. The cycle problem is to determine the first repeated element $f^n (x)$ in the sequence. Previous algorithms for this problem have required $3n + O(1)$ operations. In this paper we show that $n(1 + \\Theta (1\/\\sqrt M ))$ steps are both necessary and sufficient, if M memory cells are available to store values of the function. We explicitly consider the performance of the algorithm as a function of the amount of memory available and the relative cost of evaluating f and comparing sequence elements for equality.<\/jats:p>","DOI":"10.1137\/0211030","type":"journal-article","created":{"date-parts":[[2005,2,24]],"date-time":"2005-02-24T06:24:24Z","timestamp":1109226264000},"page":"376-390","source":"Crossref","is-referenced-by-count":32,"title":["The Complexity of Finding Cycles in Periodic Functions"],"prefix":"10.1137","volume":"11","author":[{"given":"Robert","family":"Sedgewick","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Thomas G.","family":"Szymanski","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Andrew C.","family":"Yao","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"351","published-online":{"date-parts":[[2006,7,31]]},"reference":[{"key":"R1","volume-title":"The art of computer programming. Vol. 2: Seminumerical algorithms","author":"Knuth Donald E.","year":"1969"},{"key":"R2","unstructured":"R. Gosper,  HACKMEM, Artificial Intelligence Lab Report, 239, M.I.T.,  1971"},{"key":"R3","doi-asserted-by":"publisher","DOI":"10.1145\/800135.804400"},{"key":"R4","doi-asserted-by":"publisher","DOI":"10.1090\/pspum\/020\/0316385"},{"key":"R5","doi-asserted-by":"crossref","unstructured":"F. E. Fich,  Lower bounds for the cycle detection problem,  Proc. 13th Annual ACM Symposium on the Theory of Computing,  1981,  96\u2013105, May","DOI":"10.1145\/800076.802462"}],"container-title":["SIAM Journal on Computing"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/0211030","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T18:41:52Z","timestamp":1787337712000},"score":1,"resource":{"primary":{"URL":"https:\/\/epubs.siam.org\/doi\/10.1137\/0211030"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[1982,5]]},"references-count":5,"journal-issue":{"issue":"2","published-print":{"date-parts":[[1982,5]]}},"alternative-id":["10.1137\/0211030"],"URL":"https:\/\/doi.org\/10.1137\/0211030","relation":{},"ISSN":["0097-5397","1095-7111"],"issn-type":[{"value":"0097-5397","type":"print"},{"value":"1095-7111","type":"electronic"}],"subject":[],"published":{"date-parts":[[1982,5]]}}}