Efficient Summing over Sliding Windows

R. Ben-Basat, Gil Einziger, R. Friedman, Yaron Kassner
{"title":"Efficient Summing over Sliding Windows","authors":"R. Ben-Basat, Gil Einziger, R. Friedman, Yaron Kassner","doi":"10.4230/LIPIcs.SWAT.2016","DOIUrl":null,"url":null,"abstract":"This paper considers the problem of maintaining statistic aggregates over the last W elements of a data stream. First, the problem of counting the number of 1's in the last W bits of a binary stream is considered. A lower bound of {\\Omega}(1/{\\epsilon} + log W) memory bits for W{\\epsilon}-additive approximations is derived. This is followed by an algorithm whose memory consumption is O(1/{\\epsilon} + log W) bits, indicating that the algorithm is optimal and that the bound is tight. Next, the more general problem of maintaining a sum of the last W integers, each in the range of {0,1,...,R}, is addressed. The paper shows that approximating the sum within an additive error of RW{\\epsilon} can also be done using {\\Theta}(1/{\\epsilon} + log W) bits for {\\epsilon}={\\Omega}(1/W). For {\\epsilon}=o(1/W), we present a succinct algorithm which uses B(1 + o(1)) bits, where B={\\Theta}(Wlog(1/W{\\epsilon})) is the derived lower bound. We show that all lower bounds generalize to randomized algorithms as well. All algorithms process new elements and answer queries in O(1) worst-case time.","PeriodicalId":447445,"journal":{"name":"Scandinavian Workshop on Algorithm Theory","volume":"38 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"14","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Scandinavian Workshop on Algorithm Theory","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.SWAT.2016","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 14

Abstract

This paper considers the problem of maintaining statistic aggregates over the last W elements of a data stream. First, the problem of counting the number of 1's in the last W bits of a binary stream is considered. A lower bound of {\Omega}(1/{\epsilon} + log W) memory bits for W{\epsilon}-additive approximations is derived. This is followed by an algorithm whose memory consumption is O(1/{\epsilon} + log W) bits, indicating that the algorithm is optimal and that the bound is tight. Next, the more general problem of maintaining a sum of the last W integers, each in the range of {0,1,...,R}, is addressed. The paper shows that approximating the sum within an additive error of RW{\epsilon} can also be done using {\Theta}(1/{\epsilon} + log W) bits for {\epsilon}={\Omega}(1/W). For {\epsilon}=o(1/W), we present a succinct algorithm which uses B(1 + o(1)) bits, where B={\Theta}(Wlog(1/W{\epsilon})) is the derived lower bound. We show that all lower bounds generalize to randomized algorithms as well. All algorithms process new elements and answer queries in O(1) worst-case time.
滑动窗口的高效求和
本文考虑了在数据流的最后W个元素上维护统计聚合的问题。首先,考虑了在二进制流的最后W位中计算1的个数的问题。一个下界的{\Omega} (1/ {\epsilon} + log W)内存位为W {\epsilon} -加性近似推导。接下来是一个算法,其内存消耗为O(1/ {\epsilon} + log W)位,表明该算法是最优的,并且边界很紧。接下来,更一般的问题是维护最后W个整数的和,每个整数的范围是{0,1,…,R},是地址。本文表明,对于{\epsilon} = {\Omega} (1/W),也可以使用{\Theta} (1/ {\epsilon} + log W)位来逼近RW {\epsilon}的加性误差范围内的和。对于{\epsilon} =o(1/W),我们提出了一个简洁的算法,它使用B(1 + o(1))位,其中B= {\Theta} (Wlog(1/W {\epsilon}))是推导的下界。我们证明了所有的下界也可以推广到随机化算法。所有算法处理新元素和回答查询的最坏时间都是O(1)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信