摘要
设计并实现了生成任意给定分布随机变量的随机数发生器。根据指定精度将随机变量的概率分布用幂级数扩展,构造前缀码,利用前缀码对均匀分布的随机序列编码得到结果。数值实验证实了该算法的有效性。
A random number generator which generates a variable assuming any given probability distribution is designed based on prefix code and programed.The probability space is firstly expanded by decomposing each value to several temporary symbols. Each symbol is allotted a probability of power of a given integer,and the summation of these powers approximate the probability of corresponding value in original space repectively.Then a prefix code is constructed in the new space and used to code a uni-form sequence.The effect of the generator is validated by experimental result.
出处
《计算机工程与应用》
CSCD
北大核心
2009年第29期82-83,共2页
Computer Engineering and Applications
基金
湖北省教育厅科学技术研究项目(No.D20081506)
关键词
随机数发生器
前缀码
概率分布扩展
幂级数
random number generator
prefix code
probability distribution expand
series of power