{"title":"近似计数的最优界","authors":"Jelani Nelson, Huacheng Yu","doi":"10.1145/3517804.3526225","DOIUrl":null,"url":null,"abstract":"Storing a counter incremented N times would naively consume O(log N) bits of memory. In 1978 Morris described the very first streaming algorithm: the \"Morris Counter\" [15]. His algorithm's space bound is a random variable, and it has been shown to be O(log log N + log(1/ε) + log(1/δ)) bits in expectation to provide a (1+ε)-approximation with probability $1-δ to the counter's value. We provide a new simple algorithm with a simple analysis showing that randomized space O(log log N + log(1/ε) + log log(1/δ)) bits suffice for the same task, i.e. an exponentially improved dependence on the inverse failure probability. We then provide a new analysis showing that the original Morris Counter itself, after a minor but necessary tweak, actually also enjoys this same improved upper bound. Lastly, we prove a new lower bound for this task showing optimality of our upper bound. We thus completely resolve the asymptotic space complexity of approximate counting. Furthermore all our constants are explicit, and our lower bound and tightest upper bound differ by a multiplicative factor of at most 3+o(1).","PeriodicalId":230606,"journal":{"name":"Proceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":"{\"title\":\"Optimal Bounds for Approximate Counting\",\"authors\":\"Jelani Nelson, Huacheng Yu\",\"doi\":\"10.1145/3517804.3526225\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Storing a counter incremented N times would naively consume O(log N) bits of memory. In 1978 Morris described the very first streaming algorithm: the \\\"Morris Counter\\\" [15]. His algorithm's space bound is a random variable, and it has been shown to be O(log log N + log(1/ε) + log(1/δ)) bits in expectation to provide a (1+ε)-approximation with probability $1-δ to the counter's value. We provide a new simple algorithm with a simple analysis showing that randomized space O(log log N + log(1/ε) + log log(1/δ)) bits suffice for the same task, i.e. an exponentially improved dependence on the inverse failure probability. We then provide a new analysis showing that the original Morris Counter itself, after a minor but necessary tweak, actually also enjoys this same improved upper bound. Lastly, we prove a new lower bound for this task showing optimality of our upper bound. We thus completely resolve the asymptotic space complexity of approximate counting. Furthermore all our constants are explicit, and our lower bound and tightest upper bound differ by a multiplicative factor of at most 3+o(1).\",\"PeriodicalId\":230606,\"journal\":{\"name\":\"Proceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems\",\"volume\":\"47 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-10-05\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"9\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3517804.3526225\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3517804.3526225","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9
摘要
存储递增N次的计数器将天真地消耗O(log N)位内存。1978年,莫里斯描述了第一个流媒体算法:“莫里斯计数器”[15]。他的算法的空间边界是一个随机变量,它已经被证明是O(log log N + log(1/ε) + log(1/δ))位,期望提供一个(1+ε)-近似,概率为$1-δ。我们提供了一种新的简单算法,通过简单的分析表明,随机化空间O(log log N + log(1/ε) + log log(1/δ))位足以满足相同的任务,即对逆失效概率的依赖性呈指数级提高。然后,我们提供了一个新的分析,表明原来的莫里斯计数器本身,经过一个小但必要的调整,实际上也享受相同的改进上界。最后,我们证明了这个任务的一个新的下界,显示了上界的最优性。从而完全解决了近似计数的渐近空间复杂度问题。此外,我们所有的常数都是显式的,我们的下界和最紧上界相差一个乘因子,最多为3+ 0(1)。
Storing a counter incremented N times would naively consume O(log N) bits of memory. In 1978 Morris described the very first streaming algorithm: the "Morris Counter" [15]. His algorithm's space bound is a random variable, and it has been shown to be O(log log N + log(1/ε) + log(1/δ)) bits in expectation to provide a (1+ε)-approximation with probability $1-δ to the counter's value. We provide a new simple algorithm with a simple analysis showing that randomized space O(log log N + log(1/ε) + log log(1/δ)) bits suffice for the same task, i.e. an exponentially improved dependence on the inverse failure probability. We then provide a new analysis showing that the original Morris Counter itself, after a minor but necessary tweak, actually also enjoys this same improved upper bound. Lastly, we prove a new lower bound for this task showing optimality of our upper bound. We thus completely resolve the asymptotic space complexity of approximate counting. Furthermore all our constants are explicit, and our lower bound and tightest upper bound differ by a multiplicative factor of at most 3+o(1).