分页: 1 / 1

出个题吧:概率

发表于 : 2022年 7月 29日 08:41
huangchong
问 任意取一个n位整数
它的十进制字串
在pi小数点后2亿位数字里
出现的概率是多少?


例如 任取一个8 位数 87658320 它在pi的前2亿位 小数里出现一次的概率是多少



再升级一个问题: 对于一个n位数 它在pi的前2亿位里预期会出现多少次?

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 08:47
huangchong
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?

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 08:53
huangchong
huangchong 写了: 2022年 7月 29日 08:47


那好像就是直接取log10?
似乎就是这么简单 每多一个数字 出现几率就变成原来的1/10 比如假如n位数有100个 那多一位 就是这100个里挑了10个 出现频率处以10

这题出得太失败了

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 09:48
dramawatcher1
我还以为是笑话

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 10:02
oOOo
怎么知道pi对十进制表达的记号是随机的?

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 10:11
zeami
四圈苟幾天就為回這貼?為毛?
oOOo 写了: 2022年 7月 29日 10:02 怎么知道pi对十进制表达的记号是随机的?

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 10:27
huangchong
oOOo 写了: 2022年 7月 29日 10:02 怎么知道pi对十进制表达的记号是随机的?
应该是不知道 但很可能



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: 出个题吧:概率

发表于 : 2022年 7月 29日 10:32
huangchong
那再反过来问一个问题:

假设pi的前两亿位是完全随机的一个特定序列 那 在00000000到99999999这 一亿个字串里 没有在pi的前两亿位里出现一次的比例大概应该是多少?

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 10:45
huangchong
https://math.stackexchange.com/question ... %20in%20pi.

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"]}

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 11:23
oOOo
如果记号是随机的,子字符串里出现一本莎士比亚全集的概率是1,只要n足够长。

Re: 出个题吧:概率

发表于 : 2022年 7月 29日 11:25
huangchong
oOOo 写了: 2022年 7月 29日 11:23 如果记号是随机的,子字符串里出现一本莎士比亚全集的概率是1,只要n足够长。
那个讨论楼里也说了 我们说的所有这些话 包括垮掉的mitbbs全本 都可以在pi里找到