{"title":"滑动窗口序统计量的最优算法","authors":"Pavel Raykov","doi":"10.4230/LIPIcs.ICDT.2023.5","DOIUrl":null,"url":null,"abstract":"Assume there is a data stream of elements and a window of size m . Sliding window algorithms compute various statistic functions over the last m elements of the data stream seen so far. The time complexity of a sliding window algorithm is measured as the time required to output an updated statistic function value every time a new element is read. For example, it is well known that computing the sliding window maximum/minimum has time complexity O (1) while computing the sliding window median has time complexity O (log m ). In this paper we close the gap between these two cases by (1) presenting an algorithm for computing the sliding window k -th smallest element in O (log k ) time and (2) prove that this time complexity is optimal.","PeriodicalId":90482,"journal":{"name":"Database theory-- ICDT : International Conference ... proceedings. International Conference on Database Theory","volume":"16 1","pages":"5:1-5:13"},"PeriodicalIF":0.0000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"An Optimal Algorithm for Sliding Window Order Statistics\",\"authors\":\"Pavel Raykov\",\"doi\":\"10.4230/LIPIcs.ICDT.2023.5\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Assume there is a data stream of elements and a window of size m . Sliding window algorithms compute various statistic functions over the last m elements of the data stream seen so far. The time complexity of a sliding window algorithm is measured as the time required to output an updated statistic function value every time a new element is read. For example, it is well known that computing the sliding window maximum/minimum has time complexity O (1) while computing the sliding window median has time complexity O (log m ). In this paper we close the gap between these two cases by (1) presenting an algorithm for computing the sliding window k -th smallest element in O (log k ) time and (2) prove that this time complexity is optimal.\",\"PeriodicalId\":90482,\"journal\":{\"name\":\"Database theory-- ICDT : International Conference ... proceedings. International Conference on Database Theory\",\"volume\":\"16 1\",\"pages\":\"5:1-5:13\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Database theory-- ICDT : International Conference ... proceedings. International Conference on Database Theory\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4230/LIPIcs.ICDT.2023.5\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Database theory-- ICDT : International Conference ... proceedings. International Conference on Database Theory","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.ICDT.2023.5","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
An Optimal Algorithm for Sliding Window Order Statistics
Assume there is a data stream of elements and a window of size m . Sliding window algorithms compute various statistic functions over the last m elements of the data stream seen so far. The time complexity of a sliding window algorithm is measured as the time required to output an updated statistic function value every time a new element is read. For example, it is well known that computing the sliding window maximum/minimum has time complexity O (1) while computing the sliding window median has time complexity O (log m ). In this paper we close the gap between these two cases by (1) presenting an algorithm for computing the sliding window k -th smallest element in O (log k ) time and (2) prove that this time complexity is optimal.