出个题吧:概率
版主: huangchong
Re: 出个题吧:概率
做了个简单实验huangchong 写了: 2022年 7月 29日 08:41 问 任意取一个n位整数
它的十进制字串
在pi小数点后2亿位数字里
出现的概率是多少?
例如 任取一个8 位数 87658320 它在pi的前2亿位 小数里出现一次的概率是多少
再升级一个问题: 对于一个n位数 它在pi的前2亿位里预期会出现多少次?
12345678 在pi前2亿位只出现一次 顺带的 123456780 也只出现一次 其它的12345678x当然就全没出现过
同样87654321 也只出现一次
11111111 三次 跟着它的是0 7 2
22222222 也是1次
那好像就是直接取log10?
-
- 论坛精英
dramawatcher1 的博客 - 帖子互动: 194
- 帖子: 7981
- 注册时间: 2022年 7月 25日 13:14
Re: 出个题吧:概率
应该是不知道 但很可能
https://math.stackexchange.com/question ... %20in%20pi.
251
It is widely believed that π is a normal number. This (or even the weaker property of being disjunctive) implies that every possible string occurs somewhere in its expansion.
https://mathworld.wolfram.com/NormalNumber.html
Determining if numbers are normal is an unresolved problem. It is not even known if fundamental mathematical constants such as pi (Wagon 1985, Bailey and Crandall 2003), the natural logarithm of 2 ln2 (Bailey and Crandall 2003), Apéry's constant zeta(3) (Bailey and Crandall 2003), Pythagoras's constant sqrt(2) (Bailey and Crandall 2003), and e are normal, although the first 30 million digits of pi are very uniformly distributed (Bailey 1988).
Re: 出个题吧:概率
那再反过来问一个问题:
假设pi的前两亿位是完全随机的一个特定序列 那 在00000000到99999999这 一亿个字串里 没有在pi的前两亿位里出现一次的比例大概应该是多少?
假设pi的前两亿位是完全随机的一个特定序列 那 在00000000到99999999这 一亿个字串里 没有在pi的前两亿位里出现一次的比例大概应该是多少?
Re: 出个题吧:概率
https://math.stackexchange.com/question ... %20in%20pi.
Code
According to Mathematica, when π is expressed in base 128 (whose digits can therefore be interpreted as ASCII characters),
"NO" appears at position 702;
"Yes" appears at position 303351.
Code
代码: 全选
pNO = FromCharacterCode[RealDigits[\[Pi], 128, 710]];
pYes = FromCharacterCode[RealDigits[\[Pi], 128, 303400]];
{StringPosition[pNO, "NO"], StringPosition[pYes, "Yes"]}