Efficient Dynamic Weighted Set Sampling and Its Extension

Author:

Zhang Fangyuan1,Jiang Mengxu1,Wang Sibo1

Affiliation:

1. The Chinese University of Hong Kong, Hong Kong SAR

Abstract

Given a weighted set S of n elements, weighted set sampling (WSS) samples an element in S so that each element a i ; is sampled with a probability proportional to its weight w ( a i ). The classic alias method pre-processes an index in O ( n ) time with O ( n ) space and handles WSS with O (1) time. Yet, the alias method does not support dynamic updates. By minor modifications of existing dynamic WSS schemes, it is possible to achieve an expected O (1) update time and draw t independent samples in expected O ( t ) time with linear space, which is theoretically optimal. But such a method is impractical and even slower than a binary search tree-based solution. How to support both efficient sampling and updates in practice is still challenging. Motivated by this, we design BUS , an efficient scheme that handles an update in O (1) amortized time and draws t independent samples in O (log n + t) time with linear space. A natural extension of WSS is the weighted independent range sampling (WIRS) , where each element in S is a data point from R. Given an arbitrary range Q = [ℓ, r ] at query time, WIRS aims to do weighted set sampling on the set S Q of data points falling into range Q. We show that by integrating the theoretically optimal dynamic WSS scheme mentioned above, it can handle an update in O (log n ) time and can draw t independent samples for WIRS in O (log n + t ) time, the same as the state-of-the-art static algorithm. Again, such a solution by integrating the optimal dynamic WSS scheme is still impractical to handle WIRS queries. We further propose WIRS-BUS to integrate BUS to handle WIRS queries, which handles each update in O (log n ) time and draws t independent samples in O (log 2 n + t ) time with linear space. Extensive experiments show that our BUS and WIRS-BUS are efficient for both sampling and updates.

Publisher

Association for Computing Machinery (ACM)

Subject

General Earth and Planetary Sciences,Water Science and Technology,Geography, Planning and Development

Reference48 articles.

1. 2010. Twitter. https://anlab-kaist.github.io/traces/. 2010. Twitter. https://anlab-kaist.github.io/traces/.

2. 2010. USA Road Networks. http://users.diag.uniroma1.it/challenge9/download.shtml. 2010. USA Road Networks. http://users.diag.uniroma1.it/challenge9/download.shtml.

3. 2013. Delicious. http://delicious.com/. 2013. Delicious. http://delicious.com/.

4. 2019. Parallel Weighted Random Sampling . In ESA, Michael A. Bender, Ola Svensson, and Grzegorz Herman (Eds.), Vol. 144 . 59:1--59:24. 2019. Parallel Weighted Random Sampling. In ESA, Michael A. Bender, Ola Svensson, and Grzegorz Herman (Eds.), Vol. 144. 59:1--59:24.

5. 2023. Experiment code and technical report. https://github.com/CUHK-DBGroup/WSS-WIRS. 2023. Experiment code and technical report. https://github.com/CUHK-DBGroup/WSS-WIRS.

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Independent Range Sampling on Interval Data;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13

2. GENTI: GPU-Powered Walk-Based Subgraph Extraction for Scalable Representation Learning on Dynamic Graphs;Proceedings of the VLDB Endowment;2024-05

3. Scalable Approximate Butterfly and Bi-triangle Counting for Large Bipartite Networks;Proceedings of the ACM on Management of Data;2023-12-08

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3