出个题吧:概率

版主: huangchong

回复
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

出个题吧:概率

帖子 huangchong(净坛使者)楼主 »

问 任意取一个n位整数
它的十进制字串
在pi小数点后2亿位数字里
出现的概率是多少?


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



再升级一个问题: 对于一个n位数 它在pi的前2亿位里预期会出现多少次?
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

Re: 出个题吧:概率

帖子 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?
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

Re: 出个题吧:概率

帖子 huangchong(净坛使者)楼主 »

huangchong 写了: 2022年 7月 29日 08:47


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

这题出得太失败了
头像
dramawatcher1(狗蛋大)
论坛精英
论坛精英
dramawatcher1 的博客
帖子互动: 194
帖子: 7981
注册时间: 2022年 7月 25日 13:14

Re: 出个题吧:概率

帖子 dramawatcher1(狗蛋大) »

我还以为是笑话
oOOo
正式会员
正式会员
帖子互动: 1
帖子: 16
注册时间: 2022年 7月 25日 22:43

Re: 出个题吧:概率

帖子 oOOo »

怎么知道pi对十进制表达的记号是随机的?
头像
zeami(狼VP狈¿为奸)
论坛精英
论坛精英
2023年度十大优秀网友
帖子互动: 712
帖子: 6266
注册时间: 2022年 7月 25日 15:51

Re: 出个题吧:概率

帖子 zeami(狼VP狈¿为奸) »

四圈苟幾天就為回這貼?為毛?
oOOo 写了: 2022年 7月 29日 10:02 怎么知道pi对十进制表达的记号是随机的?
⚪︎ 辟邪剑法七折大酬宾~~
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

Re: 出个题吧:概率

帖子 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).
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

Re: 出个题吧:概率

帖子 huangchong(净坛使者)楼主 »

那再反过来问一个问题:

假设pi的前两亿位是完全随机的一个特定序列 那 在00000000到99999999这 一亿个字串里 没有在pi的前两亿位里出现一次的比例大概应该是多少?
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

Re: 出个题吧:概率

帖子 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"]}
oOOo
正式会员
正式会员
帖子互动: 1
帖子: 16
注册时间: 2022年 7月 25日 22:43

Re: 出个题吧:概率

帖子 oOOo »

如果记号是随机的,子字符串里出现一本莎士比亚全集的概率是1,只要n足够长。
头像
huangchong(净坛使者)楼主
论坛元老
论坛元老
2023-24年度优秀版主
帖子互动: 3709
帖子: 57492
注册时间: 2022年 7月 22日 01:22

Re: 出个题吧:概率

帖子 huangchong(净坛使者)楼主 »

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

回到 “肚皮舞运动(Joke)”