社区
数据结构与算法
帖子详情
如何产生random number generator with probability p???
horsey
2002-07-03 07:02:24
想设计一个随机数产生器,能以一定的概率输出“0”和“1”,最好用c或c++实现.谢谢指教。//bow
...全文
74
4
打赏
收藏
如何产生random number generator with probability p???
想设计一个随机数产生器,能以一定的概率输出“0”和“1”,最好用c或c++实现.谢谢指教。//bow
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
saint001
2002-07-08
打赏
举报
回复
matlab的统计工具箱
一些统计软件也可以spss,sas
不过都是做数据处理用的
不生成应用程序
horsey
2002-07-03
打赏
举报
回复
不好意思地再问,用c可以实现具有一定分布的数据源吗?比如到达时间间隔具有poisson分布的数据包的到达?
用什麽开发工具更好一点呢?
谢了先!
horsey
2002-07-03
打赏
举报
回复
谢谢!
guxiangxin
2002-07-03
打赏
举报
回复
使用c library function random()来实现,
例如:要求输出“1”的概率为60%
则判断random(100)的返回值
if <40 output "0"
else output "1"
random
walk
each time step it takes a step to the right or left with equal
probability
, so that p_right=0.5, p_left=0.5.
Number
of steps in each walk: 20
Number
of walks: 10,000 You may structure your code as ...
[麻省理工学院-算法导论].Introduction.to.Algorithms,.Second.Edition
An algorithm whose behavior is determined not only by its input but by the values produced by a
random
-
number
generator
is a
random
ized algorithm. We can use
random
ized algorithms to enforce a ...
Applications of Classical Physics
5.2
Random
Processes and their
Probability
Distributions 5.3 Correlation Function, Spectral Density, and Ergodicity 5.4 Noise and its Types of Spectra 5.5 Filters, Signal-to-Noise Ratio and Shot ...
Error Correction coding——mathematical methods and algorithms
3.2 The
Generator
Matrix Description of Linear Block Codes . . . . . . . . . . 84 3.2.1 Rudimentary Implementation . . . . . . . . . . . . . . . . . . . . . 86 3.3 The Parity Check Matrix and Dual ...
rand
number
_seed&srand&rand C语言随机数函数调用/种子与随机数/连续生成多个随机数
RAND(3) Linux Programmer’s Manual RAND(3)NAME rand, rand_r, srand - pseudo-
random
number
generator
#include Description The rand() function returns a pseudo-
random
integer in the range 0 to R
数据结构与算法
33,008
社区成员
35,326
社区内容
发帖
与我相关
我的任务
数据结构与算法
数据结构与算法相关内容讨论专区
复制链接
扫一扫
分享
社区描述
数据结构与算法相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章