首页 | 本学科首页   官方微博 | 高级检索  
     


Dynamic Generation of Discrete Random Variates
Authors:Matias   Vitter   Ni
Affiliation:(1) Department of Computer Science, Tel Aviv University, Tel Aviv 69978, Israel matias@math.tau.ac.il, IL;(2) Department of Computer Sciences, Purdue University, West Lafayette, IN 49707-2066, USA jsv@purdue.edu , US;(3) TBCommerce Network Corporation, 3191 Temple Ave, #210, Pomona, CA 91768, USA wcn@tbcommerce.com, US
Abstract:We present and analyze efficient new algorithms for generating a random variate distributed according to a dynamically changing set of N weights. The base version of each algorithm generates the discrete random variate in O(log ^* N) expected time and updates a weight in O(2^{log^* N}) expected time in the worst case. We then show how to reduce the update time to O(log * N) amortized expected time. We finally show how to apply our techniques to a lookup-table technique in order to obtain expected constant time in the worst case for generation and update. We give parallel algorithms for parallel generation and update having optimal processor—time product. Besides the usual application in computer simulation, our method can be used to perform constant-time prediction in prefetching applications. We also apply our techniques to obtain an efficient dynamic algorithm for maintaining an approximate heap of N elements, in which each query is required to return an element whose value is within an ɛ multiplicative factor of the maximal element value. For ɛ= 1/polylog (N), each query, insertion, or deletion takes O(log log log N) time.
Keywords:
本文献已被 SpringerLink 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号