The complexity of finding periods

R. Sedgewick, T. G. Szymanski
{"title":"The complexity of finding periods","authors":"R. Sedgewick, T. G. Szymanski","doi":"10.1145/800135.804400","DOIUrl":null,"url":null,"abstract":"Given a function f over a finite domain D and an arbitrary starting point x, the sequence x,f(x),f(f(x)),... is ultimately periodic. Such sequences typically are used for constructing random number generators. The cycle problem is to determine the first repeated element fn(x) in the sequence. Previous algorithms for this problem have required 3n operations. In this paper we present an algorithm which only requires n(1+O(1/(@@@@)M)) steps, if M memory cells are available to store values of the function. By increasing M, this running time can be made arbitrarily close to the information-theoretic lower bound on the running time of any algorithm for the cycle problem. Our treatment is novel in that we explicitly consider the performance of the algorithm as a function of the amount of memory available as well as the relative cost of evaluating f and comparing sequence elements for equality.","PeriodicalId":176545,"journal":{"name":"Proceedings of the eleventh annual ACM symposium on Theory of computing","volume":"191 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1979-04-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"13","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the eleventh annual ACM symposium on Theory of computing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/800135.804400","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 13

Abstract

Given a function f over a finite domain D and an arbitrary starting point x, the sequence x,f(x),f(f(x)),... is ultimately periodic. Such sequences typically are used for constructing random number generators. The cycle problem is to determine the first repeated element fn(x) in the sequence. Previous algorithms for this problem have required 3n operations. In this paper we present an algorithm which only requires n(1+O(1/(@@@@)M)) steps, if M memory cells are available to store values of the function. By increasing M, this running time can be made arbitrarily close to the information-theoretic lower bound on the running time of any algorithm for the cycle problem. Our treatment is novel in that we explicitly consider the performance of the algorithm as a function of the amount of memory available as well as the relative cost of evaluating f and comparing sequence elements for equality.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
寻找周期的复杂性
给定有限定义域D上的函数f和任意起始点x,序列x,f(x),f(f(x)),…最终是周期性的。这样的序列通常用于构造随机数生成器。循环问题是确定序列中第一个重复元素fn(x)。以前解决这个问题的算法需要3n次运算。在本文中,我们提出了一种算法,它只需要n(1+O(1/(@@@@)M))步,如果有M个存储单元可用来存储函数的值。通过增加M,可以使该运行时间任意接近于任何循环问题算法运行时间的信息论下界。我们的处理是新颖的,因为我们明确地将算法的性能视为可用内存数量的函数,以及评估f和比较序列元素是否相等的相对成本。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
The complexity of finding periods Lower bounds on the size of sweeping automata Computable queries for relational data bases (Preliminary Report) A near optimal data structure for a type of range query problem Deadlock-free packet switching networks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1